From 880586bac42817ffcfea5d9f746f503fa29915b8 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 28 Jan 2023 22:57:53 +0100 Subject: [PATCH] Update dependencies (#1951) --- bridge/mattermost/handlers.go | 6 +- bridge/mattermost/helpers.go | 4 +- bridge/whatsappmulti/helpers.go | 18 +- bridge/whatsappmulti/whatsapp.go | 16 +- go.mod | 64 +- go.sum | 132 +- .../bwmarrin/discordgo/components.go | 46 +- .../github.com/bwmarrin/discordgo/discord.go | 2 +- .../bwmarrin/discordgo/endpoints.go | 17 +- .../github.com/bwmarrin/discordgo/events.go | 15 +- .../bwmarrin/discordgo/interactions.go | 16 +- .../github.com/bwmarrin/discordgo/message.go | 8 +- .../github.com/bwmarrin/discordgo/restapi.go | 1067 +- vendor/github.com/bwmarrin/discordgo/state.go | 33 +- .../github.com/bwmarrin/discordgo/structs.go | 299 +- vendor/github.com/bwmarrin/discordgo/util.go | 18 +- vendor/github.com/bwmarrin/discordgo/voice.go | 21 +- vendor/github.com/bwmarrin/discordgo/wsapi.go | 10 +- .../hashicorp/golang-lru/.golangci.yml | 30 + vendor/github.com/hashicorp/golang-lru/2q.go | 3 +- .../github.com/hashicorp/golang-lru/LICENSE | 2 + .../github.com/hashicorp/golang-lru/README.md | 2 +- vendor/github.com/hashicorp/golang-lru/arc.go | 1 - vendor/github.com/hashicorp/golang-lru/lru.go | 119 +- .../hashicorp/golang-lru/simplelru/lru.go | 6 +- .../golang-lru/simplelru/lru_interface.go | 5 +- .../hashicorp/golang-lru/testing.go | 16 + .../go-keybase-chat-bot/kbchat/chat.go | 12 +- .../go-keybase-chat-bot/kbchat/kbchat.go | 140 +- vendor/github.com/kyokomi/emoji/v2/README.md | 2 +- .../kyokomi/emoji/v2/emoji_codemap.go | 55 +- .../github.com/kyokomi/emoji/v2/wercker.yml | 33 - .../github.com/labstack/echo/v4/CHANGELOG.md | 37 + vendor/github.com/labstack/echo/v4/Makefile | 6 +- vendor/github.com/labstack/echo/v4/context.go | 13 +- vendor/github.com/labstack/echo/v4/echo.go | 146 +- vendor/github.com/labstack/echo/v4/echo_fs.go | 18 +- vendor/github.com/labstack/echo/v4/ip.go | 7 +- .../labstack/echo/v4/middleware/body_dump.go | 5 +- .../labstack/echo/v4/middleware/compress.go | 5 +- .../labstack/echo/v4/middleware/csrf.go | 2 +- .../labstack/echo/v4/middleware/extractor.go | 20 + .../labstack/echo/v4/middleware/jwt.go | 6 +- .../labstack/echo/v4/middleware/logger.go | 14 + .../labstack/echo/v4/middleware/proxy.go | 17 +- .../echo/v4/middleware/rate_limiter.go | 11 +- .../echo/v4/middleware/request_logger.go | 102 +- .../labstack/echo/v4/middleware/slash.go | 2 +- vendor/github.com/labstack/echo/v4/router.go | 46 + .../github.com/lrstanley/girc/.editorconfig | 4 +- vendor/github.com/lrstanley/girc/README.md | 2 +- .../magiconair/properties/.travis.yml | 17 - .../magiconair/properties/CHANGELOG.md | 45 + .../magiconair/properties/decode.go | 66 +- .../github.com/magiconair/properties/doc.go | 127 +- .../magiconair/properties/integrate.go | 7 +- .../github.com/magiconair/properties/lex.go | 2 +- .../github.com/magiconair/properties/load.go | 2 +- .../magiconair/properties/parser.go | 2 +- .../magiconair/properties/properties.go | 17 +- .../magiconair/properties/rangecheck.go | 2 +- .../pelletier/go-toml/v2/.goreleaser.yaml | 12 + .../github.com/pelletier/go-toml/v2/README.md | 11 + .../github.com/pelletier/go-toml/v2/decode.go | 88 +- .../github.com/pelletier/go-toml/v2/errors.go | 33 +- .../go-toml/v2/internal/ast/builder.go | 51 - .../go-toml/v2/internal/characters/ascii.go | 42 + .../v2/{ => internal/characters}/utf8.go | 53 +- .../go-toml/v2/internal/tracker/key.go | 12 +- .../go-toml/v2/internal/tracker/seen.go | 28 +- .../pelletier/go-toml/v2/localtime.go | 6 +- .../pelletier/go-toml/v2/marshaler.go | 108 +- .../github.com/pelletier/go-toml/v2/strict.go | 34 +- .../github.com/pelletier/go-toml/v2/types.go | 10 +- .../pelletier/go-toml/v2/unmarshaler.go | 180 +- .../v2/{internal/ast => unstable}/ast.go | 74 +- .../pelletier/go-toml/v2/unstable/builder.go | 71 + .../pelletier/go-toml/v2/unstable/doc.go | 3 + .../v2/{internal/ast => unstable}/kind.go | 12 +- .../go-toml/v2/{ => unstable}/parser.go | 293 +- .../go-toml/v2/{ => unstable}/scanner.go | 50 +- vendor/github.com/saintfish/chardet/README.md | 2 +- vendor/github.com/slack-go/slack/auth.go | 34 + .../github.com/slack-go/slack/block_conv.go | 12 + .../slack-go/slack/block_element.go | 92 + .../slack-go/slack/block_rich_text.go | 6 +- .../github.com/slack-go/slack/conversation.go | 73 +- vendor/github.com/slack-go/slack/files.go | 179 + vendor/github.com/slack-go/slack/misc.go | 3 + vendor/github.com/slack-go/slack/team.go | 69 + vendor/github.com/slack-go/slack/users.go | 105 +- vendor/github.com/slack-go/slack/webhooks.go | 4 +- .../slack-go/slack/websocket_reactions.go | 12 +- .../slack-go/slack/workflow_step_execute.go | 6 +- vendor/github.com/spf13/afero/.travis.yml | 26 - vendor/github.com/spf13/afero/README.md | 2 +- vendor/github.com/spf13/afero/afero.go | 4 +- vendor/github.com/spf13/afero/appveyor.yml | 9 +- vendor/github.com/spf13/afero/basepath.go | 14 +- vendor/github.com/spf13/afero/const_bsds.go | 1 + .../github.com/spf13/afero/const_win_unix.go | 8 +- vendor/github.com/spf13/afero/httpFs.go | 2 +- .../spf13/afero/internal/common/adapters.go | 27 + vendor/github.com/spf13/afero/iofs.go | 38 +- vendor/github.com/spf13/afero/ioutil.go | 10 +- vendor/github.com/spf13/afero/mem/file.go | 30 +- vendor/github.com/spf13/afero/memmap.go | 5 + vendor/github.com/spf13/afero/unionFile.go | 2 +- vendor/github.com/spf13/afero/util.go | 10 +- vendor/github.com/spf13/viper/Makefile | 4 +- vendor/github.com/spf13/viper/README.md | 21 +- .../viper/internal/encoding/toml/codec.go | 29 +- .../viper/internal/encoding/toml/codec2.go | 19 - .../viper/internal/encoding/yaml/codec.go | 2 +- .../viper/internal/encoding/yaml/yaml2.go | 14 - .../viper/internal/encoding/yaml/yaml3.go | 14 - vendor/github.com/spf13/viper/logger.go | 4 +- vendor/github.com/spf13/viper/util.go | 33 +- vendor/github.com/spf13/viper/viper.go | 118 +- vendor/github.com/spf13/viper/watch.go | 4 +- .../{watch_wasm.go => watch_unsupported.go} | 14 +- vendor/github.com/subosito/gotenv/.gitignore | 1 + .../github.com/subosito/gotenv/.golangci.yaml | 7 + .../github.com/subosito/gotenv/CHANGELOG.md | 12 +- vendor/github.com/subosito/gotenv/README.md | 3 +- vendor/github.com/subosito/gotenv/gotenv.go | 189 +- .../valyala/fasttemplate/template.go | 3 +- vendor/go.mau.fi/whatsmeow/appstate.go | 5 +- .../whatsmeow/binary/proto/def.pb.go | 1654 +- .../whatsmeow/binary/proto/def.pb.raw | Bin 68215 -> 68546 bytes .../whatsmeow/binary/proto/def.proto | 9 + vendor/go.mau.fi/whatsmeow/broadcast.go | 8 +- vendor/go.mau.fi/whatsmeow/client.go | 25 +- .../go.mau.fi/whatsmeow/connectionevents.go | 3 +- vendor/go.mau.fi/whatsmeow/download.go | 2 + vendor/go.mau.fi/whatsmeow/errors.go | 56 +- vendor/go.mau.fi/whatsmeow/group.go | 185 +- vendor/go.mau.fi/whatsmeow/mediaretry.go | 6 +- vendor/go.mau.fi/whatsmeow/message.go | 32 +- vendor/go.mau.fi/whatsmeow/msgsecret.go | 9 +- vendor/go.mau.fi/whatsmeow/notification.go | 62 +- vendor/go.mau.fi/whatsmeow/pair.go | 50 +- vendor/go.mau.fi/whatsmeow/presence.go | 28 +- vendor/go.mau.fi/whatsmeow/qrchan.go | 13 +- vendor/go.mau.fi/whatsmeow/retry.go | 6 +- vendor/go.mau.fi/whatsmeow/send.go | 117 +- .../whatsmeow/store/clientpayload.go | 2 +- .../whatsmeow/store/sqlstore/container.go | 2 + .../whatsmeow/store/sqlstore/store.go | 41 +- .../whatsmeow/store/sqlstore/upgrade.go | 13 +- vendor/go.mau.fi/whatsmeow/store/store.go | 34 +- .../whatsmeow/types/events/events.go | 17 +- vendor/go.mau.fi/whatsmeow/types/group.go | 59 + vendor/go.mau.fi/whatsmeow/upload.go | 2 +- vendor/go.mau.fi/whatsmeow/user.go | 40 +- vendor/go.uber.org/multierr/CHANGELOG.md | 6 + vendor/go.uber.org/multierr/error.go | 19 +- vendor/go.uber.org/zap/.readme.tmpl | 12 +- vendor/go.uber.org/zap/CHANGELOG.md | 104 + vendor/go.uber.org/zap/README.md | 44 +- vendor/go.uber.org/zap/buffer/buffer.go | 18 + vendor/go.uber.org/zap/global.go | 1 + vendor/go.uber.org/zap/level.go | 17 + vendor/go.uber.org/zap/logger.go | 80 +- vendor/go.uber.org/zap/options.go | 8 + vendor/go.uber.org/zap/stacktrace.go | 179 +- vendor/go.uber.org/zap/sugar.go | 4 +- .../zap/zapcore/buffered_write_syncer.go | 188 + .../{global_prego112.go => zapcore/clock.go} | 32 +- .../zap/zapcore/console_encoder.go | 6 +- vendor/go.uber.org/zap/zapcore/encoder.go | 21 +- vendor/go.uber.org/zap/zapcore/entry.go | 10 +- vendor/go.uber.org/zap/zapcore/error.go | 2 +- .../go.uber.org/zap/zapcore/json_encoder.go | 104 +- vendor/go.uber.org/zap/zapcore/level.go | 12 + .../reflected_encoder.go} | 25 +- vendor/go.uber.org/zap/zapcore/sampler.go | 27 +- vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 2 +- .../x/crypto/salsa20/salsa/hsalsa20.go | 66 +- .../x/crypto/salsa20/salsa/salsa208.go | 66 +- .../x/crypto/salsa20/salsa/salsa20_ref.go | 66 +- vendor/golang.org/x/crypto/ssh/common.go | 15 + vendor/golang.org/x/crypto/ssh/handshake.go | 21 +- vendor/golang.org/x/crypto/ssh/messages.go | 2 +- vendor/golang.org/x/crypto/ssh/server.go | 13 +- vendor/golang.org/x/net/html/token.go | 8 +- vendor/golang.org/x/net/http2/flow.go | 88 +- vendor/golang.org/x/net/http2/h2c/h2c.go | 6 +- vendor/golang.org/x/net/http2/headermap.go | 18 + vendor/golang.org/x/net/http2/hpack/encode.go | 5 + .../x/net/http2/hpack/static_table.go | 188 + vendor/golang.org/x/net/http2/hpack/tables.go | 78 +- vendor/golang.org/x/net/http2/server.go | 321 +- vendor/golang.org/x/net/http2/transport.go | 199 +- .../x/net/publicsuffix/data/children | Bin 0 -> 2876 bytes .../golang.org/x/net/publicsuffix/data/nodes | Bin 0 -> 48280 bytes .../golang.org/x/net/publicsuffix/data/text | 1 + vendor/golang.org/x/net/publicsuffix/list.go | 36 +- vendor/golang.org/x/net/publicsuffix/table.go | 10552 +---------- .../golang.org/x/net/websocket/websocket.go | 7 +- .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 44 +- vendor/golang.org/x/sys/cpu/parse.go | 43 + .../x/sys/cpu/proc_cpuinfo_linux.go | 54 + .../golang.org/x/sys/execabs/execabs_go119.go | 8 +- vendor/golang.org/x/sys/unix/gccgo.go | 4 +- vendor/golang.org/x/sys/unix/gccgo_c.c | 4 +- vendor/golang.org/x/sys/unix/ioctl.go | 4 +- vendor/golang.org/x/sys/unix/mkall.sh | 4 +- vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 14 + .../x/sys/unix/syscall_dragonfly.go | 1 + .../golang.org/x/sys/unix/syscall_freebsd.go | 1 + vendor/golang.org/x/sys/unix/syscall_hurd.go | 22 + .../golang.org/x/sys/unix/syscall_hurd_386.go | 29 + vendor/golang.org/x/sys/unix/syscall_linux.go | 51 +- .../golang.org/x/sys/unix/syscall_netbsd.go | 15 + .../golang.org/x/sys/unix/syscall_openbsd.go | 1 + .../x/sys/unix/syscall_openbsd_libc.go | 4 +- .../golang.org/x/sys/unix/syscall_solaris.go | 1 + vendor/golang.org/x/sys/unix/syscall_unix.go | 55 +- .../x/sys/unix/zerrors_openbsd_386.go | 356 +- .../x/sys/unix/zerrors_openbsd_amd64.go | 189 +- .../x/sys/unix/zerrors_openbsd_arm.go | 348 +- .../x/sys/unix/zerrors_openbsd_arm64.go | 160 +- .../x/sys/unix/zerrors_openbsd_mips64.go | 95 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 10 + .../x/sys/unix/zsyscall_freebsd_386.go | 10 + .../x/sys/unix/zsyscall_freebsd_amd64.go | 10 + .../x/sys/unix/zsyscall_freebsd_arm.go | 10 + .../x/sys/unix/zsyscall_freebsd_arm64.go | 10 + .../x/sys/unix/zsyscall_freebsd_riscv64.go | 10 + .../x/sys/unix/zsyscall_netbsd_386.go | 10 + .../x/sys/unix/zsyscall_netbsd_amd64.go | 10 + .../x/sys/unix/zsyscall_netbsd_arm.go | 10 + .../x/sys/unix/zsyscall_netbsd_arm64.go | 10 + .../x/sys/unix/zsyscall_openbsd_386.go | 14 + .../x/sys/unix/zsyscall_openbsd_386.s | 137 +- .../x/sys/unix/zsyscall_openbsd_amd64.go | 14 + .../x/sys/unix/zsyscall_openbsd_amd64.s | 137 +- .../x/sys/unix/zsyscall_openbsd_arm.go | 14 + .../x/sys/unix/zsyscall_openbsd_arm.s | 137 +- .../x/sys/unix/zsyscall_openbsd_arm64.go | 14 + .../x/sys/unix/zsyscall_openbsd_arm64.s | 137 +- .../x/sys/unix/zsyscall_openbsd_mips64.go | 812 +- .../x/sys/unix/zsyscall_openbsd_mips64.s | 669 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 14 + .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 14 + .../x/sys/unix/zsyscall_openbsd_riscv64.s | 137 +- .../x/sys/unix/zsyscall_solaris_amd64.go | 13 + .../x/sys/unix/zsysctl_openbsd_386.go | 51 +- .../x/sys/unix/zsysctl_openbsd_amd64.go | 17 +- .../x/sys/unix/zsysctl_openbsd_arm.go | 51 +- .../x/sys/unix/zsysctl_openbsd_arm64.go | 11 +- .../x/sys/unix/zsysctl_openbsd_mips64.go | 3 +- .../x/sys/unix/zsysnum_openbsd_mips64.go | 1 + .../x/sys/unix/ztypes_netbsd_386.go | 84 + .../x/sys/unix/ztypes_netbsd_amd64.go | 84 + .../x/sys/unix/ztypes_netbsd_arm.go | 84 + .../x/sys/unix/ztypes_netbsd_arm64.go | 84 + .../x/sys/unix/ztypes_openbsd_386.go | 97 +- .../x/sys/unix/ztypes_openbsd_amd64.go | 33 +- .../x/sys/unix/ztypes_openbsd_arm.go | 9 +- .../x/sys/unix/ztypes_openbsd_arm64.go | 9 +- .../x/sys/unix/ztypes_openbsd_mips64.go | 9 +- .../x/sys/windows/syscall_windows.go | 1 + .../x/sys/windows/zsyscall_windows.go | 7 + vendor/golang.org/x/term/terminal.go | 1 - .../golang.org/x/text/unicode/bidi/trieval.go | 12 - vendor/golang.org/x/time/AUTHORS | 3 - vendor/golang.org/x/time/CONTRIBUTORS | 3 - vendor/golang.org/x/time/rate/rate.go | 154 +- vendor/golang.org/x/time/rate/sometimes.go | 67 + vendor/gopkg.in/ini.v1/.golangci.yml | 6 + vendor/gopkg.in/ini.v1/README.md | 4 +- vendor/gopkg.in/ini.v1/codecov.yml | 7 + vendor/gopkg.in/ini.v1/deprecated.go | 5 +- vendor/gopkg.in/ini.v1/error.go | 15 + vendor/gopkg.in/ini.v1/file.go | 10 +- vendor/gopkg.in/ini.v1/ini.go | 8 +- vendor/gopkg.in/ini.v1/parser.go | 9 +- vendor/modernc.org/libc/probes.go | 169 + vendor/modernc.org/sqlite/AUTHORS | 1 + vendor/modernc.org/sqlite/CONTRIBUTORS | 2 + vendor/modernc.org/sqlite/Makefile | 1 + vendor/modernc.org/sqlite/doc.go | 29 +- vendor/modernc.org/sqlite/generator.go | 42 +- .../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 | 14905 +++++++-------- .../sqlite/lib/sqlite_darwin_arm64.go | 15029 ++++++++-------- .../sqlite/lib/sqlite_freebsd_386.go | 14810 ++++++++------- .../sqlite/lib/sqlite_freebsd_amd64.go | 14813 ++++++++------- .../sqlite/lib/sqlite_freebsd_arm.go | 14801 ++++++++------- .../sqlite/lib/sqlite_freebsd_arm64.go | 14813 ++++++++------- .../sqlite/lib/sqlite_linux_386.go | 14812 ++++++++------- .../sqlite/lib/sqlite_linux_amd64.go | 14815 ++++++++------- .../sqlite/lib/sqlite_linux_arm.go | 14803 ++++++++------- .../sqlite/lib/sqlite_linux_arm64.go | 14815 ++++++++------- .../sqlite/lib/sqlite_linux_ppc64le.go | 14815 ++++++++------- .../sqlite/lib/sqlite_linux_riscv64.go | 14815 ++++++++------- .../sqlite/lib/sqlite_linux_s390x.go | 14815 ++++++++------- .../sqlite/lib/sqlite_netbsd_amd64.go | 14160 ++++++++------- .../sqlite/lib/sqlite_openbsd_amd64.go | 14789 ++++++++------- .../sqlite/lib/sqlite_openbsd_arm64.go | 14789 ++++++++------- .../sqlite/lib/sqlite_windows_amd64.go | 14928 +++++++-------- .../sqlite/lib/sqlite_windows_arm64.go | 14928 +++++++-------- vendor/modernc.org/sqlite/sqlite.go | 53 +- vendor/modules.txt | 76 +- 325 files changed, 151452 insertions(+), 141118 deletions(-) create mode 100644 vendor/github.com/hashicorp/golang-lru/.golangci.yml create mode 100644 vendor/github.com/hashicorp/golang-lru/testing.go delete mode 100644 vendor/github.com/kyokomi/emoji/v2/wercker.yml delete mode 100644 vendor/github.com/magiconair/properties/.travis.yml delete mode 100644 vendor/github.com/pelletier/go-toml/v2/internal/ast/builder.go create mode 100644 vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go rename vendor/github.com/pelletier/go-toml/v2/{ => internal/characters}/utf8.go (87%) rename vendor/github.com/pelletier/go-toml/v2/{internal/ast => unstable}/ast.go (59%) create mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/builder.go create mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/doc.go rename vendor/github.com/pelletier/go-toml/v2/{internal/ast => unstable}/kind.go (81%) rename vendor/github.com/pelletier/go-toml/v2/{ => unstable}/parser.go (70%) rename vendor/github.com/pelletier/go-toml/v2/{ => unstable}/scanner.go (79%) delete mode 100644 vendor/github.com/spf13/afero/.travis.yml create mode 100644 vendor/github.com/spf13/afero/internal/common/adapters.go delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go rename vendor/github.com/spf13/viper/{watch_wasm.go => watch_unsupported.go} (52%) create mode 100644 vendor/github.com/subosito/gotenv/.golangci.yaml create mode 100644 vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go rename vendor/go.uber.org/zap/{global_prego112.go => zapcore/clock.go} (58%) rename vendor/go.uber.org/zap/{global_go112.go => zapcore/reflected_encoder.go} (64%) create mode 100644 vendor/golang.org/x/net/http2/hpack/static_table.go create mode 100644 vendor/golang.org/x/net/publicsuffix/data/children create mode 100644 vendor/golang.org/x/net/publicsuffix/data/nodes create mode 100644 vendor/golang.org/x/net/publicsuffix/data/text create mode 100644 vendor/golang.org/x/sys/cpu/parse.go create mode 100644 vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_hurd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_hurd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s delete mode 100644 vendor/golang.org/x/time/AUTHORS delete mode 100644 vendor/golang.org/x/time/CONTRIBUTORS create mode 100644 vendor/golang.org/x/time/rate/sometimes.go create mode 100644 vendor/modernc.org/libc/probes.go diff --git a/bridge/mattermost/handlers.go b/bridge/mattermost/handlers.go index fccb31b6..8c4ea365 100644 --- a/bridge/mattermost/handlers.go +++ b/bridge/mattermost/handlers.go @@ -41,7 +41,7 @@ func (b *Bmattermost) handleDownloadAvatar(userid string, channel string) { } } -// nolint:wrapcheck +//nolint:wrapcheck func (b *Bmattermost) handleDownloadFile(rmsg *config.Message, id string) error { url, _, _ := b.mc.Client.GetFileLink(id) finfo, _, err := b.mc.Client.GetFileInfo(id) @@ -91,7 +91,7 @@ func (b *Bmattermost) handleMatter() { } } -// nolint:cyclop +//nolint:cyclop func (b *Bmattermost) handleMatterClient(messages chan *config.Message) { for message := range b.mc.MessageChan { b.Log.Debugf("%#v %#v", message.Raw.GetData(), message.Raw.EventType()) @@ -186,7 +186,7 @@ func (b *Bmattermost) handleUploadFile(msg *config.Message) (string, error) { return res, err } -// nolint:forcetypeassert +//nolint:forcetypeassert func (b *Bmattermost) handleProps(rmsg *config.Message, message *matterclient.Message) { props := message.Post.Props if props == nil { diff --git a/bridge/mattermost/helpers.go b/bridge/mattermost/helpers.go index 3e1262c7..cca1c4e6 100644 --- a/bridge/mattermost/helpers.go +++ b/bridge/mattermost/helpers.go @@ -66,7 +66,7 @@ func (b *Bmattermost) doConnectWebhookURL() error { return nil } -// nolint:wrapcheck +//nolint:wrapcheck func (b *Bmattermost) apiLogin() error { password := b.GetString("Password") if b.GetString("Token") != "" { @@ -171,7 +171,7 @@ func (b *Bmattermost) sendWebhook(msg config.Message) (string, error) { } // skipMessages returns true if this message should not be handled -// nolint:gocyclo,cyclop +//nolint:gocyclo,cyclop func (b *Bmattermost) skipMessage(message *matterclient.Message) bool { // Handle join/leave if message.Type == "system_join_leave" || diff --git a/bridge/whatsappmulti/helpers.go b/bridge/whatsappmulti/helpers.go index c3c9d018..75d9f5fd 100644 --- a/bridge/whatsappmulti/helpers.go +++ b/bridge/whatsappmulti/helpers.go @@ -7,6 +7,7 @@ import ( "fmt" "strings" + "go.mau.fi/whatsmeow" "go.mau.fi/whatsmeow/store" "go.mau.fi/whatsmeow/store/sqlstore" "go.mau.fi/whatsmeow/types" @@ -18,7 +19,7 @@ type ProfilePicInfo struct { Status int16 `json:"status"` } -func (b *Bwhatsapp) reloadContacts(){ +func (b *Bwhatsapp) reloadContacts() { if _, err := b.wc.Store.Contacts.GetAllContacts(); err != nil { b.Log.Errorf("error on update of contacts: %v", err) } @@ -48,7 +49,7 @@ func (b *Bwhatsapp) getSenderName(info types.MessageInfo) string { if exists && sender.FullName != "" { return sender.FullName } - + if info.PushName != "" { return info.PushName } @@ -56,7 +57,7 @@ func (b *Bwhatsapp) getSenderName(info types.MessageInfo) string { if exists && sender.FirstName != "" { return sender.FirstName } - + return "Someone" } @@ -71,11 +72,11 @@ func (b *Bwhatsapp) getSenderNotify(senderJid types.JID) string { if !exists { return "someone" } - + if exists && sender.FullName != "" { return sender.FullName } - + if exists && sender.PushName != "" { return sender.PushName } @@ -83,13 +84,16 @@ func (b *Bwhatsapp) getSenderNotify(senderJid types.JID) string { if exists && sender.FirstName != "" { return sender.FirstName } - + return "someone" } func (b *Bwhatsapp) GetProfilePicThumb(jid string) (*types.ProfilePictureInfo, error) { pjid, _ := types.ParseJID(jid) - info, err := b.wc.GetProfilePictureInfo(pjid, true, "") + + info, err := b.wc.GetProfilePictureInfo(pjid, &whatsmeow.GetProfilePictureParams{ + Preview: true, + }) if err != nil { return nil, fmt.Errorf("failed to get avatar: %v", err) } diff --git a/bridge/whatsappmulti/whatsapp.go b/bridge/whatsappmulti/whatsapp.go index 686396d3..76e4ae46 100644 --- a/bridge/whatsappmulti/whatsapp.go +++ b/bridge/whatsappmulti/whatsapp.go @@ -238,7 +238,7 @@ func (b *Bwhatsapp) PostDocumentMessage(msg config.Message, filetype string) (st b.Log.Debugf("=> Sending %#v as a document", msg) ID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(context.TODO(), groupJID, ID, &message) + _, err = b.wc.SendMessage(context.TODO(), groupJID, &message, whatsmeow.SendRequestExtra{ID: ID}) return ID, err } @@ -272,7 +272,7 @@ func (b *Bwhatsapp) PostImageMessage(msg config.Message, filetype string) (strin b.Log.Debugf("=> Sending %#v as an image", msg) ID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(context.TODO(), groupJID, ID, &message) + _, err = b.wc.SendMessage(context.TODO(), groupJID, &message, whatsmeow.SendRequestExtra{ID: ID}) return ID, err } @@ -305,7 +305,7 @@ func (b *Bwhatsapp) PostVideoMessage(msg config.Message, filetype string) (strin b.Log.Debugf("=> Sending %#v as a video", msg) ID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(context.TODO(), groupJID, ID, &message) + _, err = b.wc.SendMessage(context.TODO(), groupJID, &message, whatsmeow.SendRequestExtra{ID: ID}) return ID, err } @@ -335,14 +335,14 @@ func (b *Bwhatsapp) PostAudioMessage(msg config.Message, filetype string) (strin b.Log.Debugf("=> Sending %#v as audio", msg) ID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(context.TODO(), groupJID, ID, &message) + _, err = b.wc.SendMessage(context.TODO(), groupJID, &message, whatsmeow.SendRequestExtra{ID: ID}) var captionMessage proto.Message caption := msg.Username + fi.Comment + "\u2B06" // the char on the end is upwards arrow emoji captionMessage.Conversation = &caption captionID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(context.TODO(), groupJID, captionID, &captionMessage) + _, err = b.wc.SendMessage(context.TODO(), groupJID, &captionMessage, whatsmeow.SendRequestExtra{ID: captionID}) return ID, err } @@ -389,10 +389,10 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) { switch filetype { case "image/jpeg", "image/png", "image/gif": return b.PostImageMessage(msg, filetype) - case "video/mp4", "video/3gpp": //TODO: Check if codecs are supported by WA + case "video/mp4", "video/3gpp": // TODO: Check if codecs are supported by WA return b.PostVideoMessage(msg, filetype) case "audio/ogg": - return b.PostAudioMessage(msg, "audio/ogg; codecs=opus") //TODO: Detect if it is actually OPUS + return b.PostAudioMessage(msg, "audio/ogg; codecs=opus") // TODO: Detect if it is actually OPUS case "audio/aac", "audio/mp4", "audio/amr", "audio/mpeg": return b.PostAudioMessage(msg, filetype) default: @@ -407,7 +407,7 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) { message.Conversation = &text ID := whatsmeow.GenerateMessageID() - _, err := b.wc.SendMessage(context.TODO(), groupJID, ID, &message) + _, err := b.wc.SendMessage(context.TODO(), groupJID, &message, whatsmeow.SendRequestExtra{ID: ID}) return ID, err } diff --git a/go.mod b/go.mod index 5e6527ee..4bd1808d 100644 --- a/go.mod +++ b/go.mod @@ -7,22 +7,22 @@ require ( github.com/Philipp15b/go-steam v1.0.1-0.20200727090957-6ae9b3c0a560 github.com/Rhymen/go-whatsapp v0.1.2-0.20211102134409-31a2e740845c github.com/SevereCloud/vksdk/v2 v2.15.0 - github.com/bwmarrin/discordgo v0.26.1 + github.com/bwmarrin/discordgo v0.27.0 github.com/d5/tengo/v2 v2.13.0 github.com/davecgh/go-spew v1.1.1 github.com/fsnotify/fsnotify v1.6.0 github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c - github.com/google/gops v0.3.25 + github.com/google/gops v0.3.26 github.com/gorilla/schema v1.2.0 github.com/gorilla/websocket v1.5.0 github.com/harmony-development/shibshib v0.0.0-20220101224523-c98059d09cfa - github.com/hashicorp/golang-lru v0.5.4 + github.com/hashicorp/golang-lru v0.6.0 github.com/jpillora/backoff v1.0.0 - github.com/keybase/go-keybase-chat-bot v0.0.0-20221010143313-3c4907bab5dd - github.com/kyokomi/emoji/v2 v2.2.10 - github.com/labstack/echo/v4 v4.9.1 - github.com/lrstanley/girc v0.0.0-20220821023908-8e7df6d970f8 + github.com/keybase/go-keybase-chat-bot v0.0.0-20221220212439-e48d9abd2c20 + github.com/kyokomi/emoji/v2 v2.2.11 + github.com/labstack/echo/v4 v4.10.0 + github.com/lrstanley/girc v0.0.0-20221222153823-a92667a5c9b4 github.com/matterbridge/Rocket.Chat.Go.SDK v0.0.0-20211016222428-79310a412696 github.com/matterbridge/go-xmpp v0.0.0-20211030125215-791a06c5f1be github.com/matterbridge/gomatrix v0.0.0-20220411225302-271e5088ea27 @@ -37,25 +37,25 @@ require ( github.com/paulrosania/go-charset v0.0.0-20190326053356-55c9d7a5834c github.com/rs/xid v1.4.0 github.com/russross/blackfriday v1.6.0 - github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca + github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d github.com/shazow/ssh-chat v1.10.1 github.com/sirupsen/logrus v1.9.0 - github.com/slack-go/slack v0.11.3 - github.com/spf13/viper v1.12.0 + github.com/slack-go/slack v0.12.1 + github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.1 github.com/vincent-petithory/dataurl v1.0.0 github.com/writeas/go-strip-markdown v2.0.1+incompatible github.com/yaegashi/msgraph.go v0.1.4 github.com/zfjagann/golang-ring v0.0.0-20220330170733-19bcea1b6289 - go.mau.fi/whatsmeow v0.0.0-20221126173344-e660988acdbc - golang.org/x/image v0.1.0 - golang.org/x/oauth2 v0.1.0 - golang.org/x/text v0.4.0 + go.mau.fi/whatsmeow v0.0.0-20230128195103-dcbc8dd31a22 + golang.org/x/image v0.3.0 + golang.org/x/oauth2 v0.4.0 + golang.org/x/text v0.6.0 gomod.garykim.dev/nc-talk v0.3.0 google.golang.org/protobuf v1.28.1 gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376 - layeh.com/gumble v0.0.0-20200818122324-146f9205029b - modernc.org/sqlite v1.19.5 + layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14 + modernc.org/sqlite v1.20.3 ) require ( @@ -83,12 +83,12 @@ require ( github.com/klauspost/compress v1.15.8 // indirect github.com/klauspost/cpuid/v2 v2.0.12 // indirect github.com/labstack/gommon v0.4.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 // indirect github.com/mattermost/ldap v0.0.0-20201202150706-ee0e6284187d // indirect github.com/mattermost/logr v1.0.13 // indirect github.com/mattermost/logr/v2 v2.0.15 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect @@ -105,7 +105,7 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/philhofer/fwd v1.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -116,39 +116,39 @@ require ( github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4 // indirect github.com/sizeofint/webpanimation v0.0.0-20210809145948-1d2b32119882 // indirect github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 // indirect - github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.3.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/tinylib/msgp v1.1.6 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.1 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wiggin77/cfg v1.0.2 // indirect github.com/wiggin77/merror v1.0.3 // indirect github.com/wiggin77/srslog v1.0.1 // indirect - go.mau.fi/libsignal v0.0.0-20221015105917-d970e7c3c9cf // indirect + go.mau.fi/libsignal v0.1.0 // indirect go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.17.0 // indirect - golang.org/x/crypto v0.0.0-20221012134737-56aed061732a // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.21.0 // indirect + golang.org/x/crypto v0.4.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.1.0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.1.0 // indirect - golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect + golang.org/x/net v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/term v0.4.0 // indirect + golang.org/x/time v0.2.0 // indirect golang.org/x/tools v0.1.12 // indirect google.golang.org/appengine v1.6.7 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect 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 // indirect - modernc.org/libc v1.21.5 // 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 e819d7da..f68ae47f 100644 --- a/go.sum +++ b/go.sum @@ -234,6 +234,8 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -285,8 +287,8 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/bwmarrin/discordgo v0.26.1 h1:AIrM+g3cl+iYBr4yBxCBp9tD9jR3K7upEjl0d89FRkE= -github.com/bwmarrin/discordgo v0.26.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= +github.com/bwmarrin/discordgo v0.27.0 h1:4ZK9KN+rGIxZ0fdGTmgdCcliQeW8Zhu6MnlFI92nf0Q= +github.com/bwmarrin/discordgo v0.27.0/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -433,6 +435,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -726,13 +729,14 @@ 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/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v35 v35.2.0/go.mod h1:s0515YVTI+IMrDoy9Y4pHt9ShGpzHvHO8rZ7L7acgvs= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gops v0.3.25 h1:Pf6uw+cO6pDhc7HJ71NiG0x8dyQTeQcmg3HQFF39qVw= -github.com/google/gops v0.3.25/go.mod h1:8A7ebAm0id9K3H0uOggeRVGxszSvnlURun9mg3GdYDw= +github.com/google/gops v0.3.26 h1:Ziyfd8sEhWVbrCIy59c1WOKodI63Jzojwm0JSZbBPS4= +github.com/google/gops v0.3.26/go.mod h1:vZ68aOXu2zJoybPyGpaHMmrCyd51DCxJoex4cO3ht/o= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -846,8 +850,9 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -872,6 +877,7 @@ github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= @@ -978,9 +984,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kettek/apng v0.0.0-20191108220231-414630eed80f h1:dnCYnTSltLuPMfc7dMrkz2uBUcEf/OFBR8yRh3oRT98= github.com/kettek/apng v0.0.0-20191108220231-414630eed80f/go.mod h1:x78/VRQYKuCftMWS0uK5e+F5RJ7S4gSlESRWI0Prl6Q= -github.com/keybase/go-keybase-chat-bot v0.0.0-20221010143313-3c4907bab5dd h1:o22WsBgpQZs7w4faoT7Rfp2kGvEye8gRmhImW0NpRQA= -github.com/keybase/go-keybase-chat-bot v0.0.0-20221010143313-3c4907bab5dd/go.mod h1:Yan1Krk0q1FglHdCkNrF5hFQ4Sgq8LnuG4gI2U4xQAk= -github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= +github.com/keybase/go-keybase-chat-bot v0.0.0-20221220212439-e48d9abd2c20 h1:imPu/fy8VhpzD318SnouRyvIgJAoouEyph6+7XAZbbk= +github.com/keybase/go-keybase-chat-bot v0.0.0-20221220212439-e48d9abd2c20/go.mod h1:Yan1Krk0q1FglHdCkNrF5hFQ4Sgq8LnuG4gI2U4xQAk= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -1030,12 +1035,12 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4= -github.com/kyokomi/emoji/v2 v2.2.10 h1:1z5eMVcxFifsmEoNpdeq4UahbcicgQ4FEHuzrCVwmiI= -github.com/kyokomi/emoji/v2 v2.2.10/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= +github.com/kyokomi/emoji/v2 v2.2.11 h1:Pf/ZWVTbnAVkHOLJLWjPxM/FmgyPe+d85cv/OLP5Yus= +github.com/kyokomi/emoji/v2 v2.2.11/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/echo/v4 v4.9.1 h1:GliPYSpzGKlyOhqIbG8nmHBo3i1saKWFOgh41AN3b+Y= -github.com/labstack/echo/v4 v4.9.1/go.mod h1:Pop5HLc+xoc4qhTZ1ip6C0RtP7Z+4VzRLWZZFKqbbjo= +github.com/labstack/echo/v4 v4.10.0 h1:5CiyngihEO4HXsz3vVsJn7f8xAlWwRr3aY6Ih280ZKA= +github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= @@ -1053,15 +1058,15 @@ github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lrstanley/girc v0.0.0-20220821023908-8e7df6d970f8 h1:OeTVm9ph5q9eq9E+HDkUbiJtVvu+kNOhuLe5Qs83sEs= -github.com/lrstanley/girc v0.0.0-20220821023908-8e7df6d970f8/go.mod h1:lgrnhcF8bg/Bd5HA5DOb4Z+uGqUqGnp4skr+J2GwVgI= +github.com/lrstanley/girc v0.0.0-20221222153823-a92667a5c9b4 h1:eOJJOM8RTmDcK1F0SqCBX/Ic1vgDnAZfdll6oik0Ups= +github.com/lrstanley/girc v0.0.0-20221222153823-a92667a5c9b4/go.mod h1:lgrnhcF8bg/Bd5HA5DOb4Z+uGqUqGnp4skr+J2GwVgI= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -1110,8 +1115,9 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -1330,8 +1336,8 @@ github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/peterbourgon/diskv v0.0.0-20171120014656-2973218375c3/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= @@ -1454,8 +1460,8 @@ github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca h1:NugYot0LIVPxTvN8n+Kvkn6TrbMyxQiuvKdEwFdR9vI= -github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= +github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d h1:hrujxIzL1woJ7AwssoOcM/tq5JjjG2yYOc8odClEiXA= +github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= @@ -1469,7 +1475,7 @@ github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4 h1:zwQ1HBo5FYwn1ksMd github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4/go.mod h1:vt2jWY/3Qw1bIzle5thrJWucsLuuX9iUNnp20CqCciI= github.com/shazow/ssh-chat v1.10.1 h1:ePS+ngEYqm+yUuXegDPutysqLV2WoI22XDOeRgI6CE0= github.com/shazow/ssh-chat v1.10.1/go.mod h1:0+7szsKylcre0vljkVnbuI6q7Odtc+QCDHxa+fFNV54= -github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/shirou/gopsutil/v3 v3.22.10/go.mod h1:QNza6r4YQoydyCfo6rH0blGfKahgibh4dQmV5xdFkQk= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1515,8 +1521,8 @@ github.com/sizeofint/webpanimation v0.0.0-20210809145948-1d2b32119882 h1:A7o8tOE github.com/sizeofint/webpanimation v0.0.0-20210809145948-1d2b32119882/go.mod h1:5IwJoz9Pw7JsrCN4/skkxUtSWT7myuUPLhCgv6Q5vvQ= github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 h1:lpEzuenPuO1XNTeikEmvqYFcU37GVLl8SRNblzyvGBE= github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo= -github.com/slack-go/slack v0.11.3 h1:GN7revxEMax4amCc3El9a+9SGnjmBvSUobs0QnO6ZO8= -github.com/slack-go/slack v0.11.3/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= +github.com/slack-go/slack v0.12.1 h1:X97b9g2hnITDtNsNe5GkGx6O2/Sz/uC20ejRZN6QxOw= +github.com/slack-go/slack v0.12.1/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= @@ -1535,8 +1541,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= +github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= @@ -1548,6 +1554,7 @@ github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHN github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1561,8 +1568,8 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= -github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/splitio/go-client/v6 v6.1.0/go.mod h1:CEGAEFT99Fwb32ZIRcnZoXTMXddtB6IIpTmt3RP8mnM= github.com/splitio/go-split-commons/v3 v3.1.0/go.mod h1:29NCy20oAS4ZMy4qkwTd6277eieVDonx4V/aeDU/wUQ= github.com/splitio/go-toolkit/v4 v4.2.0/go.mod h1:EdIHN0yzB1GTXDYQc0KdKvnjkO/jfUM2YqHVYfhD3Wo= @@ -1591,8 +1598,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= -github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1647,8 +1654,9 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= @@ -1728,10 +1736,10 @@ go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3C go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.mau.fi/libsignal v0.0.0-20221015105917-d970e7c3c9cf h1:mzPxXBgDPHKDHMVV1tIWh7lwCiRpzCsXC0gNRX+K07c= -go.mau.fi/libsignal v0.0.0-20221015105917-d970e7c3c9cf/go.mod h1:XCjaU93vl71YNRPn059jMrK0xRDwVO5gKbxoPxow9mQ= -go.mau.fi/whatsmeow v0.0.0-20221126173344-e660988acdbc h1:uZCZs8Ju83OmM1A1+VhpZMXpvVAg5BEQNP0KBXALJBI= -go.mau.fi/whatsmeow v0.0.0-20221126173344-e660988acdbc/go.mod h1:2yweL8nczvtlIxkrvCb0y8xiO13rveX9lJPambwYV/E= +go.mau.fi/libsignal v0.1.0 h1:vAKI/nJ5tMhdzke4cTK1fb0idJzz1JuEIpmjprueC+c= +go.mau.fi/libsignal v0.1.0/go.mod h1:R8ovrTezxtUNzCQE5PH30StOQWWeBskBsWE55vMfY9I= +go.mau.fi/whatsmeow v0.0.0-20230128195103-dcbc8dd31a22 h1:za/zmM0hcfEKTRcLtr2zcUFE4VpUw8CndXNeV+v676c= +go.mau.fi/whatsmeow v0.0.0-20230128195103-dcbc8dd31a22/go.mod h1:TrdC8N6SnPFxWo5FiMnDIDFuVyfOLzy5dWDaUPNjcHY= go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.7.0/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= @@ -1763,16 +1771,20 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= @@ -1814,8 +1826,8 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20221012134737-56aed061732a h1:NmSIgad6KjE6VvHciPZuNRTKxGhlPfD6OA87W/PLkqg= -golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= +golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1844,8 +1856,8 @@ golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+o golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210622092929-e6eecd499c2c/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20220321031419-a8550c1d254a/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.1.0 h1:r8Oj8ZA2Xy12/b5KZYj3tuv7NG/fBz3TwQVvpJ9l8Rk= -golang.org/x/image v0.1.0/go.mod h1:iyPr49SD/G/TBxYVB/9RRtGUT5eNbo2u4NamWeQcD5c= +golang.org/x/image v0.3.0 h1:HTDXbdK9bjfSWkPzDJIw89W8CAtfFGduujWs33NLLsg= +golang.org/x/image v0.3.0/go.mod h1:fXd9211C/0VTlYuAcOhW8dY/RtEJqODXOWBDpmYBf+A= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1957,8 +1969,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220403103023-749bd193bc2b/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1979,8 +1991,8 @@ golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2129,13 +2141,13 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2145,15 +2157,16 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.2.0 h1:52I/1L54xyEQAYdtcSuxtiT84KGYTBGXwayxmIpNJhE= +golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2447,8 +2460,9 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= @@ -2523,8 +2537,8 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= layeh.com/gopus v0.0.0-20161224163843-0ebf989153aa/go.mod h1:AOef7vHz0+v4sWwJnr0jSyHiX/1NgsMoaxl+rEPz/I0= -layeh.com/gumble v0.0.0-20200818122324-146f9205029b h1:Kne6wkHqbqrygRsqs5XUNhSs84DFG5TYMeCkCbM56sY= -layeh.com/gumble v0.0.0-20200818122324-146f9205029b/go.mod h1:tWPVA9ZAfImNwabjcd9uDE+Mtz0Hfs7a7G3vxrnrwyc= +layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14 h1:wY8eeq7DpM5iAugNbFrvuhdtmN8XM1iU+Ki5YZWjukg= +layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14/go.mod h1:tWPVA9ZAfImNwabjcd9uDE+Mtz0Hfs7a7G3vxrnrwyc= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= @@ -2639,8 +2653,8 @@ modernc.org/libc v1.11.98/go.mod h1:ynK5sbjsU77AP+nn61+k+wxUGRx9rOFcIqWYYMaDZ4c= modernc.org/libc v1.11.99/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI= modernc.org/libc v1.11.101/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI= modernc.org/libc v1.11.104/go.mod h1:2MH3DaF/gCU8i/UBiVE1VFRos4o523M7zipmwH8SIgQ= -modernc.org/libc v1.21.5 h1:xBkU9fnHV+hvZuPSRszN0AXDG4M7nwPLwTWwkYcvLCI= -modernc.org/libc v1.21.5/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/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= @@ -2660,8 +2674,8 @@ modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs= modernc.org/sqlite v1.14.3/go.mod h1:xMpicS1i2MJ4C8+Ap0vYBqTwYfpFvdnPE6brbFOtV2Y= -modernc.org/sqlite v1.19.5 h1:E3iHL55c1Vw1knqIeU9N7B0fSjuiOjHZo7iVMsO6U5U= -modernc.org/sqlite v1.19.5/go.mod h1:EsYz8rfOvLCiYTy5ZFsOYzoCcRMu98YYkwAcCw5YIYw= +modernc.org/sqlite v1.20.3 h1:SqGJMMxjj1PHusLxdYxeQSodg7Jxn9WWkaAQjKrntZs= +modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= diff --git a/vendor/github.com/bwmarrin/discordgo/components.go b/vendor/github.com/bwmarrin/discordgo/components.go index 6ee4e289..a5f86b34 100644 --- a/vendor/github.com/bwmarrin/discordgo/components.go +++ b/vendor/github.com/bwmarrin/discordgo/components.go @@ -10,10 +10,14 @@ type ComponentType uint // MessageComponent types. const ( - ActionsRowComponent ComponentType = 1 - ButtonComponent ComponentType = 2 - SelectMenuComponent ComponentType = 3 - TextInputComponent ComponentType = 4 + ActionsRowComponent ComponentType = 1 + ButtonComponent ComponentType = 2 + SelectMenuComponent ComponentType = 3 + TextInputComponent ComponentType = 4 + UserSelectMenuComponent ComponentType = 5 + RoleSelectMenuComponent ComponentType = 6 + MentionableSelectMenuComponent ComponentType = 7 + ChannelSelectMenuComponent ComponentType = 8 ) // MessageComponent is a base interface for all message components. @@ -41,7 +45,8 @@ func (umc *unmarshalableMessageComponent) UnmarshalJSON(src []byte) error { umc.MessageComponent = &ActionsRow{} case ButtonComponent: umc.MessageComponent = &Button{} - case SelectMenuComponent: + case SelectMenuComponent, ChannelSelectMenuComponent, UserSelectMenuComponent, + RoleSelectMenuComponent, MentionableSelectMenuComponent: umc.MessageComponent = &SelectMenu{} case TextInputComponent: umc.MessageComponent = &TextInput{} @@ -169,8 +174,23 @@ type SelectMenuOption struct { Default bool `json:"default"` } +// SelectMenuType represents select menu type. +type SelectMenuType ComponentType + +// SelectMenu types. +const ( + StringSelectMenu = SelectMenuType(SelectMenuComponent) + UserSelectMenu = SelectMenuType(UserSelectMenuComponent) + RoleSelectMenu = SelectMenuType(RoleSelectMenuComponent) + MentionableSelectMenu = SelectMenuType(MentionableSelectMenuComponent) + ChannelSelectMenu = SelectMenuType(ChannelSelectMenuComponent) +) + // SelectMenu represents select menu component. type SelectMenu struct { + // Type of the select menu. + MenuType SelectMenuType `json:"type,omitempty"` + // CustomID is a developer-defined identifier for the select menu. CustomID string `json:"custom_id,omitempty"` // The text which will be shown in the menu if there's no default options or all options was deselected and component was closed. Placeholder string `json:"placeholder"` @@ -179,25 +199,31 @@ type SelectMenu struct { // This value determines the maximal amount of selected items in the menu. // If MaxValues or MinValues are greater than one then the user can select multiple items in the component. MaxValues int `json:"max_values,omitempty"` - Options []SelectMenuOption `json:"options"` + Options []SelectMenuOption `json:"options,omitempty"` Disabled bool `json:"disabled"` + + // NOTE: Can only be used in SelectMenu with Channel menu type. + ChannelTypes []ChannelType `json:"channel_types,omitempty"` } // Type is a method to get the type of a component. -func (SelectMenu) Type() ComponentType { +func (s SelectMenu) Type() ComponentType { + if s.MenuType != 0 { + return ComponentType(s.MenuType) + } return SelectMenuComponent } // MarshalJSON is a method for marshaling SelectMenu to a JSON object. -func (m SelectMenu) MarshalJSON() ([]byte, error) { +func (s SelectMenu) MarshalJSON() ([]byte, error) { type selectMenu SelectMenu return Marshal(struct { selectMenu Type ComponentType `json:"type"` }{ - selectMenu: selectMenu(m), - Type: m.Type(), + selectMenu: selectMenu(s), + Type: s.Type(), }) } diff --git a/vendor/github.com/bwmarrin/discordgo/discord.go b/vendor/github.com/bwmarrin/discordgo/discord.go index fc7b6d7a..0b571764 100644 --- a/vendor/github.com/bwmarrin/discordgo/discord.go +++ b/vendor/github.com/bwmarrin/discordgo/discord.go @@ -22,7 +22,7 @@ import ( ) // VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/) -const VERSION = "0.26.1" +const VERSION = "0.27.0" // New creates a new Discord session with provided token. // If the token is for a bot, it must be prefixed with "Bot " diff --git a/vendor/github.com/bwmarrin/discordgo/endpoints.go b/vendor/github.com/bwmarrin/discordgo/endpoints.go index 375b75b5..a2a05fe3 100644 --- a/vendor/github.com/bwmarrin/discordgo/endpoints.go +++ b/vendor/github.com/bwmarrin/discordgo/endpoints.go @@ -60,11 +60,12 @@ var ( return EndpointCDNBanners + uID + "/" + cID + ".gif" } - EndpointUserGuilds = func(uID string) string { return EndpointUsers + uID + "/guilds" } - EndpointUserGuild = func(uID, gID string) string { return EndpointUsers + uID + "/guilds/" + gID } - EndpointUserGuildMember = func(uID, gID string) string { return EndpointUserGuild(uID, gID) + "/member" } - EndpointUserChannels = func(uID string) string { return EndpointUsers + uID + "/channels" } - EndpointUserConnections = func(uID string) string { return EndpointUsers + uID + "/connections" } + EndpointUserGuilds = func(uID string) string { return EndpointUsers + uID + "/guilds" } + EndpointUserGuild = func(uID, gID string) string { return EndpointUsers + uID + "/guilds/" + gID } + EndpointUserGuildMember = func(uID, gID string) string { return EndpointUserGuild(uID, gID) + "/member" } + EndpointUserChannels = func(uID string) string { return EndpointUsers + uID + "/channels" } + EndpointUserApplicationRoleConnection = func(aID string) string { return EndpointUsers + "@me/applications/" + aID + "/role-connection" } + EndpointUserConnections = func(uID string) string { return EndpointUsers + uID + "/connections" } EndpointGuild = func(gID string) string { return EndpointGuilds + gID } EndpointGuildAutoModeration = func(gID string) string { return EndpointGuild(gID) + "/auto-moderation" } @@ -96,6 +97,7 @@ var ( EndpointGuildEmojis = func(gID string) string { return EndpointGuilds + gID + "/emojis" } EndpointGuildEmoji = func(gID, eID string) string { return EndpointGuilds + gID + "/emojis/" + eID } EndpointGuildBanner = func(gID, hash string) string { return EndpointCDNBanners + gID + "/" + hash + ".png" } + EndpointGuildBannerAnimated = func(gID, hash string) string { return EndpointCDNBanners + gID + "/" + hash + ".gif" } EndpointGuildStickers = func(gID string) string { return EndpointGuilds + gID + "/stickers" } EndpointGuildSticker = func(gID, sID string) string { return EndpointGuilds + gID + "/stickers/" + sID } EndpointStageInstance = func(cID string) string { return EndpointStageInstances + "/" + cID } @@ -197,8 +199,9 @@ var ( EndpointEmoji = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".png" } EndpointEmojiAnimated = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".gif" } - EndpointApplications = EndpointAPI + "applications" - EndpointApplication = func(aID string) string { return EndpointApplications + "/" + aID } + EndpointApplications = EndpointAPI + "applications" + EndpointApplication = func(aID string) string { return EndpointApplications + "/" + aID } + EndpointApplicationRoleConnectionMetadata = func(aID string) string { return EndpointApplication(aID) + "/role-connections/metadata" } EndpointOAuth2 = EndpointAPI + "oauth2/" EndpointOAuth2Applications = EndpointOAuth2 + "applications" diff --git a/vendor/github.com/bwmarrin/discordgo/events.go b/vendor/github.com/bwmarrin/discordgo/events.go index e5d83b9b..6608ab6e 100644 --- a/vendor/github.com/bwmarrin/discordgo/events.go +++ b/vendor/github.com/bwmarrin/discordgo/events.go @@ -36,13 +36,13 @@ type Event struct { // A Ready stores all data for the websocket READY event. type Ready struct { - Version int `json:"v"` - SessionID string `json:"session_id"` - User *User `json:"user"` - Guilds []*Guild `json:"guilds"` - PrivateChannels []*Channel `json:"private_channels"` - - // TODO: Application and Shard + Version int `json:"v"` + SessionID string `json:"session_id"` + User *User `json:"user"` + Shard *[2]int `json:"shard"` + Application *Application `json:"application"` + Guilds []*Guild `json:"guilds"` + PrivateChannels []*Channel `json:"private_channels"` } // ChannelCreate is the data for a ChannelCreate event. @@ -150,6 +150,7 @@ type GuildMemberAdd struct { // GuildMemberUpdate is the data for a GuildMemberUpdate event. type GuildMemberUpdate struct { *Member + BeforeUpdate *Member `json:"-"` } // GuildMemberRemove is the data for a GuildMemberRemove event. diff --git a/vendor/github.com/bwmarrin/discordgo/interactions.go b/vendor/github.com/bwmarrin/discordgo/interactions.go index 61a4e992..627e0c38 100644 --- a/vendor/github.com/bwmarrin/discordgo/interactions.go +++ b/vendor/github.com/bwmarrin/discordgo/interactions.go @@ -42,6 +42,7 @@ type ApplicationCommand struct { DefaultPermission *bool `json:"default_permission,omitempty"` DefaultMemberPermissions *int64 `json:"default_member_permissions,string,omitempty"` DMPermission *bool `json:"dm_permission,omitempty"` + NSFW *bool `json:"nsfw,omitempty"` // NOTE: Chat commands only. Otherwise it mustn't be set. @@ -343,13 +344,22 @@ func (ApplicationCommandInteractionData) Type() InteractionType { // MessageComponentInteractionData contains the data of message component interaction. type MessageComponentInteractionData struct { - CustomID string `json:"custom_id"` - ComponentType ComponentType `json:"component_type"` + CustomID string `json:"custom_id"` + ComponentType ComponentType `json:"component_type"` + Resolved MessageComponentInteractionDataResolved `json:"resolved"` // NOTE: Only filled when ComponentType is SelectMenuComponent (3). Otherwise is nil. Values []string `json:"values"` } +// MessageComponentInteractionDataResolved contains the resolved data of selected option. +type MessageComponentInteractionDataResolved struct { + Users map[string]*User `json:"users"` + Members map[string]*Member `json:"members"` + Roles map[string]*Role `json:"roles"` + Channels map[string]*Channel `json:"channels"` +} + // Type returns the type of interaction data. func (MessageComponentInteractionData) Type() InteractionType { return InteractionMessageComponent @@ -472,7 +482,7 @@ func (o ApplicationCommandInteractionDataOption) RoleValue(s *Session, gID strin return &Role{ID: roleID} } - r, err := s.State.Role(roleID, gID) + r, err := s.State.Role(gID, roleID) if err != nil { roles, err := s.GuildRoles(gID) if err == nil { diff --git a/vendor/github.com/bwmarrin/discordgo/message.go b/vendor/github.com/bwmarrin/discordgo/message.go index 1ba6e445..fec6f879 100644 --- a/vendor/github.com/bwmarrin/discordgo/message.go +++ b/vendor/github.com/bwmarrin/discordgo/message.go @@ -249,6 +249,10 @@ type MessageEdit struct { Embeds []*MessageEmbed `json:"embeds"` AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"` Flags MessageFlags `json:"flags,omitempty"` + // Files to append to the message + Files []*File `json:"-"` + // Overwrite existing attachments + Attachments *[]*MessageAttachment `json:"attachments,omitempty"` ID string Channel string @@ -385,8 +389,8 @@ type MessageEmbedAuthor struct { // MessageEmbedField is a part of a MessageEmbed struct. type MessageEmbedField struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` + Name string `json:"name"` + Value string `json:"value"` Inline bool `json:"inline,omitempty"` } diff --git a/vendor/github.com/bwmarrin/discordgo/restapi.go b/vendor/github.com/bwmarrin/discordgo/restapi.go index 79af4680..b7d323e7 100644 --- a/vendor/github.com/bwmarrin/discordgo/restapi.go +++ b/vendor/github.com/bwmarrin/discordgo/restapi.go @@ -26,6 +26,8 @@ import ( "strconv" "strings" "time" + + "context" ) // All error constants @@ -92,13 +94,82 @@ func (e RateLimitError) Error() string { return "Rate limit exceeded on " + e.URL + ", retry after " + e.RetryAfter.String() } +// RequestConfig is an HTTP request configuration. +type RequestConfig struct { + Request *http.Request + ShouldRetryOnRateLimit bool + MaxRestRetries int + Client *http.Client +} + +// newRequestConfig returns a new HTTP request configuration based on parameters in Session. +func newRequestConfig(s *Session, req *http.Request) *RequestConfig { + return &RequestConfig{ + ShouldRetryOnRateLimit: s.ShouldRetryOnRateLimit, + MaxRestRetries: s.MaxRestRetries, + Client: s.Client, + Request: req, + } +} + +// RequestOption is a function which mutates request configuration. +// It can be supplied as an argument to any REST method. +type RequestOption func(cfg *RequestConfig) + +// WithClient changes the HTTP client used for the request. +func WithClient(client *http.Client) RequestOption { + return func(cfg *RequestConfig) { + if client != nil { + cfg.Client = client + } + } +} + +// WithRetryOnRatelimit controls whether session will retry the request on rate limit. +func WithRetryOnRatelimit(retry bool) RequestOption { + return func(cfg *RequestConfig) { + cfg.ShouldRetryOnRateLimit = retry + } +} + +// WithRestRetries changes maximum amount of retries if request fails. +func WithRestRetries(max int) RequestOption { + return func(cfg *RequestConfig) { + cfg.MaxRestRetries = max + } +} + +// WithHeader sets a header in the request. +func WithHeader(key, value string) RequestOption { + return func(cfg *RequestConfig) { + cfg.Request.Header.Set(key, value) + } +} + +// WithAuditLogReason changes audit log reason associated with the request. +func WithAuditLogReason(reason string) RequestOption { + return WithHeader("X-Audit-Log-Reason", reason) +} + +// WithLocale changes accepted locale of the request. +func WithLocale(locale Locale) RequestOption { + return WithHeader("X-Discord-Locale", string(locale)) +} + +// WithContext changes context of the request. +func WithContext(ctx context.Context) RequestOption { + return func(cfg *RequestConfig) { + cfg.Request = cfg.Request.WithContext(ctx) + } +} + // Request is the same as RequestWithBucketID but the bucket id is the same as the urlStr -func (s *Session) Request(method, urlStr string, data interface{}) (response []byte, err error) { - return s.RequestWithBucketID(method, urlStr, data, strings.SplitN(urlStr, "?", 2)[0]) +func (s *Session) Request(method, urlStr string, data interface{}, options ...RequestOption) (response []byte, err error) { + return s.RequestWithBucketID(method, urlStr, data, strings.SplitN(urlStr, "?", 2)[0], options...) } // RequestWithBucketID makes a (GET/POST/...) Requests to Discord REST API with JSON data. -func (s *Session) RequestWithBucketID(method, urlStr string, data interface{}, bucketID string) (response []byte, err error) { +func (s *Session) RequestWithBucketID(method, urlStr string, data interface{}, bucketID string, options ...RequestOption) (response []byte, err error) { var body []byte if data != nil { body, err = Marshal(data) @@ -107,21 +178,21 @@ func (s *Session) RequestWithBucketID(method, urlStr string, data interface{}, b } } - return s.request(method, urlStr, "application/json", body, bucketID, 0) + return s.request(method, urlStr, "application/json", body, bucketID, 0, options...) } // request makes a (GET/POST/...) Requests to Discord REST API. // Sequence is the sequence number, if it fails with a 502 it will // retry with sequence+1 until it either succeeds or sequence >= session.MaxRestRetries -func (s *Session) request(method, urlStr, contentType string, b []byte, bucketID string, sequence int) (response []byte, err error) { +func (s *Session) request(method, urlStr, contentType string, b []byte, bucketID string, sequence int, options ...RequestOption) (response []byte, err error) { if bucketID == "" { bucketID = strings.SplitN(urlStr, "?", 2)[0] } - return s.RequestWithLockedBucket(method, urlStr, contentType, b, s.Ratelimiter.LockBucket(bucketID), sequence) + return s.RequestWithLockedBucket(method, urlStr, contentType, b, s.Ratelimiter.LockBucket(bucketID), sequence, options...) } // RequestWithLockedBucket makes a request using a bucket that's already been locked -func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b []byte, bucket *Bucket, sequence int) (response []byte, err error) { +func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b []byte, bucket *Bucket, sequence int, options ...RequestOption) (response []byte, err error) { if s.Debug { log.Printf("API REQUEST %8s :: %s\n", method, urlStr) log.Printf("API REQUEST PAYLOAD :: [%s]\n", string(b)) @@ -148,13 +219,18 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b // TODO: Make a configurable static variable. req.Header.Set("User-Agent", s.UserAgent) + cfg := newRequestConfig(s, req) + for _, opt := range options { + opt(cfg) + } + if s.Debug { for k, v := range req.Header { log.Printf("API REQUEST HEADER :: [%s] = %+v\n", k, v) } } - resp, err := s.Client.Do(req) + resp, err := cfg.Client.Do(req) if err != nil { bucket.Release(nil) return @@ -191,10 +267,10 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b case http.StatusNoContent: case http.StatusBadGateway: // Retry sending request if possible - if sequence < s.MaxRestRetries { + if sequence < cfg.MaxRestRetries { s.log(LogInformational, "%s Failed (%s), Retrying...", urlStr, resp.Status) - response, err = s.RequestWithLockedBucket(method, urlStr, contentType, b, s.Ratelimiter.LockBucketObject(bucket), sequence+1) + response, err = s.RequestWithLockedBucket(method, urlStr, contentType, b, s.Ratelimiter.LockBucketObject(bucket), sequence+1, options...) } else { err = fmt.Errorf("Exceeded Max retries HTTP %s, %s", resp.Status, response) } @@ -206,7 +282,7 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b return } - if s.ShouldRetryOnRateLimit { + if cfg.ShouldRetryOnRateLimit { s.log(LogInformational, "Rate Limiting %s, retry in %v", urlStr, rl.RetryAfter) s.handleEvent(rateLimitEventType, &RateLimit{TooManyRequests: &rl, URL: urlStr}) @@ -214,7 +290,7 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b // we can make the above smarter // this method can cause longer delays than required - response, err = s.RequestWithLockedBucket(method, urlStr, contentType, b, s.Ratelimiter.LockBucketObject(bucket), sequence) + response, err = s.RequestWithLockedBucket(method, urlStr, contentType, b, s.Ratelimiter.LockBucketObject(bucket), sequence, options...) } else { err = &RateLimitError{&RateLimit{TooManyRequests: &rl, URL: urlStr}} } @@ -246,9 +322,9 @@ func unmarshal(data []byte, v interface{}) error { // User returns the user details of the given userID // userID : A user ID or "@me" which is a shortcut of current user ID -func (s *Session) User(userID string) (st *User, err error) { +func (s *Session) User(userID string, options ...RequestOption) (st *User, err error) { - body, err := s.RequestWithBucketID("GET", EndpointUser(userID), nil, EndpointUsers) + body, err := s.RequestWithBucketID("GET", EndpointUser(userID), nil, EndpointUsers, options...) if err != nil { return } @@ -259,19 +335,19 @@ func (s *Session) User(userID string) (st *User, err error) { // UserAvatar is deprecated. Please use UserAvatarDecode // userID : A user ID or "@me" which is a shortcut of current user ID -func (s *Session) UserAvatar(userID string) (img image.Image, err error) { - u, err := s.User(userID) +func (s *Session) UserAvatar(userID string, options ...RequestOption) (img image.Image, err error) { + u, err := s.User(userID, options...) if err != nil { return } - img, err = s.UserAvatarDecode(u) + img, err = s.UserAvatarDecode(u, options...) return } // UserAvatarDecode returns an image.Image of a user's Avatar // user : The user which avatar should be retrieved -func (s *Session) UserAvatarDecode(u *User) (img image.Image, err error) { - body, err := s.RequestWithBucketID("GET", EndpointUserAvatar(u.ID, u.Avatar), nil, EndpointUserAvatar("", "")) +func (s *Session) UserAvatarDecode(u *User, options ...RequestOption) (img image.Image, err error) { + body, err := s.RequestWithBucketID("GET", EndpointUserAvatar(u.ID, u.Avatar), nil, EndpointUserAvatar("", ""), options...) if err != nil { return } @@ -281,7 +357,7 @@ func (s *Session) UserAvatarDecode(u *User) (img image.Image, err error) { } // UserUpdate updates current user settings. -func (s *Session) UserUpdate(username, avatar string) (st *User, err error) { +func (s *Session) UserUpdate(username, avatar string, options ...RequestOption) (st *User, err error) { // NOTE: Avatar must be either the hash/id of existing Avatar or // data:image/png;base64,BASE64_STRING_OF_NEW_AVATAR_PNG @@ -293,7 +369,7 @@ func (s *Session) UserUpdate(username, avatar string) (st *User, err error) { Avatar string `json:"avatar,omitempty"` }{username, avatar} - body, err := s.RequestWithBucketID("PATCH", EndpointUser("@me"), data, EndpointUsers) + body, err := s.RequestWithBucketID("PATCH", EndpointUser("@me"), data, EndpointUsers, options...) if err != nil { return } @@ -303,8 +379,8 @@ func (s *Session) UserUpdate(username, avatar string) (st *User, err error) { } // UserConnections returns the user's connections -func (s *Session) UserConnections() (conn []*UserConnection, err error) { - response, err := s.RequestWithBucketID("GET", EndpointUserConnections("@me"), nil, EndpointUserConnections("@me")) +func (s *Session) UserConnections(options ...RequestOption) (conn []*UserConnection, err error) { + response, err := s.RequestWithBucketID("GET", EndpointUserConnections("@me"), nil, EndpointUserConnections("@me"), options...) if err != nil { return nil, err } @@ -319,13 +395,13 @@ func (s *Session) UserConnections() (conn []*UserConnection, err error) { // UserChannelCreate creates a new User (Private) Channel with another User // recipientID : A user ID for the user to which this channel is opened with. -func (s *Session) UserChannelCreate(recipientID string) (st *Channel, err error) { +func (s *Session) UserChannelCreate(recipientID string, options ...RequestOption) (st *Channel, err error) { data := struct { RecipientID string `json:"recipient_id"` }{recipientID} - body, err := s.RequestWithBucketID("POST", EndpointUserChannels("@me"), data, EndpointUserChannels("")) + body, err := s.RequestWithBucketID("POST", EndpointUserChannels("@me"), data, EndpointUserChannels(""), options...) if err != nil { return } @@ -336,8 +412,8 @@ func (s *Session) UserChannelCreate(recipientID string) (st *Channel, err error) // UserGuildMember returns a guild member object for the current user in the given Guild. // guildID : ID of the guild -func (s *Session) UserGuildMember(guildID string) (st *Member, err error) { - body, err := s.RequestWithBucketID("GET", EndpointUserGuildMember("@me", guildID), nil, EndpointUserGuildMember("@me", guildID)) +func (s *Session) UserGuildMember(guildID string, options ...RequestOption) (st *Member, err error) { + body, err := s.RequestWithBucketID("GET", EndpointUserGuildMember("@me", guildID), nil, EndpointUserGuildMember("@me", guildID), options...) if err != nil { return } @@ -350,7 +426,7 @@ func (s *Session) UserGuildMember(guildID string) (st *Member, err error) { // limit : The number guilds that can be returned. (max 100) // beforeID : If provided all guilds returned will be before given ID. // afterID : If provided all guilds returned will be after given ID. -func (s *Session) UserGuilds(limit int, beforeID, afterID string) (st []*UserGuild, err error) { +func (s *Session) UserGuilds(limit int, beforeID, afterID string, options ...RequestOption) (st []*UserGuild, err error) { v := url.Values{} @@ -370,7 +446,7 @@ func (s *Session) UserGuilds(limit int, beforeID, afterID string) (st []*UserGui uri += "?" + v.Encode() } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointUserGuilds("")) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointUserGuilds(""), options...) if err != nil { return } @@ -380,12 +456,13 @@ func (s *Session) UserGuilds(limit int, beforeID, afterID string) (st []*UserGui } // UserChannelPermissions returns the permission of a user in a channel. -// userID : The ID of the user to calculate permissions for. -// channelID : The ID of the channel to calculate permission for. +// userID : The ID of the user to calculate permissions for. +// channelID : The ID of the channel to calculate permission for. +// fetchOptions : Options used to fetch guild, member or channel if they are not present in state. // // NOTE: This function is now deprecated and will be removed in the future. // Please see the same function inside state.go -func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions int64, err error) { +func (s *Session) UserChannelPermissions(userID, channelID string, fetchOptions ...RequestOption) (apermissions int64, err error) { // Try to just get permissions from state. apermissions, err = s.State.UserChannelPermissions(userID, channelID) if err == nil { @@ -395,7 +472,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions // Otherwise try get as much data from state as possible, falling back to the network. channel, err := s.State.Channel(channelID) if err != nil || channel == nil { - channel, err = s.Channel(channelID) + channel, err = s.Channel(channelID, fetchOptions...) if err != nil { return } @@ -403,7 +480,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions guild, err := s.State.Guild(channel.GuildID) if err != nil || guild == nil { - guild, err = s.Guild(channel.GuildID) + guild, err = s.Guild(channel.GuildID, fetchOptions...) if err != nil { return } @@ -416,7 +493,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions member, err := s.State.Member(guild.ID, userID) if err != nil || member == nil { - member, err = s.GuildMember(guild.ID, userID) + member, err = s.GuildMember(guild.ID, userID, fetchOptions...) if err != nil { return } @@ -498,8 +575,8 @@ func memberPermissions(guild *Guild, channel *Channel, userID string, roles []st // Guild returns a Guild structure of a specific Guild. // guildID : The ID of a Guild -func (s *Session) Guild(guildID string) (st *Guild, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuild(guildID), nil, EndpointGuild(guildID)) +func (s *Session) Guild(guildID string, options ...RequestOption) (st *Guild, err error) { + body, err := s.RequestWithBucketID("GET", EndpointGuild(guildID), nil, EndpointGuild(guildID), options...) if err != nil { return } @@ -510,9 +587,9 @@ func (s *Session) Guild(guildID string) (st *Guild, err error) { // GuildWithCounts returns a Guild structure of a specific Guild with approximate member and presence counts. // guildID : The ID of a Guild -func (s *Session) GuildWithCounts(guildID string) (st *Guild, err error) { +func (s *Session) GuildWithCounts(guildID string, options ...RequestOption) (st *Guild, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuild(guildID)+"?with_counts=true", nil, EndpointGuild(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuild(guildID)+"?with_counts=true", nil, EndpointGuild(guildID), options...) if err != nil { return } @@ -523,8 +600,8 @@ func (s *Session) GuildWithCounts(guildID string) (st *Guild, err error) { // GuildPreview returns a GuildPreview structure of a specific public Guild. // guildID : The ID of a Guild -func (s *Session) GuildPreview(guildID string) (st *GuildPreview, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildPreview(guildID), nil, EndpointGuildPreview(guildID)) +func (s *Session) GuildPreview(guildID string, options ...RequestOption) (st *GuildPreview, err error) { + body, err := s.RequestWithBucketID("GET", EndpointGuildPreview(guildID), nil, EndpointGuildPreview(guildID), options...) if err != nil { return } @@ -535,13 +612,13 @@ func (s *Session) GuildPreview(guildID string) (st *GuildPreview, err error) { // GuildCreate creates a new Guild // name : A name for the Guild (2-100 characters) -func (s *Session) GuildCreate(name string) (st *Guild, err error) { +func (s *Session) GuildCreate(name string, options ...RequestOption) (st *Guild, err error) { data := struct { Name string `json:"name"` }{name} - body, err := s.RequestWithBucketID("POST", EndpointGuildCreate, data, EndpointGuildCreate) + body, err := s.RequestWithBucketID("POST", EndpointGuildCreate, data, EndpointGuildCreate, options...) if err != nil { return } @@ -553,7 +630,7 @@ func (s *Session) GuildCreate(name string) (st *Guild, err error) { // GuildEdit edits a new Guild // guildID : The ID of a Guild // g : A GuildParams struct with the values Name, Region and VerificationLevel defined. -func (s *Session) GuildEdit(guildID string, g *GuildParams) (st *Guild, err error) { +func (s *Session) GuildEdit(guildID string, g *GuildParams, options ...RequestOption) (st *Guild, err error) { // Bounds checking for VerificationLevel, interval: [0, 4] if g.VerificationLevel != nil { @@ -567,7 +644,7 @@ func (s *Session) GuildEdit(guildID string, g *GuildParams) (st *Guild, err erro // Bounds checking for regions if g.Region != "" { isValid := false - regions, _ := s.VoiceRegions() + regions, _ := s.VoiceRegions(options...) for _, r := range regions { if g.Region == r.ID { isValid = true @@ -583,7 +660,7 @@ func (s *Session) GuildEdit(guildID string, g *GuildParams) (st *Guild, err erro } } - body, err := s.RequestWithBucketID("PATCH", EndpointGuild(guildID), g, EndpointGuild(guildID)) + body, err := s.RequestWithBucketID("PATCH", EndpointGuild(guildID), g, EndpointGuild(guildID), options...) if err != nil { return } @@ -594,9 +671,9 @@ func (s *Session) GuildEdit(guildID string, g *GuildParams) (st *Guild, err erro // GuildDelete deletes a Guild. // guildID : The ID of a Guild -func (s *Session) GuildDelete(guildID string) (st *Guild, err error) { +func (s *Session) GuildDelete(guildID string, options ...RequestOption) (st *Guild, err error) { - body, err := s.RequestWithBucketID("DELETE", EndpointGuild(guildID), nil, EndpointGuild(guildID)) + body, err := s.RequestWithBucketID("DELETE", EndpointGuild(guildID), nil, EndpointGuild(guildID), options...) if err != nil { return } @@ -607,18 +684,18 @@ func (s *Session) GuildDelete(guildID string) (st *Guild, err error) { // GuildLeave leaves a Guild. // guildID : The ID of a Guild -func (s *Session) GuildLeave(guildID string) (err error) { +func (s *Session) GuildLeave(guildID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointUserGuild("@me", guildID), nil, EndpointUserGuild("", guildID)) + _, err = s.RequestWithBucketID("DELETE", EndpointUserGuild("@me", guildID), nil, EndpointUserGuild("", guildID), options...) return } // GuildBans returns an array of GuildBan structures for bans in the given guild. -// guildID : The ID of a Guild -// limit : Max number of bans to return (max 1000) -// beforeID : If not empty all returned users will be after the given id -// afterID : If not empty all returned users will be before the given id -func (s *Session) GuildBans(guildID string, limit int, beforeID, afterID string) (st []*GuildBan, err error) { +// guildID : The ID of a Guild +// limit : Max number of bans to return (max 1000) +// beforeID : If not empty all returned users will be after the given id +// afterID : If not empty all returned users will be before the given id +func (s *Session) GuildBans(guildID string, limit int, beforeID, afterID string, options ...RequestOption) (st []*GuildBan, err error) { uri := EndpointGuildBans(guildID) v := url.Values{} @@ -636,7 +713,7 @@ func (s *Session) GuildBans(guildID string, limit int, beforeID, afterID string) uri += "?" + v.Encode() } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildBans(guildID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildBans(guildID), options...) if err != nil { return } @@ -650,14 +727,14 @@ func (s *Session) GuildBans(guildID string, limit int, beforeID, afterID string) // guildID : The ID of a Guild. // userID : The ID of a User // days : The number of days of previous comments to delete. -func (s *Session) GuildBanCreate(guildID, userID string, days int) (err error) { - return s.GuildBanCreateWithReason(guildID, userID, "", days) +func (s *Session) GuildBanCreate(guildID, userID string, days int, options ...RequestOption) (err error) { + return s.GuildBanCreateWithReason(guildID, userID, "", days, options...) } // GuildBan finds ban by given guild and user id and returns GuildBan structure -func (s *Session) GuildBan(guildID, userID string) (st *GuildBan, err error) { +func (s *Session) GuildBan(guildID, userID string, options ...RequestOption) (st *GuildBan, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildBan(guildID, userID), nil, EndpointGuildBan(guildID, userID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildBan(guildID, userID), nil, EndpointGuildBan(guildID, userID), options...) if err != nil { return } @@ -672,7 +749,7 @@ func (s *Session) GuildBan(guildID, userID string) (st *GuildBan, err error) { // userID : The ID of a User // reason : The reason for this ban // days : The number of days of previous comments to delete. -func (s *Session) GuildBanCreateWithReason(guildID, userID, reason string, days int) (err error) { +func (s *Session) GuildBanCreateWithReason(guildID, userID, reason string, days int, options ...RequestOption) (err error) { uri := EndpointGuildBan(guildID, userID) @@ -688,24 +765,24 @@ func (s *Session) GuildBanCreateWithReason(guildID, userID, reason string, days uri += "?" + queryParams.Encode() } - _, err = s.RequestWithBucketID("PUT", uri, nil, EndpointGuildBan(guildID, "")) + _, err = s.RequestWithBucketID("PUT", uri, nil, EndpointGuildBan(guildID, ""), options...) return } // GuildBanDelete removes the given user from the guild bans // guildID : The ID of a Guild. // userID : The ID of a User -func (s *Session) GuildBanDelete(guildID, userID string) (err error) { +func (s *Session) GuildBanDelete(guildID, userID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildBan(guildID, userID), nil, EndpointGuildBan(guildID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointGuildBan(guildID, userID), nil, EndpointGuildBan(guildID, ""), options...) return } // GuildMembers returns a list of members for a guild. -// guildID : The ID of a Guild. -// after : The id of the member to return members after -// limit : max number of members to return (max 1000) -func (s *Session) GuildMembers(guildID string, after string, limit int) (st []*Member, err error) { +// guildID : The ID of a Guild. +// after : The id of the member to return members after +// limit : max number of members to return (max 1000) +func (s *Session) GuildMembers(guildID string, after string, limit int, options ...RequestOption) (st []*Member, err error) { uri := EndpointGuildMembers(guildID) @@ -723,7 +800,7 @@ func (s *Session) GuildMembers(guildID string, after string, limit int) (st []*M uri += "?" + v.Encode() } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildMembers(guildID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildMembers(guildID), options...) if err != nil { return } @@ -736,7 +813,7 @@ func (s *Session) GuildMembers(guildID string, after string, limit int) (st []*M // guildID : The ID of a Guild // query : Query string to match username(s) and nickname(s) against // limit : Max number of members to return (default 1, min 1, max 1000) -func (s *Session) GuildMembersSearch(guildID, query string, limit int) (st []*Member, err error) { +func (s *Session) GuildMembersSearch(guildID, query string, limit int, options ...RequestOption) (st []*Member, err error) { uri := EndpointGuildMembersSearch(guildID) @@ -746,7 +823,7 @@ func (s *Session) GuildMembersSearch(guildID, query string, limit int) (st []*Me queryParams.Set("limit", strconv.Itoa(limit)) } - body, err := s.RequestWithBucketID("GET", uri+"?"+queryParams.Encode(), nil, uri) + body, err := s.RequestWithBucketID("GET", uri+"?"+queryParams.Encode(), nil, uri, options...) if err != nil { return } @@ -756,11 +833,11 @@ func (s *Session) GuildMembersSearch(guildID, query string, limit int) (st []*Me } // GuildMember returns a member of a guild. -// guildID : The ID of a Guild. -// userID : The ID of a User -func (s *Session) GuildMember(guildID, userID string) (st *Member, err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User +func (s *Session) GuildMember(guildID, userID string, options ...RequestOption) (st *Member, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildMember(guildID, userID), nil, EndpointGuildMember(guildID, "")) + body, err := s.RequestWithBucketID("GET", EndpointGuildMember(guildID, userID), nil, EndpointGuildMember(guildID, ""), options...) if err != nil { return } @@ -772,12 +849,12 @@ func (s *Session) GuildMember(guildID, userID string) (st *Member, err error) { } // GuildMemberAdd force joins a user to the guild. -// guildID : The ID of a Guild. -// userID : The ID of a User. -// data : Parameters of the user to add. -func (s *Session) GuildMemberAdd(guildID, userID string, data *GuildMemberAddParams) (err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User. +// data : Parameters of the user to add. +func (s *Session) GuildMemberAdd(guildID, userID string, data *GuildMemberAddParams, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("PUT", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("PUT", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) if err != nil { return err } @@ -788,23 +865,23 @@ func (s *Session) GuildMemberAdd(guildID, userID string, data *GuildMemberAddPar // GuildMemberDelete removes the given user from the given guild. // guildID : The ID of a Guild. // userID : The ID of a User -func (s *Session) GuildMemberDelete(guildID, userID string) (err error) { +func (s *Session) GuildMemberDelete(guildID, userID string, options ...RequestOption) (err error) { - return s.GuildMemberDeleteWithReason(guildID, userID, "") + return s.GuildMemberDeleteWithReason(guildID, userID, "", options...) } // GuildMemberDeleteWithReason removes the given user from the given guild. // guildID : The ID of a Guild. // userID : The ID of a User // reason : The reason for the kick -func (s *Session) GuildMemberDeleteWithReason(guildID, userID, reason string) (err error) { +func (s *Session) GuildMemberDeleteWithReason(guildID, userID, reason string, options ...RequestOption) (err error) { uri := EndpointGuildMember(guildID, userID) if reason != "" { uri += "?reason=" + url.QueryEscape(reason) } - _, err = s.RequestWithBucketID("DELETE", uri, nil, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("DELETE", uri, nil, EndpointGuildMember(guildID, ""), options...) return } @@ -812,9 +889,9 @@ func (s *Session) GuildMemberDeleteWithReason(guildID, userID, reason string) (e // guildID : The ID of a Guild. // userID : The ID of a User. // data : Updated GuildMember data. -func (s *Session) GuildMemberEdit(guildID, userID string, data *GuildMemberParams) (st *Member, err error) { +func (s *Session) GuildMemberEdit(guildID, userID string, data *GuildMemberParams, options ...RequestOption) (st *Member, err error) { var body []byte - body, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + body, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) if err != nil { return nil, err } @@ -825,25 +902,27 @@ func (s *Session) GuildMemberEdit(guildID, userID string, data *GuildMemberParam // GuildMemberEditComplex edits the nickname and roles of a member. // NOTE: deprecated, use GuildMemberEdit instead. +// // guildID : The ID of a Guild. // userID : The ID of a User. // data : A GuildMemberEditData struct with the new nickname and roles -func (s *Session) GuildMemberEditComplex(guildID, userID string, data *GuildMemberParams) (st *Member, err error) { - return s.GuildMemberEdit(guildID, userID, data) +func (s *Session) GuildMemberEditComplex(guildID, userID string, data *GuildMemberParams, options ...RequestOption) (st *Member, err error) { + return s.GuildMemberEdit(guildID, userID, data, options...) } // GuildMemberMove moves a guild member from one voice channel to another/none -// guildID : The ID of a Guild. -// userID : The ID of a User. -// channelID : The ID of a channel to move user to or nil to remove from voice channel +// guildID : The ID of a Guild. +// userID : The ID of a User. +// channelID : The ID of a channel to move user to or nil to remove from voice channel +// // NOTE : I am not entirely set on the name of this function and it may change // prior to the final 1.0.0 release of Discordgo -func (s *Session) GuildMemberMove(guildID string, userID string, channelID *string) (err error) { +func (s *Session) GuildMemberMove(guildID string, userID string, channelID *string, options ...RequestOption) (err error) { data := struct { ChannelID *string `json:"channel_id"` }{channelID} - _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) return } @@ -852,7 +931,7 @@ func (s *Session) GuildMemberMove(guildID string, userID string, channelID *stri // userID : The ID of a user // userID : The ID of a user or "@me" which is a shortcut of the current user ID // nickname : The nickname of the member, "" will reset their nickname -func (s *Session) GuildMemberNickname(guildID, userID, nickname string) (err error) { +func (s *Session) GuildMemberNickname(guildID, userID, nickname string, options ...RequestOption) (err error) { data := struct { Nick string `json:"nick"` @@ -862,68 +941,67 @@ func (s *Session) GuildMemberNickname(guildID, userID, nickname string) (err err userID += "/nick" } - _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) return } // GuildMemberMute server mutes a guild member -// guildID : The ID of a Guild. -// userID : The ID of a User. -// mute : boolean value for if the user should be muted -func (s *Session) GuildMemberMute(guildID string, userID string, mute bool) (err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User. +// mute : boolean value for if the user should be muted +func (s *Session) GuildMemberMute(guildID string, userID string, mute bool, options ...RequestOption) (err error) { data := struct { Mute bool `json:"mute"` }{mute} - _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) return } // GuildMemberTimeout times out a guild member -// guildID : The ID of a Guild. -// userID : The ID of a User. -// until : The timestamp for how long a member should be timed out. -// Set to nil to remove timeout. -func (s *Session) GuildMemberTimeout(guildID string, userID string, until *time.Time) (err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User. +// until : The timestamp for how long a member should be timed out. Set to nil to remove timeout. +func (s *Session) GuildMemberTimeout(guildID string, userID string, until *time.Time, options ...RequestOption) (err error) { data := struct { CommunicationDisabledUntil *time.Time `json:"communication_disabled_until"` }{until} - _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) return } // GuildMemberDeafen server deafens a guild member -// guildID : The ID of a Guild. -// userID : The ID of a User. -// deaf : boolean value for if the user should be deafened -func (s *Session) GuildMemberDeafen(guildID string, userID string, deaf bool) (err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User. +// deaf : boolean value for if the user should be deafened +func (s *Session) GuildMemberDeafen(guildID string, userID string, deaf bool, options ...RequestOption) (err error) { data := struct { Deaf bool `json:"deaf"` }{deaf} - _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, "")) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""), options...) return } // GuildMemberRoleAdd adds the specified role to a given member -// guildID : The ID of a Guild. -// userID : The ID of a User. -// roleID : The ID of a Role to be assigned to the user. -func (s *Session) GuildMemberRoleAdd(guildID, userID, roleID string) (err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User. +// roleID : The ID of a Role to be assigned to the user. +func (s *Session) GuildMemberRoleAdd(guildID, userID, roleID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("PUT", EndpointGuildMemberRole(guildID, userID, roleID), nil, EndpointGuildMemberRole(guildID, "", "")) + _, err = s.RequestWithBucketID("PUT", EndpointGuildMemberRole(guildID, userID, roleID), nil, EndpointGuildMemberRole(guildID, "", ""), options...) return } // GuildMemberRoleRemove removes the specified role to a given member -// guildID : The ID of a Guild. -// userID : The ID of a User. -// roleID : The ID of a Role to be removed from the user. -func (s *Session) GuildMemberRoleRemove(guildID, userID, roleID string) (err error) { +// guildID : The ID of a Guild. +// userID : The ID of a User. +// roleID : The ID of a Role to be removed from the user. +func (s *Session) GuildMemberRoleRemove(guildID, userID, roleID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildMemberRole(guildID, userID, roleID), nil, EndpointGuildMemberRole(guildID, "", "")) + _, err = s.RequestWithBucketID("DELETE", EndpointGuildMemberRole(guildID, userID, roleID), nil, EndpointGuildMemberRole(guildID, "", ""), options...) return } @@ -931,9 +1009,9 @@ func (s *Session) GuildMemberRoleRemove(guildID, userID, roleID string) (err err // GuildChannels returns an array of Channel structures for all channels of a // given guild. // guildID : The ID of a Guild. -func (s *Session) GuildChannels(guildID string) (st []*Channel, err error) { +func (s *Session) GuildChannels(guildID string, options ...RequestOption) (st []*Channel, err error) { - body, err := s.request("GET", EndpointGuildChannels(guildID), "", nil, EndpointGuildChannels(guildID), 0) + body, err := s.request("GET", EndpointGuildChannels(guildID), "", nil, EndpointGuildChannels(guildID), 0, options...) if err != nil { return } @@ -960,8 +1038,8 @@ type GuildChannelCreateData struct { // GuildChannelCreateComplex creates a new channel in the given guild // guildID : The ID of a Guild // data : A data struct describing the new Channel, Name and Type are mandatory, other fields depending on the type -func (s *Session) GuildChannelCreateComplex(guildID string, data GuildChannelCreateData) (st *Channel, err error) { - body, err := s.RequestWithBucketID("POST", EndpointGuildChannels(guildID), data, EndpointGuildChannels(guildID)) +func (s *Session) GuildChannelCreateComplex(guildID string, data GuildChannelCreateData, options ...RequestOption) (st *Channel, err error) { + body, err := s.RequestWithBucketID("POST", EndpointGuildChannels(guildID), data, EndpointGuildChannels(guildID), options...) if err != nil { return } @@ -974,17 +1052,17 @@ func (s *Session) GuildChannelCreateComplex(guildID string, data GuildChannelCre // guildID : The ID of a Guild. // name : Name of the channel (2-100 chars length) // ctype : Type of the channel -func (s *Session) GuildChannelCreate(guildID, name string, ctype ChannelType) (st *Channel, err error) { +func (s *Session) GuildChannelCreate(guildID, name string, ctype ChannelType, options ...RequestOption) (st *Channel, err error) { return s.GuildChannelCreateComplex(guildID, GuildChannelCreateData{ Name: name, Type: ctype, - }) + }, options...) } // GuildChannelsReorder updates the order of channels in a guild // guildID : The ID of a Guild. // channels : Updated channels. -func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel) (err error) { +func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel, options ...RequestOption) (err error) { data := make([]struct { ID string `json:"id"` @@ -996,14 +1074,14 @@ func (s *Session) GuildChannelsReorder(guildID string, channels []*Channel) (err data[i].Position = c.Position } - _, err = s.RequestWithBucketID("PATCH", EndpointGuildChannels(guildID), data, EndpointGuildChannels(guildID)) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildChannels(guildID), data, EndpointGuildChannels(guildID), options...) return } // GuildInvites returns an array of Invite structures for the given guild // guildID : The ID of a Guild. -func (s *Session) GuildInvites(guildID string) (st []*Invite, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildInvites(guildID), nil, EndpointGuildInvites(guildID)) +func (s *Session) GuildInvites(guildID string, options ...RequestOption) (st []*Invite, err error) { + body, err := s.RequestWithBucketID("GET", EndpointGuildInvites(guildID), nil, EndpointGuildInvites(guildID), options...) if err != nil { return } @@ -1014,9 +1092,9 @@ func (s *Session) GuildInvites(guildID string) (st []*Invite, err error) { // GuildRoles returns all roles for a given guild. // guildID : The ID of a Guild. -func (s *Session) GuildRoles(guildID string) (st []*Role, err error) { +func (s *Session) GuildRoles(guildID string, options ...RequestOption) (st []*Role, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildRoles(guildID), nil, EndpointGuildRoles(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildRoles(guildID), nil, EndpointGuildRoles(guildID), options...) if err != nil { return } @@ -1029,8 +1107,8 @@ func (s *Session) GuildRoles(guildID string) (st []*Role, err error) { // GuildRoleCreate creates a new Guild Role and returns it. // guildID : The ID of a Guild. // data : New Role parameters. -func (s *Session) GuildRoleCreate(guildID string, data *RoleParams) (st *Role, err error) { - body, err := s.RequestWithBucketID("POST", EndpointGuildRoles(guildID), data, EndpointGuildRoles(guildID)) +func (s *Session) GuildRoleCreate(guildID string, data *RoleParams, options ...RequestOption) (st *Role, err error) { + body, err := s.RequestWithBucketID("POST", EndpointGuildRoles(guildID), data, EndpointGuildRoles(guildID), options...) if err != nil { return } @@ -1044,14 +1122,14 @@ func (s *Session) GuildRoleCreate(guildID string, data *RoleParams) (st *Role, e // guildID : The ID of a Guild. // roleID : The ID of a Role. // data : Updated Role data. -func (s *Session) GuildRoleEdit(guildID, roleID string, data *RoleParams) (st *Role, err error) { +func (s *Session) GuildRoleEdit(guildID, roleID string, data *RoleParams, options ...RequestOption) (st *Role, err error) { // Prevent sending a color int that is too big. if data.Color != nil && *data.Color > 0xFFFFFF { return nil, fmt.Errorf("color value cannot be larger than 0xFFFFFF") } - body, err := s.RequestWithBucketID("PATCH", EndpointGuildRole(guildID, roleID), data, EndpointGuildRole(guildID, "")) + body, err := s.RequestWithBucketID("PATCH", EndpointGuildRole(guildID, roleID), data, EndpointGuildRole(guildID, ""), options...) if err != nil { return } @@ -1064,9 +1142,9 @@ func (s *Session) GuildRoleEdit(guildID, roleID string, data *RoleParams) (st *R // GuildRoleReorder reoders guild roles // guildID : The ID of a Guild. // roles : A list of ordered roles. -func (s *Session) GuildRoleReorder(guildID string, roles []*Role) (st []*Role, err error) { +func (s *Session) GuildRoleReorder(guildID string, roles []*Role, options ...RequestOption) (st []*Role, err error) { - body, err := s.RequestWithBucketID("PATCH", EndpointGuildRoles(guildID), roles, EndpointGuildRoles(guildID)) + body, err := s.RequestWithBucketID("PATCH", EndpointGuildRoles(guildID), roles, EndpointGuildRoles(guildID), options...) if err != nil { return } @@ -1079,9 +1157,9 @@ func (s *Session) GuildRoleReorder(guildID string, roles []*Role) (st []*Role, e // GuildRoleDelete deletes an existing role. // guildID : The ID of a Guild. // roleID : The ID of a Role. -func (s *Session) GuildRoleDelete(guildID, roleID string) (err error) { +func (s *Session) GuildRoleDelete(guildID, roleID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildRole(guildID, roleID), nil, EndpointGuildRole(guildID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointGuildRole(guildID, roleID), nil, EndpointGuildRole(guildID, ""), options...) return } @@ -1090,7 +1168,7 @@ func (s *Session) GuildRoleDelete(guildID, roleID string) (err error) { // Requires 'KICK_MEMBER' permission. // guildID : The ID of a Guild. // days : The number of days to count prune for (1 or more). -func (s *Session) GuildPruneCount(guildID string, days uint32) (count uint32, err error) { +func (s *Session) GuildPruneCount(guildID string, days uint32, options ...RequestOption) (count uint32, err error) { count = 0 if days <= 0 { @@ -1103,7 +1181,7 @@ func (s *Session) GuildPruneCount(guildID string, days uint32) (count uint32, er }{} uri := EndpointGuildPrune(guildID) + "?days=" + strconv.FormatUint(uint64(days), 10) - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildPrune(guildID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildPrune(guildID), options...) if err != nil { return } @@ -1122,7 +1200,7 @@ func (s *Session) GuildPruneCount(guildID string, days uint32) (count uint32, er // Returns an object with one 'pruned' key indicating the number of members that were removed in the prune operation. // guildID : The ID of a Guild. // days : The number of days to count prune for (1 or more). -func (s *Session) GuildPrune(guildID string, days uint32) (count uint32, err error) { +func (s *Session) GuildPrune(guildID string, days uint32, options ...RequestOption) (count uint32, err error) { count = 0 @@ -1139,7 +1217,7 @@ func (s *Session) GuildPrune(guildID string, days uint32) (count uint32, err err Pruned uint32 `json:"pruned"` }{} - body, err := s.RequestWithBucketID("POST", EndpointGuildPrune(guildID), data, EndpointGuildPrune(guildID)) + body, err := s.RequestWithBucketID("POST", EndpointGuildPrune(guildID), data, EndpointGuildPrune(guildID), options...) if err != nil { return } @@ -1156,9 +1234,9 @@ func (s *Session) GuildPrune(guildID string, days uint32) (count uint32, err err // GuildIntegrations returns an array of Integrations for a guild. // guildID : The ID of a Guild. -func (s *Session) GuildIntegrations(guildID string) (st []*Integration, err error) { +func (s *Session) GuildIntegrations(guildID string, options ...RequestOption) (st []*Integration, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildIntegrations(guildID), nil, EndpointGuildIntegrations(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildIntegrations(guildID), nil, EndpointGuildIntegrations(guildID), options...) if err != nil { return } @@ -1172,14 +1250,14 @@ func (s *Session) GuildIntegrations(guildID string) (st []*Integration, err erro // guildID : The ID of a Guild. // integrationType : The Integration type. // integrationID : The ID of an integration. -func (s *Session) GuildIntegrationCreate(guildID, integrationType, integrationID string) (err error) { +func (s *Session) GuildIntegrationCreate(guildID, integrationType, integrationID string, options ...RequestOption) (err error) { data := struct { Type string `json:"type"` ID string `json:"id"` }{integrationType, integrationID} - _, err = s.RequestWithBucketID("POST", EndpointGuildIntegrations(guildID), data, EndpointGuildIntegrations(guildID)) + _, err = s.RequestWithBucketID("POST", EndpointGuildIntegrations(guildID), data, EndpointGuildIntegrations(guildID), options...) return } @@ -1190,7 +1268,7 @@ func (s *Session) GuildIntegrationCreate(guildID, integrationType, integrationID // expireBehavior : The behavior when an integration subscription lapses (see the integration object documentation). // expireGracePeriod : Period (in seconds) where the integration will ignore lapsed subscriptions. // enableEmoticons : Whether emoticons should be synced for this integration (twitch only currently). -func (s *Session) GuildIntegrationEdit(guildID, integrationID string, expireBehavior, expireGracePeriod int, enableEmoticons bool) (err error) { +func (s *Session) GuildIntegrationEdit(guildID, integrationID string, expireBehavior, expireGracePeriod int, enableEmoticons bool, options ...RequestOption) (err error) { data := struct { ExpireBehavior int `json:"expire_behavior"` @@ -1198,23 +1276,23 @@ func (s *Session) GuildIntegrationEdit(guildID, integrationID string, expireBeha EnableEmoticons bool `json:"enable_emoticons"` }{expireBehavior, expireGracePeriod, enableEmoticons} - _, err = s.RequestWithBucketID("PATCH", EndpointGuildIntegration(guildID, integrationID), data, EndpointGuildIntegration(guildID, "")) + _, err = s.RequestWithBucketID("PATCH", EndpointGuildIntegration(guildID, integrationID), data, EndpointGuildIntegration(guildID, ""), options...) return } // GuildIntegrationDelete removes the given integration from the Guild. // guildID : The ID of a Guild. // integrationID : The ID of an integration. -func (s *Session) GuildIntegrationDelete(guildID, integrationID string) (err error) { +func (s *Session) GuildIntegrationDelete(guildID, integrationID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildIntegration(guildID, integrationID), nil, EndpointGuildIntegration(guildID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointGuildIntegration(guildID, integrationID), nil, EndpointGuildIntegration(guildID, ""), options...) return } // GuildIcon returns an image.Image of a guild icon. // guildID : The ID of a Guild. -func (s *Session) GuildIcon(guildID string) (img image.Image, err error) { - g, err := s.Guild(guildID) +func (s *Session) GuildIcon(guildID string, options ...RequestOption) (img image.Image, err error) { + g, err := s.Guild(guildID, options...) if err != nil { return } @@ -1224,7 +1302,7 @@ func (s *Session) GuildIcon(guildID string) (img image.Image, err error) { return } - body, err := s.RequestWithBucketID("GET", EndpointGuildIcon(guildID, g.Icon), nil, EndpointGuildIcon(guildID, "")) + body, err := s.RequestWithBucketID("GET", EndpointGuildIcon(guildID, g.Icon), nil, EndpointGuildIcon(guildID, ""), options...) if err != nil { return } @@ -1235,8 +1313,8 @@ func (s *Session) GuildIcon(guildID string) (img image.Image, err error) { // GuildSplash returns an image.Image of a guild splash image. // guildID : The ID of a Guild. -func (s *Session) GuildSplash(guildID string) (img image.Image, err error) { - g, err := s.Guild(guildID) +func (s *Session) GuildSplash(guildID string, options ...RequestOption) (img image.Image, err error) { + g, err := s.Guild(guildID, options...) if err != nil { return } @@ -1246,7 +1324,7 @@ func (s *Session) GuildSplash(guildID string) (img image.Image, err error) { return } - body, err := s.RequestWithBucketID("GET", EndpointGuildSplash(guildID, g.Splash), nil, EndpointGuildSplash(guildID, "")) + body, err := s.RequestWithBucketID("GET", EndpointGuildSplash(guildID, g.Splash), nil, EndpointGuildSplash(guildID, ""), options...) if err != nil { return } @@ -1257,9 +1335,9 @@ func (s *Session) GuildSplash(guildID string) (img image.Image, err error) { // GuildEmbed returns the embed for a Guild. // guildID : The ID of a Guild. -func (s *Session) GuildEmbed(guildID string) (st *GuildEmbed, err error) { +func (s *Session) GuildEmbed(guildID string, options ...RequestOption) (st *GuildEmbed, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildEmbed(guildID), nil, EndpointGuildEmbed(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildEmbed(guildID), nil, EndpointGuildEmbed(guildID), options...) if err != nil { return } @@ -1271,8 +1349,8 @@ func (s *Session) GuildEmbed(guildID string) (st *GuildEmbed, err error) { // GuildEmbedEdit edits the embed of a Guild. // guildID : The ID of a Guild. // data : New GuildEmbed data. -func (s *Session) GuildEmbedEdit(guildID string, data *GuildEmbed) (err error) { - _, err = s.RequestWithBucketID("PATCH", EndpointGuildEmbed(guildID), data, EndpointGuildEmbed(guildID)) +func (s *Session) GuildEmbedEdit(guildID string, data *GuildEmbed, options ...RequestOption) (err error) { + _, err = s.RequestWithBucketID("PATCH", EndpointGuildEmbed(guildID), data, EndpointGuildEmbed(guildID), options...) return } @@ -1282,7 +1360,7 @@ func (s *Session) GuildEmbedEdit(guildID string, data *GuildEmbed) (err error) { // beforeID : If provided all log entries returned will be before the given ID. // actionType : If provided the log will be filtered for the given Action Type. // limit : The number messages that can be returned. (default 50, min 1, max 100) -func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, limit int) (st *GuildAuditLog, err error) { +func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, limit int, options ...RequestOption) (st *GuildAuditLog, err error) { uri := EndpointGuildAuditLogs(guildID) @@ -1303,7 +1381,7 @@ func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, li uri = fmt.Sprintf("%s?%s", uri, v.Encode()) } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildAuditLogs(guildID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildAuditLogs(guildID), options...) if err != nil { return } @@ -1314,9 +1392,9 @@ func (s *Session) GuildAuditLog(guildID, userID, beforeID string, actionType, li // GuildEmojis returns all emoji // guildID : The ID of a Guild. -func (s *Session) GuildEmojis(guildID string) (emoji []*Emoji, err error) { +func (s *Session) GuildEmojis(guildID string, options ...RequestOption) (emoji []*Emoji, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildEmojis(guildID), nil, EndpointGuildEmojis(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildEmojis(guildID), nil, EndpointGuildEmojis(guildID), options...) if err != nil { return } @@ -1328,9 +1406,9 @@ func (s *Session) GuildEmojis(guildID string) (emoji []*Emoji, err error) { // GuildEmoji returns specified emoji. // guildID : The ID of a Guild // emojiID : The ID of an Emoji to retrieve -func (s *Session) GuildEmoji(guildID, emojiID string) (emoji *Emoji, err error) { +func (s *Session) GuildEmoji(guildID, emojiID string, options ...RequestOption) (emoji *Emoji, err error) { var body []byte - body, err = s.RequestWithBucketID("GET", EndpointGuildEmoji(guildID, emojiID), nil, EndpointGuildEmoji(guildID, emojiID)) + body, err = s.RequestWithBucketID("GET", EndpointGuildEmoji(guildID, emojiID), nil, EndpointGuildEmoji(guildID, emojiID), options...) if err != nil { return } @@ -1342,8 +1420,8 @@ func (s *Session) GuildEmoji(guildID, emojiID string) (emoji *Emoji, err error) // GuildEmojiCreate creates a new Emoji. // guildID : The ID of a Guild. // data : New Emoji data. -func (s *Session) GuildEmojiCreate(guildID string, data *EmojiParams) (emoji *Emoji, err error) { - body, err := s.RequestWithBucketID("POST", EndpointGuildEmojis(guildID), data, EndpointGuildEmojis(guildID)) +func (s *Session) GuildEmojiCreate(guildID string, data *EmojiParams, options ...RequestOption) (emoji *Emoji, err error) { + body, err := s.RequestWithBucketID("POST", EndpointGuildEmojis(guildID), data, EndpointGuildEmojis(guildID), options...) if err != nil { return } @@ -1356,8 +1434,8 @@ func (s *Session) GuildEmojiCreate(guildID string, data *EmojiParams) (emoji *Em // guildID : The ID of a Guild. // emojiID : The ID of an Emoji. // data : Updated Emoji data. -func (s *Session) GuildEmojiEdit(guildID, emojiID string, data *EmojiParams) (emoji *Emoji, err error) { - body, err := s.RequestWithBucketID("PATCH", EndpointGuildEmoji(guildID, emojiID), data, EndpointGuildEmojis(guildID)) +func (s *Session) GuildEmojiEdit(guildID, emojiID string, data *EmojiParams, options ...RequestOption) (emoji *Emoji, err error) { + body, err := s.RequestWithBucketID("PATCH", EndpointGuildEmoji(guildID, emojiID), data, EndpointGuildEmojis(guildID), options...) if err != nil { return } @@ -1369,17 +1447,17 @@ func (s *Session) GuildEmojiEdit(guildID, emojiID string, data *EmojiParams) (em // GuildEmojiDelete deletes an Emoji. // guildID : The ID of a Guild. // emojiID : The ID of an Emoji. -func (s *Session) GuildEmojiDelete(guildID, emojiID string) (err error) { +func (s *Session) GuildEmojiDelete(guildID, emojiID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildEmoji(guildID, emojiID), nil, EndpointGuildEmojis(guildID)) + _, err = s.RequestWithBucketID("DELETE", EndpointGuildEmoji(guildID, emojiID), nil, EndpointGuildEmojis(guildID), options...) return } // GuildTemplate returns a GuildTemplate for the given code // templateCode: The Code of a GuildTemplate -func (s *Session) GuildTemplate(templateCode string) (st *GuildTemplate, err error) { +func (s *Session) GuildTemplate(templateCode string, options ...RequestOption) (st *GuildTemplate, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildTemplate(templateCode), nil, EndpointGuildTemplate(templateCode)) + body, err := s.RequestWithBucketID("GET", EndpointGuildTemplate(templateCode), nil, EndpointGuildTemplate(templateCode), options...) if err != nil { return } @@ -1392,14 +1470,14 @@ func (s *Session) GuildTemplate(templateCode string) (st *GuildTemplate, err err // templateCode: The Code of a GuildTemplate // name: The name of the guild (2-100) characters // icon: base64 encoded 128x128 image for the guild icon -func (s *Session) GuildCreateWithTemplate(templateCode, name, icon string) (st *Guild, err error) { +func (s *Session) GuildCreateWithTemplate(templateCode, name, icon string, options ...RequestOption) (st *Guild, err error) { data := struct { Name string `json:"name"` Icon string `json:"icon"` }{name, icon} - body, err := s.RequestWithBucketID("POST", EndpointGuildTemplate(templateCode), data, EndpointGuildTemplate(templateCode)) + body, err := s.RequestWithBucketID("POST", EndpointGuildTemplate(templateCode), data, EndpointGuildTemplate(templateCode), options...) if err != nil { return } @@ -1410,9 +1488,9 @@ func (s *Session) GuildCreateWithTemplate(templateCode, name, icon string) (st * // GuildTemplates returns all of GuildTemplates // guildID: The ID of the guild -func (s *Session) GuildTemplates(guildID string) (st []*GuildTemplate, err error) { +func (s *Session) GuildTemplates(guildID string, options ...RequestOption) (st []*GuildTemplate, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildTemplates(guildID), nil, EndpointGuildTemplates(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildTemplates(guildID), nil, EndpointGuildTemplates(guildID), options...) if err != nil { return } @@ -1424,8 +1502,8 @@ func (s *Session) GuildTemplates(guildID string) (st []*GuildTemplate, err error // GuildTemplateCreate creates a template for the guild // guildID : The ID of the guild // data : Template metadata -func (s *Session) GuildTemplateCreate(guildID string, data *GuildTemplateParams) (st *GuildTemplate) { - body, err := s.RequestWithBucketID("POST", EndpointGuildTemplates(guildID), data, EndpointGuildTemplates(guildID)) +func (s *Session) GuildTemplateCreate(guildID string, data *GuildTemplateParams, options ...RequestOption) (st *GuildTemplate) { + body, err := s.RequestWithBucketID("POST", EndpointGuildTemplates(guildID), data, EndpointGuildTemplates(guildID), options...) if err != nil { return } @@ -1437,9 +1515,9 @@ func (s *Session) GuildTemplateCreate(guildID string, data *GuildTemplateParams) // GuildTemplateSync syncs the template to the guild's current state // guildID: The ID of the guild // templateCode: The code of the template -func (s *Session) GuildTemplateSync(guildID, templateCode string) (err error) { +func (s *Session) GuildTemplateSync(guildID, templateCode string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("PUT", EndpointGuildTemplateSync(guildID, templateCode), nil, EndpointGuildTemplateSync(guildID, "")) + _, err = s.RequestWithBucketID("PUT", EndpointGuildTemplateSync(guildID, templateCode), nil, EndpointGuildTemplateSync(guildID, ""), options...) return } @@ -1447,9 +1525,9 @@ func (s *Session) GuildTemplateSync(guildID, templateCode string) (err error) { // guildID : The ID of the guild // templateCode : The code of the template // data : New template metadata -func (s *Session) GuildTemplateEdit(guildID, templateCode string, data *GuildTemplateParams) (st *GuildTemplate, err error) { +func (s *Session) GuildTemplateEdit(guildID, templateCode string, data *GuildTemplateParams, options ...RequestOption) (st *GuildTemplate, err error) { - body, err := s.RequestWithBucketID("PATCH", EndpointGuildTemplateSync(guildID, templateCode), data, EndpointGuildTemplateSync(guildID, "")) + body, err := s.RequestWithBucketID("PATCH", EndpointGuildTemplateSync(guildID, templateCode), data, EndpointGuildTemplateSync(guildID, ""), options...) if err != nil { return } @@ -1461,9 +1539,9 @@ func (s *Session) GuildTemplateEdit(guildID, templateCode string, data *GuildTem // GuildTemplateDelete deletes the template // guildID: The ID of the guild // templateCode: The code of the template -func (s *Session) GuildTemplateDelete(guildID, templateCode string) (err error) { +func (s *Session) GuildTemplateDelete(guildID, templateCode string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildTemplateSync(guildID, templateCode), nil, EndpointGuildTemplateSync(guildID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointGuildTemplateSync(guildID, templateCode), nil, EndpointGuildTemplateSync(guildID, ""), options...) return } @@ -1473,8 +1551,8 @@ func (s *Session) GuildTemplateDelete(guildID, templateCode string) (err error) // Channel returns a Channel structure of a specific Channel. // channelID : The ID of the Channel you want returned. -func (s *Session) Channel(channelID string) (st *Channel, err error) { - body, err := s.RequestWithBucketID("GET", EndpointChannel(channelID), nil, EndpointChannel(channelID)) +func (s *Session) Channel(channelID string, options ...RequestOption) (st *Channel, err error) { + body, err := s.RequestWithBucketID("GET", EndpointChannel(channelID), nil, EndpointChannel(channelID), options...) if err != nil { return } @@ -1486,8 +1564,8 @@ func (s *Session) Channel(channelID string) (st *Channel, err error) { // ChannelEdit edits the given channel and returns the updated Channel data. // channelID : The ID of a Channel. // data : New Channel data. -func (s *Session) ChannelEdit(channelID string, data *ChannelEdit) (st *Channel, err error) { - body, err := s.RequestWithBucketID("PATCH", EndpointChannel(channelID), data, EndpointChannel(channelID)) +func (s *Session) ChannelEdit(channelID string, data *ChannelEdit, options ...RequestOption) (st *Channel, err error) { + body, err := s.RequestWithBucketID("PATCH", EndpointChannel(channelID), data, EndpointChannel(channelID), options...) if err != nil { return } @@ -1501,15 +1579,15 @@ func (s *Session) ChannelEdit(channelID string, data *ChannelEdit) (st *Channel, // NOTE: deprecated, use ChannelEdit instead // channelID : The ID of a Channel // data : The channel struct to send -func (s *Session) ChannelEditComplex(channelID string, data *ChannelEdit) (st *Channel, err error) { - return s.ChannelEdit(channelID, data) +func (s *Session) ChannelEditComplex(channelID string, data *ChannelEdit, options ...RequestOption) (st *Channel, err error) { + return s.ChannelEdit(channelID, data, options...) } // ChannelDelete deletes the given channel // channelID : The ID of a Channel -func (s *Session) ChannelDelete(channelID string) (st *Channel, err error) { +func (s *Session) ChannelDelete(channelID string, options ...RequestOption) (st *Channel, err error) { - body, err := s.RequestWithBucketID("DELETE", EndpointChannel(channelID), nil, EndpointChannel(channelID)) + body, err := s.RequestWithBucketID("DELETE", EndpointChannel(channelID), nil, EndpointChannel(channelID), options...) if err != nil { return } @@ -1521,9 +1599,9 @@ func (s *Session) ChannelDelete(channelID string) (st *Channel, err error) { // ChannelTyping broadcasts to all members that authenticated user is typing in // the given channel. // channelID : The ID of a Channel -func (s *Session) ChannelTyping(channelID string) (err error) { +func (s *Session) ChannelTyping(channelID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("POST", EndpointChannelTyping(channelID), nil, EndpointChannelTyping(channelID)) + _, err = s.RequestWithBucketID("POST", EndpointChannelTyping(channelID), nil, EndpointChannelTyping(channelID), options...) return } @@ -1534,7 +1612,7 @@ func (s *Session) ChannelTyping(channelID string) (err error) { // beforeID : If provided all messages returned will be before given ID. // afterID : If provided all messages returned will be after given ID. // aroundID : If provided all messages returned will be around given ID. -func (s *Session) ChannelMessages(channelID string, limit int, beforeID, afterID, aroundID string) (st []*Message, err error) { +func (s *Session) ChannelMessages(channelID string, limit int, beforeID, afterID, aroundID string, options ...RequestOption) (st []*Message, err error) { uri := EndpointChannelMessages(channelID) @@ -1555,7 +1633,7 @@ func (s *Session) ChannelMessages(channelID string, limit int, beforeID, afterID uri += "?" + v.Encode() } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointChannelMessages(channelID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointChannelMessages(channelID), options...) if err != nil { return } @@ -1567,9 +1645,9 @@ func (s *Session) ChannelMessages(channelID string, limit int, beforeID, afterID // ChannelMessage gets a single message by ID from a given channel. // channeld : The ID of a Channel // messageID : the ID of a Message -func (s *Session) ChannelMessage(channelID, messageID string) (st *Message, err error) { +func (s *Session) ChannelMessage(channelID, messageID string, options ...RequestOption) (st *Message, err error) { - response, err := s.RequestWithBucketID("GET", EndpointChannelMessage(channelID, messageID), nil, EndpointChannelMessage(channelID, "")) + response, err := s.RequestWithBucketID("GET", EndpointChannelMessage(channelID, messageID), nil, EndpointChannelMessage(channelID, ""), options...) if err != nil { return } @@ -1581,10 +1659,10 @@ func (s *Session) ChannelMessage(channelID, messageID string) (st *Message, err // ChannelMessageSend sends a message to the given channel. // channelID : The ID of a Channel. // content : The message to send. -func (s *Session) ChannelMessageSend(channelID string, content string) (*Message, error) { +func (s *Session) ChannelMessageSend(channelID string, content string, options ...RequestOption) (*Message, error) { return s.ChannelMessageSendComplex(channelID, &MessageSend{ Content: content, - }) + }, options...) } var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"") @@ -1592,7 +1670,7 @@ var quoteEscaper = strings.NewReplacer("\\", "\\\\", `"`, "\\\"") // ChannelMessageSendComplex sends a message to the given channel. // channelID : The ID of a Channel. // data : The message struct to send. -func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend) (st *Message, err error) { +func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend, options ...RequestOption) (st *Message, err error) { // TODO: Remove this when compatibility is not required. if data.Embed != nil { if data.Embeds == nil { @@ -1628,9 +1706,9 @@ func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend) return st, encodeErr } - response, err = s.request("POST", endpoint, contentType, body, endpoint, 0) + response, err = s.request("POST", endpoint, contentType, body, endpoint, 0, options...) } else { - response, err = s.RequestWithBucketID("POST", endpoint, data, endpoint) + response, err = s.RequestWithBucketID("POST", endpoint, data, endpoint, options...) } if err != nil { return @@ -1643,63 +1721,63 @@ func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend) // ChannelMessageSendTTS sends a message to the given channel with Text to Speech. // channelID : The ID of a Channel. // content : The message to send. -func (s *Session) ChannelMessageSendTTS(channelID string, content string) (*Message, error) { +func (s *Session) ChannelMessageSendTTS(channelID string, content string, options ...RequestOption) (*Message, error) { return s.ChannelMessageSendComplex(channelID, &MessageSend{ Content: content, TTS: true, - }) + }, options...) } // ChannelMessageSendEmbed sends a message to the given channel with embedded data. // channelID : The ID of a Channel. // embed : The embed data to send. -func (s *Session) ChannelMessageSendEmbed(channelID string, embed *MessageEmbed) (*Message, error) { - return s.ChannelMessageSendEmbeds(channelID, []*MessageEmbed{embed}) +func (s *Session) ChannelMessageSendEmbed(channelID string, embed *MessageEmbed, options ...RequestOption) (*Message, error) { + return s.ChannelMessageSendEmbeds(channelID, []*MessageEmbed{embed}, options...) } // ChannelMessageSendEmbeds sends a message to the given channel with multiple embedded data. // channelID : The ID of a Channel. // embeds : The embeds data to send. -func (s *Session) ChannelMessageSendEmbeds(channelID string, embeds []*MessageEmbed) (*Message, error) { +func (s *Session) ChannelMessageSendEmbeds(channelID string, embeds []*MessageEmbed, options ...RequestOption) (*Message, error) { return s.ChannelMessageSendComplex(channelID, &MessageSend{ Embeds: embeds, - }) + }, options...) } // ChannelMessageSendReply sends a message to the given channel with reference data. // channelID : The ID of a Channel. // content : The message to send. // reference : The message reference to send. -func (s *Session) ChannelMessageSendReply(channelID string, content string, reference *MessageReference) (*Message, error) { +func (s *Session) ChannelMessageSendReply(channelID string, content string, reference *MessageReference, options ...RequestOption) (*Message, error) { if reference == nil { return nil, fmt.Errorf("reply attempted with nil message reference") } return s.ChannelMessageSendComplex(channelID, &MessageSend{ Content: content, Reference: reference, - }) + }, options...) } // ChannelMessageSendEmbedReply sends a message to the given channel with reference data and embedded data. // channelID : The ID of a Channel. // embed : The embed data to send. // reference : The message reference to send. -func (s *Session) ChannelMessageSendEmbedReply(channelID string, embed *MessageEmbed, reference *MessageReference) (*Message, error) { - return s.ChannelMessageSendEmbedsReply(channelID, []*MessageEmbed{embed}, reference) +func (s *Session) ChannelMessageSendEmbedReply(channelID string, embed *MessageEmbed, reference *MessageReference, options ...RequestOption) (*Message, error) { + return s.ChannelMessageSendEmbedsReply(channelID, []*MessageEmbed{embed}, reference, options...) } // ChannelMessageSendEmbedsReply sends a message to the given channel with reference data and multiple embedded data. // channelID : The ID of a Channel. // embeds : The embeds data to send. // reference : The message reference to send. -func (s *Session) ChannelMessageSendEmbedsReply(channelID string, embeds []*MessageEmbed, reference *MessageReference) (*Message, error) { +func (s *Session) ChannelMessageSendEmbedsReply(channelID string, embeds []*MessageEmbed, reference *MessageReference, options ...RequestOption) (*Message, error) { if reference == nil { return nil, fmt.Errorf("reply attempted with nil message reference") } return s.ChannelMessageSendComplex(channelID, &MessageSend{ Embeds: embeds, Reference: reference, - }) + }, options...) } // ChannelMessageEdit edits an existing message, replacing it entirely with @@ -1707,13 +1785,13 @@ func (s *Session) ChannelMessageSendEmbedsReply(channelID string, embeds []*Mess // channelID : The ID of a Channel // messageID : The ID of a Message // content : The contents of the message -func (s *Session) ChannelMessageEdit(channelID, messageID, content string) (*Message, error) { - return s.ChannelMessageEditComplex(NewMessageEdit(channelID, messageID).SetContent(content)) +func (s *Session) ChannelMessageEdit(channelID, messageID, content string, options ...RequestOption) (*Message, error) { + return s.ChannelMessageEditComplex(NewMessageEdit(channelID, messageID).SetContent(content), options...) } // ChannelMessageEditComplex edits an existing message, replacing it entirely with // the given MessageEdit struct -func (s *Session) ChannelMessageEditComplex(m *MessageEdit) (st *Message, err error) { +func (s *Session) ChannelMessageEditComplex(m *MessageEdit, options ...RequestOption) (st *Message, err error) { // TODO: Remove this when compatibility is not required. if m.Embed != nil { if m.Embeds == nil { @@ -1729,7 +1807,19 @@ func (s *Session) ChannelMessageEditComplex(m *MessageEdit) (st *Message, err er embed.Type = "rich" } } - response, err := s.RequestWithBucketID("PATCH", EndpointChannelMessage(m.Channel, m.ID), m, EndpointChannelMessage(m.Channel, "")) + + endpoint := EndpointChannelMessage(m.Channel, m.ID) + + var response []byte + if len(m.Files) > 0 { + contentType, body, encodeErr := MultipartBodyWithJSON(m, m.Files) + if encodeErr != nil { + return st, encodeErr + } + response, err = s.request("PATCH", endpoint, contentType, body, EndpointChannelMessage(m.Channel, ""), 0, options...) + } else { + response, err = s.RequestWithBucketID("PATCH", endpoint, m, EndpointChannelMessage(m.Channel, ""), options...) + } if err != nil { return } @@ -1742,22 +1832,22 @@ func (s *Session) ChannelMessageEditComplex(m *MessageEdit) (st *Message, err er // channelID : The ID of a Channel // messageID : The ID of a Message // embed : The embed data to send -func (s *Session) ChannelMessageEditEmbed(channelID, messageID string, embed *MessageEmbed) (*Message, error) { - return s.ChannelMessageEditEmbeds(channelID, messageID, []*MessageEmbed{embed}) +func (s *Session) ChannelMessageEditEmbed(channelID, messageID string, embed *MessageEmbed, options ...RequestOption) (*Message, error) { + return s.ChannelMessageEditEmbeds(channelID, messageID, []*MessageEmbed{embed}, options...) } // ChannelMessageEditEmbeds edits an existing message with multiple embedded data. // channelID : The ID of a Channel // messageID : The ID of a Message // embeds : The embeds data to send -func (s *Session) ChannelMessageEditEmbeds(channelID, messageID string, embeds []*MessageEmbed) (*Message, error) { - return s.ChannelMessageEditComplex(NewMessageEdit(channelID, messageID).SetEmbeds(embeds)) +func (s *Session) ChannelMessageEditEmbeds(channelID, messageID string, embeds []*MessageEmbed, options ...RequestOption) (*Message, error) { + return s.ChannelMessageEditComplex(NewMessageEdit(channelID, messageID).SetEmbeds(embeds), options...) } // ChannelMessageDelete deletes a message from the Channel. -func (s *Session) ChannelMessageDelete(channelID, messageID string) (err error) { +func (s *Session) ChannelMessageDelete(channelID, messageID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointChannelMessage(channelID, messageID), nil, EndpointChannelMessage(channelID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointChannelMessage(channelID, messageID), nil, EndpointChannelMessage(channelID, ""), options...) return } @@ -1766,14 +1856,14 @@ func (s *Session) ChannelMessageDelete(channelID, messageID string) (err error) // If the slice is empty do nothing. // channelID : The ID of the channel for the messages to delete. // messages : The IDs of the messages to be deleted. A slice of string IDs. A maximum of 100 messages. -func (s *Session) ChannelMessagesBulkDelete(channelID string, messages []string) (err error) { +func (s *Session) ChannelMessagesBulkDelete(channelID string, messages []string, options ...RequestOption) (err error) { if len(messages) == 0 { return } if len(messages) == 1 { - err = s.ChannelMessageDelete(channelID, messages[0]) + err = s.ChannelMessageDelete(channelID, messages[0], options...) return } @@ -1785,34 +1875,34 @@ func (s *Session) ChannelMessagesBulkDelete(channelID string, messages []string) Messages []string `json:"messages"` }{messages} - _, err = s.RequestWithBucketID("POST", EndpointChannelMessagesBulkDelete(channelID), data, EndpointChannelMessagesBulkDelete(channelID)) + _, err = s.RequestWithBucketID("POST", EndpointChannelMessagesBulkDelete(channelID), data, EndpointChannelMessagesBulkDelete(channelID), options...) return } // ChannelMessagePin pins a message within a given channel. // channelID: The ID of a channel. // messageID: The ID of a message. -func (s *Session) ChannelMessagePin(channelID, messageID string) (err error) { +func (s *Session) ChannelMessagePin(channelID, messageID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("PUT", EndpointChannelMessagePin(channelID, messageID), nil, EndpointChannelMessagePin(channelID, "")) + _, err = s.RequestWithBucketID("PUT", EndpointChannelMessagePin(channelID, messageID), nil, EndpointChannelMessagePin(channelID, ""), options...) return } // ChannelMessageUnpin unpins a message within a given channel. // channelID: The ID of a channel. // messageID: The ID of a message. -func (s *Session) ChannelMessageUnpin(channelID, messageID string) (err error) { +func (s *Session) ChannelMessageUnpin(channelID, messageID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointChannelMessagePin(channelID, messageID), nil, EndpointChannelMessagePin(channelID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointChannelMessagePin(channelID, messageID), nil, EndpointChannelMessagePin(channelID, ""), options...) return } // ChannelMessagesPinned returns an array of Message structures for pinned messages // within a given channel // channelID : The ID of a Channel. -func (s *Session) ChannelMessagesPinned(channelID string) (st []*Message, err error) { +func (s *Session) ChannelMessagesPinned(channelID string, options ...RequestOption) (st []*Message, err error) { - body, err := s.RequestWithBucketID("GET", EndpointChannelMessagesPins(channelID), nil, EndpointChannelMessagesPins(channelID)) + body, err := s.RequestWithBucketID("GET", EndpointChannelMessagesPins(channelID), nil, EndpointChannelMessagesPins(channelID), options...) if err != nil { return @@ -1826,8 +1916,8 @@ func (s *Session) ChannelMessagesPinned(channelID string) (st []*Message, err er // channelID : The ID of a Channel. // name: The name of the file. // io.Reader : A reader for the file contents. -func (s *Session) ChannelFileSend(channelID, name string, r io.Reader) (*Message, error) { - return s.ChannelMessageSendComplex(channelID, &MessageSend{File: &File{Name: name, Reader: r}}) +func (s *Session) ChannelFileSend(channelID, name string, r io.Reader, options ...RequestOption) (*Message, error) { + return s.ChannelMessageSendComplex(channelID, &MessageSend{File: &File{Name: name, Reader: r}}, options...) } // ChannelFileSendWithMessage sends a file to the given channel with an message. @@ -1836,15 +1926,15 @@ func (s *Session) ChannelFileSend(channelID, name string, r io.Reader) (*Message // content: Optional Message content. // name: The name of the file. // io.Reader : A reader for the file contents. -func (s *Session) ChannelFileSendWithMessage(channelID, content string, name string, r io.Reader) (*Message, error) { - return s.ChannelMessageSendComplex(channelID, &MessageSend{File: &File{Name: name, Reader: r}, Content: content}) +func (s *Session) ChannelFileSendWithMessage(channelID, content string, name string, r io.Reader, options ...RequestOption) (*Message, error) { + return s.ChannelMessageSendComplex(channelID, &MessageSend{File: &File{Name: name, Reader: r}, Content: content}, options...) } // ChannelInvites returns an array of Invite structures for the given channel // channelID : The ID of a Channel -func (s *Session) ChannelInvites(channelID string) (st []*Invite, err error) { +func (s *Session) ChannelInvites(channelID string, options ...RequestOption) (st []*Invite, err error) { - body, err := s.RequestWithBucketID("GET", EndpointChannelInvites(channelID), nil, EndpointChannelInvites(channelID)) + body, err := s.RequestWithBucketID("GET", EndpointChannelInvites(channelID), nil, EndpointChannelInvites(channelID), options...) if err != nil { return } @@ -1856,7 +1946,7 @@ func (s *Session) ChannelInvites(channelID string) (st []*Invite, err error) { // ChannelInviteCreate creates a new invite for the given channel. // channelID : The ID of a Channel // i : An Invite struct with the values MaxAge, MaxUses and Temporary defined. -func (s *Session) ChannelInviteCreate(channelID string, i Invite) (st *Invite, err error) { +func (s *Session) ChannelInviteCreate(channelID string, i Invite, options ...RequestOption) (st *Invite, err error) { data := struct { MaxAge int `json:"max_age"` @@ -1865,7 +1955,7 @@ func (s *Session) ChannelInviteCreate(channelID string, i Invite) (st *Invite, e Unique bool `json:"unique"` }{i.MaxAge, i.MaxUses, i.Temporary, i.Unique} - body, err := s.RequestWithBucketID("POST", EndpointChannelInvites(channelID), data, EndpointChannelInvites(channelID)) + body, err := s.RequestWithBucketID("POST", EndpointChannelInvites(channelID), data, EndpointChannelInvites(channelID), options...) if err != nil { return } @@ -1877,7 +1967,7 @@ func (s *Session) ChannelInviteCreate(channelID string, i Invite) (st *Invite, e // ChannelPermissionSet creates a Permission Override for the given channel. // NOTE: This func name may changed. Using Set instead of Create because // you can both create a new override or update an override with this function. -func (s *Session) ChannelPermissionSet(channelID, targetID string, targetType PermissionOverwriteType, allow, deny int64) (err error) { +func (s *Session) ChannelPermissionSet(channelID, targetID string, targetType PermissionOverwriteType, allow, deny int64, options ...RequestOption) (err error) { data := struct { ID string `json:"id"` @@ -1886,15 +1976,15 @@ func (s *Session) ChannelPermissionSet(channelID, targetID string, targetType Pe Deny int64 `json:"deny,string"` }{targetID, targetType, allow, deny} - _, err = s.RequestWithBucketID("PUT", EndpointChannelPermission(channelID, targetID), data, EndpointChannelPermission(channelID, "")) + _, err = s.RequestWithBucketID("PUT", EndpointChannelPermission(channelID, targetID), data, EndpointChannelPermission(channelID, ""), options...) return } // ChannelPermissionDelete deletes a specific permission override for the given channel. // NOTE: Name of this func may change. -func (s *Session) ChannelPermissionDelete(channelID, targetID string) (err error) { +func (s *Session) ChannelPermissionDelete(channelID, targetID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointChannelPermission(channelID, targetID), nil, EndpointChannelPermission(channelID, "")) + _, err = s.RequestWithBucketID("DELETE", EndpointChannelPermission(channelID, targetID), nil, EndpointChannelPermission(channelID, ""), options...) return } @@ -1902,11 +1992,11 @@ func (s *Session) ChannelPermissionDelete(channelID, targetID string) (err error // of the channel // channelID : The ID of a Channel // messageID : The ID of a Message -func (s *Session) ChannelMessageCrosspost(channelID, messageID string) (st *Message, err error) { +func (s *Session) ChannelMessageCrosspost(channelID, messageID string, options ...RequestOption) (st *Message, err error) { endpoint := EndpointChannelMessageCrosspost(channelID, messageID) - body, err := s.RequestWithBucketID("POST", endpoint, nil, endpoint) + body, err := s.RequestWithBucketID("POST", endpoint, nil, endpoint, options...) if err != nil { return } @@ -1918,7 +2008,7 @@ func (s *Session) ChannelMessageCrosspost(channelID, messageID string) (st *Mess // ChannelNewsFollow follows a news channel in the targetID // channelID : The ID of a News Channel // targetID : The ID of a Channel where the News Channel should post to -func (s *Session) ChannelNewsFollow(channelID, targetID string) (st *ChannelFollow, err error) { +func (s *Session) ChannelNewsFollow(channelID, targetID string, options ...RequestOption) (st *ChannelFollow, err error) { endpoint := EndpointChannelFollow(channelID) @@ -1926,7 +2016,7 @@ func (s *Session) ChannelNewsFollow(channelID, targetID string) (st *ChannelFoll WebhookChannelID string `json:"webhook_channel_id"` }{targetID} - body, err := s.RequestWithBucketID("POST", endpoint, data, endpoint) + body, err := s.RequestWithBucketID("POST", endpoint, data, endpoint, options...) if err != nil { return } @@ -1941,9 +2031,9 @@ func (s *Session) ChannelNewsFollow(channelID, targetID string) (st *ChannelFoll // Invite returns an Invite structure of the given invite // inviteID : The invite code -func (s *Session) Invite(inviteID string) (st *Invite, err error) { +func (s *Session) Invite(inviteID string, options ...RequestOption) (st *Invite, err error) { - body, err := s.RequestWithBucketID("GET", EndpointInvite(inviteID), nil, EndpointInvite("")) + body, err := s.RequestWithBucketID("GET", EndpointInvite(inviteID), nil, EndpointInvite(""), options...) if err != nil { return } @@ -1954,9 +2044,9 @@ func (s *Session) Invite(inviteID string) (st *Invite, err error) { // InviteWithCounts returns an Invite structure of the given invite including approximate member counts // inviteID : The invite code -func (s *Session) InviteWithCounts(inviteID string) (st *Invite, err error) { +func (s *Session) InviteWithCounts(inviteID string, options ...RequestOption) (st *Invite, err error) { - body, err := s.RequestWithBucketID("GET", EndpointInvite(inviteID)+"?with_counts=true", nil, EndpointInvite("")) + body, err := s.RequestWithBucketID("GET", EndpointInvite(inviteID)+"?with_counts=true", nil, EndpointInvite(""), options...) if err != nil { return } @@ -1966,11 +2056,11 @@ func (s *Session) InviteWithCounts(inviteID string) (st *Invite, err error) { } // InviteComplex returns an Invite structure of the given invite including specified fields. -// inviteID : The invite code -// guildScheduledEventID : If specified, includes specified guild scheduled event. -// withCounts : Whether to include approximate member counts or not -// withExpiration : Whether to include expiration time or not -func (s *Session) InviteComplex(inviteID, guildScheduledEventID string, withCounts, withExpiration bool) (st *Invite, err error) { +// inviteID : The invite code +// guildScheduledEventID : If specified, includes specified guild scheduled event. +// withCounts : Whether to include approximate member counts or not +// withExpiration : Whether to include expiration time or not +func (s *Session) InviteComplex(inviteID, guildScheduledEventID string, withCounts, withExpiration bool, options ...RequestOption) (st *Invite, err error) { endpoint := EndpointInvite(inviteID) v := url.Values{} if guildScheduledEventID != "" { @@ -1987,7 +2077,7 @@ func (s *Session) InviteComplex(inviteID, guildScheduledEventID string, withCoun endpoint += "?" + v.Encode() } - body, err := s.RequestWithBucketID("GET", endpoint, nil, EndpointInvite("")) + body, err := s.RequestWithBucketID("GET", endpoint, nil, EndpointInvite(""), options...) if err != nil { return } @@ -1998,9 +2088,9 @@ func (s *Session) InviteComplex(inviteID, guildScheduledEventID string, withCoun // InviteDelete deletes an existing invite // inviteID : the code of an invite -func (s *Session) InviteDelete(inviteID string) (st *Invite, err error) { +func (s *Session) InviteDelete(inviteID string, options ...RequestOption) (st *Invite, err error) { - body, err := s.RequestWithBucketID("DELETE", EndpointInvite(inviteID), nil, EndpointInvite("")) + body, err := s.RequestWithBucketID("DELETE", EndpointInvite(inviteID), nil, EndpointInvite(""), options...) if err != nil { return } @@ -2011,9 +2101,9 @@ func (s *Session) InviteDelete(inviteID string) (st *Invite, err error) { // InviteAccept accepts an Invite to a Guild or Channel // inviteID : The invite code -func (s *Session) InviteAccept(inviteID string) (st *Invite, err error) { +func (s *Session) InviteAccept(inviteID string, options ...RequestOption) (st *Invite, err error) { - body, err := s.RequestWithBucketID("POST", EndpointInvite(inviteID), nil, EndpointInvite("")) + body, err := s.RequestWithBucketID("POST", EndpointInvite(inviteID), nil, EndpointInvite(""), options...) if err != nil { return } @@ -2027,9 +2117,9 @@ func (s *Session) InviteAccept(inviteID string) (st *Invite, err error) { // ------------------------------------------------------------------------------------------------ // VoiceRegions returns the voice server regions -func (s *Session) VoiceRegions() (st []*VoiceRegion, err error) { +func (s *Session) VoiceRegions(options ...RequestOption) (st []*VoiceRegion, err error) { - body, err := s.RequestWithBucketID("GET", EndpointVoiceRegions, nil, EndpointVoiceRegions) + body, err := s.RequestWithBucketID("GET", EndpointVoiceRegions, nil, EndpointVoiceRegions, options...) if err != nil { return } @@ -2043,9 +2133,9 @@ func (s *Session) VoiceRegions() (st []*VoiceRegion, err error) { // ------------------------------------------------------------------------------------------------ // Gateway returns the websocket Gateway address -func (s *Session) Gateway() (gateway string, err error) { +func (s *Session) Gateway(options ...RequestOption) (gateway string, err error) { - response, err := s.RequestWithBucketID("GET", EndpointGateway, nil, EndpointGateway) + response, err := s.RequestWithBucketID("GET", EndpointGateway, nil, EndpointGateway, options...) if err != nil { return } @@ -2071,9 +2161,9 @@ func (s *Session) Gateway() (gateway string, err error) { } // GatewayBot returns the websocket Gateway address and the recommended number of shards -func (s *Session) GatewayBot() (st *GatewayBotResponse, err error) { +func (s *Session) GatewayBot(options ...RequestOption) (st *GatewayBotResponse, err error) { - response, err := s.RequestWithBucketID("GET", EndpointGatewayBot, nil, EndpointGatewayBot) + response, err := s.RequestWithBucketID("GET", EndpointGatewayBot, nil, EndpointGatewayBot, options...) if err != nil { return } @@ -2098,14 +2188,14 @@ func (s *Session) GatewayBot() (st *GatewayBotResponse, err error) { // channelID: The ID of a Channel. // name : The name of the webhook. // avatar : The avatar of the webhook. -func (s *Session) WebhookCreate(channelID, name, avatar string) (st *Webhook, err error) { +func (s *Session) WebhookCreate(channelID, name, avatar string, options ...RequestOption) (st *Webhook, err error) { data := struct { Name string `json:"name"` Avatar string `json:"avatar,omitempty"` }{name, avatar} - body, err := s.RequestWithBucketID("POST", EndpointChannelWebhooks(channelID), data, EndpointChannelWebhooks(channelID)) + body, err := s.RequestWithBucketID("POST", EndpointChannelWebhooks(channelID), data, EndpointChannelWebhooks(channelID), options...) if err != nil { return } @@ -2117,9 +2207,9 @@ func (s *Session) WebhookCreate(channelID, name, avatar string) (st *Webhook, er // ChannelWebhooks returns all webhooks for a given channel. // channelID: The ID of a channel. -func (s *Session) ChannelWebhooks(channelID string) (st []*Webhook, err error) { +func (s *Session) ChannelWebhooks(channelID string, options ...RequestOption) (st []*Webhook, err error) { - body, err := s.RequestWithBucketID("GET", EndpointChannelWebhooks(channelID), nil, EndpointChannelWebhooks(channelID)) + body, err := s.RequestWithBucketID("GET", EndpointChannelWebhooks(channelID), nil, EndpointChannelWebhooks(channelID), options...) if err != nil { return } @@ -2131,9 +2221,9 @@ func (s *Session) ChannelWebhooks(channelID string) (st []*Webhook, err error) { // GuildWebhooks returns all webhooks for a given guild. // guildID: The ID of a Guild. -func (s *Session) GuildWebhooks(guildID string) (st []*Webhook, err error) { +func (s *Session) GuildWebhooks(guildID string, options ...RequestOption) (st []*Webhook, err error) { - body, err := s.RequestWithBucketID("GET", EndpointGuildWebhooks(guildID), nil, EndpointGuildWebhooks(guildID)) + body, err := s.RequestWithBucketID("GET", EndpointGuildWebhooks(guildID), nil, EndpointGuildWebhooks(guildID), options...) if err != nil { return } @@ -2145,9 +2235,9 @@ func (s *Session) GuildWebhooks(guildID string) (st []*Webhook, err error) { // Webhook returns a webhook for a given ID // webhookID: The ID of a webhook. -func (s *Session) Webhook(webhookID string) (st *Webhook, err error) { +func (s *Session) Webhook(webhookID string, options ...RequestOption) (st *Webhook, err error) { - body, err := s.RequestWithBucketID("GET", EndpointWebhook(webhookID), nil, EndpointWebhooks) + body, err := s.RequestWithBucketID("GET", EndpointWebhook(webhookID), nil, EndpointWebhooks, options...) if err != nil { return } @@ -2160,9 +2250,9 @@ func (s *Session) Webhook(webhookID string) (st *Webhook, err error) { // WebhookWithToken returns a webhook for a given ID // webhookID: The ID of a webhook. // token : The auth token for the webhook. -func (s *Session) WebhookWithToken(webhookID, token string) (st *Webhook, err error) { +func (s *Session) WebhookWithToken(webhookID, token string, options ...RequestOption) (st *Webhook, err error) { - body, err := s.RequestWithBucketID("GET", EndpointWebhookToken(webhookID, token), nil, EndpointWebhookToken("", "")) + body, err := s.RequestWithBucketID("GET", EndpointWebhookToken(webhookID, token), nil, EndpointWebhookToken("", ""), options...) if err != nil { return } @@ -2176,7 +2266,7 @@ func (s *Session) WebhookWithToken(webhookID, token string) (st *Webhook, err er // webhookID: The ID of a webhook. // name : The name of the webhook. // avatar : The avatar of the webhook. -func (s *Session) WebhookEdit(webhookID, name, avatar, channelID string) (st *Role, err error) { +func (s *Session) WebhookEdit(webhookID, name, avatar, channelID string, options ...RequestOption) (st *Role, err error) { data := struct { Name string `json:"name,omitempty"` @@ -2184,7 +2274,7 @@ func (s *Session) WebhookEdit(webhookID, name, avatar, channelID string) (st *Ro ChannelID string `json:"channel_id,omitempty"` }{name, avatar, channelID} - body, err := s.RequestWithBucketID("PATCH", EndpointWebhook(webhookID), data, EndpointWebhooks) + body, err := s.RequestWithBucketID("PATCH", EndpointWebhook(webhookID), data, EndpointWebhooks, options...) if err != nil { return } @@ -2199,14 +2289,14 @@ func (s *Session) WebhookEdit(webhookID, name, avatar, channelID string) (st *Ro // token : The auth token for the webhook. // name : The name of the webhook. // avatar : The avatar of the webhook. -func (s *Session) WebhookEditWithToken(webhookID, token, name, avatar string) (st *Role, err error) { +func (s *Session) WebhookEditWithToken(webhookID, token, name, avatar string, options ...RequestOption) (st *Role, err error) { data := struct { Name string `json:"name,omitempty"` Avatar string `json:"avatar,omitempty"` }{name, avatar} - body, err := s.RequestWithBucketID("PATCH", EndpointWebhookToken(webhookID, token), data, EndpointWebhookToken("", "")) + body, err := s.RequestWithBucketID("PATCH", EndpointWebhookToken(webhookID, token), data, EndpointWebhookToken("", ""), options...) if err != nil { return } @@ -2218,9 +2308,9 @@ func (s *Session) WebhookEditWithToken(webhookID, token, name, avatar string) (s // WebhookDelete deletes a webhook for a given ID // webhookID: The ID of a webhook. -func (s *Session) WebhookDelete(webhookID string) (err error) { +func (s *Session) WebhookDelete(webhookID string, options ...RequestOption) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointWebhook(webhookID), nil, EndpointWebhooks) + _, err = s.RequestWithBucketID("DELETE", EndpointWebhook(webhookID), nil, EndpointWebhooks, options...) return } @@ -2228,9 +2318,9 @@ func (s *Session) WebhookDelete(webhookID string) (err error) { // WebhookDeleteWithToken deletes a webhook for a given ID with an auth token. // webhookID: The ID of a webhook. // token : The auth token for the webhook. -func (s *Session) WebhookDeleteWithToken(webhookID, token string) (st *Webhook, err error) { +func (s *Session) WebhookDeleteWithToken(webhookID, token string, options ...RequestOption) (st *Webhook, err error) { - body, err := s.RequestWithBucketID("DELETE", EndpointWebhookToken(webhookID, token), nil, EndpointWebhookToken("", "")) + body, err := s.RequestWithBucketID("DELETE", EndpointWebhookToken(webhookID, token), nil, EndpointWebhookToken("", ""), options...) if err != nil { return } @@ -2240,7 +2330,7 @@ func (s *Session) WebhookDeleteWithToken(webhookID, token string) (st *Webhook, return } -func (s *Session) webhookExecute(webhookID, token string, wait bool, threadID string, data *WebhookParams) (st *Message, err error) { +func (s *Session) webhookExecute(webhookID, token string, wait bool, threadID string, data *WebhookParams, options ...RequestOption) (st *Message, err error) { uri := EndpointWebhookToken(webhookID, token) v := url.Values{} @@ -2262,9 +2352,9 @@ func (s *Session) webhookExecute(webhookID, token string, wait bool, threadID st return st, encodeErr } - response, err = s.request("POST", uri, contentType, body, uri, 0) + response, err = s.request("POST", uri, contentType, body, uri, 0, options...) } else { - response, err = s.RequestWithBucketID("POST", uri, data, uri) + response, err = s.RequestWithBucketID("POST", uri, data, uri, options...) } if !wait || err != nil { return @@ -2278,8 +2368,8 @@ func (s *Session) webhookExecute(webhookID, token string, wait bool, threadID st // webhookID: The ID of a webhook. // token : The auth token for the webhook // wait : Waits for server confirmation of message send and ensures that the return struct is populated (it is nil otherwise) -func (s *Session) WebhookExecute(webhookID, token string, wait bool, data *WebhookParams) (st *Message, err error) { - return s.webhookExecute(webhookID, token, wait, "", data) +func (s *Session) WebhookExecute(webhookID, token string, wait bool, data *WebhookParams, options ...RequestOption) (st *Message, err error) { + return s.webhookExecute(webhookID, token, wait, "", data, options...) } // WebhookThreadExecute executes a webhook in a thread. @@ -2287,18 +2377,18 @@ func (s *Session) WebhookExecute(webhookID, token string, wait bool, data *Webho // token : The auth token for the webhook // wait : Waits for server confirmation of message send and ensures that the return struct is populated (it is nil otherwise) // threadID : Sends a message to the specified thread within a webhook's channel. The thread will automatically be unarchived. -func (s *Session) WebhookThreadExecute(webhookID, token string, wait bool, threadID string, data *WebhookParams) (st *Message, err error) { - return s.webhookExecute(webhookID, token, wait, threadID, data) +func (s *Session) WebhookThreadExecute(webhookID, token string, wait bool, threadID string, data *WebhookParams, options ...RequestOption) (st *Message, err error) { + return s.webhookExecute(webhookID, token, wait, threadID, data, options...) } // WebhookMessage gets a webhook message. // webhookID : The ID of a webhook // token : The auth token for the webhook // messageID : The ID of message to get -func (s *Session) WebhookMessage(webhookID, token, messageID string) (message *Message, err error) { +func (s *Session) WebhookMessage(webhookID, token, messageID string, options ...RequestOption) (message *Message, err error) { uri := EndpointWebhookMessage(webhookID, token, messageID) - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointWebhookToken("", "")) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointWebhookToken("", ""), options...) if err != nil { return } @@ -2312,7 +2402,7 @@ func (s *Session) WebhookMessage(webhookID, token, messageID string) (message *M // webhookID : The ID of a webhook // token : The auth token for the webhook // messageID : The ID of message to edit -func (s *Session) WebhookMessageEdit(webhookID, token, messageID string, data *WebhookEdit) (st *Message, err error) { +func (s *Session) WebhookMessageEdit(webhookID, token, messageID string, data *WebhookEdit, options ...RequestOption) (st *Message, err error) { uri := EndpointWebhookMessage(webhookID, token, messageID) var response []byte @@ -2322,12 +2412,12 @@ func (s *Session) WebhookMessageEdit(webhookID, token, messageID string, data *W return nil, err } - response, err = s.request("PATCH", uri, contentType, body, uri, 0) + response, err = s.request("PATCH", uri, contentType, body, uri, 0, options...) if err != nil { return nil, err } } else { - response, err = s.RequestWithBucketID("PATCH", uri, data, EndpointWebhookToken("", "")) + response, err = s.RequestWithBucketID("PATCH", uri, data, EndpointWebhookToken("", ""), options...) if err != nil { return nil, err @@ -2342,10 +2432,10 @@ func (s *Session) WebhookMessageEdit(webhookID, token, messageID string, data *W // webhookID : The ID of a webhook // token : The auth token for the webhook // messageID : The ID of a message to edit -func (s *Session) WebhookMessageDelete(webhookID, token, messageID string) (err error) { +func (s *Session) WebhookMessageDelete(webhookID, token, messageID string, options ...RequestOption) (err error) { uri := EndpointWebhookMessage(webhookID, token, messageID) - _, err = s.RequestWithBucketID("DELETE", uri, nil, EndpointWebhookToken("", "")) + _, err = s.RequestWithBucketID("DELETE", uri, nil, EndpointWebhookToken("", ""), options...) return } @@ -2353,11 +2443,11 @@ func (s *Session) WebhookMessageDelete(webhookID, token, messageID string) (err // channelID : The channel ID. // messageID : The message ID. // emojiID : Either the unicode emoji for the reaction, or a guild emoji identifier in name:id format (e.g. "hello:1234567654321") -func (s *Session) MessageReactionAdd(channelID, messageID, emojiID string) error { +func (s *Session) MessageReactionAdd(channelID, messageID, emojiID string, options ...RequestOption) error { // emoji such as #⃣ need to have # escaped emojiID = strings.Replace(emojiID, "#", "%23", -1) - _, err := s.RequestWithBucketID("PUT", EndpointMessageReaction(channelID, messageID, emojiID, "@me"), nil, EndpointMessageReaction(channelID, "", "", "")) + _, err := s.RequestWithBucketID("PUT", EndpointMessageReaction(channelID, messageID, emojiID, "@me"), nil, EndpointMessageReaction(channelID, "", "", ""), options...) return err } @@ -2367,11 +2457,11 @@ func (s *Session) MessageReactionAdd(channelID, messageID, emojiID string) error // messageID : The message ID. // emojiID : Either the unicode emoji for the reaction, or a guild emoji identifier. // userID : @me or ID of the user to delete the reaction for. -func (s *Session) MessageReactionRemove(channelID, messageID, emojiID, userID string) error { +func (s *Session) MessageReactionRemove(channelID, messageID, emojiID, userID string, options ...RequestOption) error { // emoji such as #⃣ need to have # escaped emojiID = strings.Replace(emojiID, "#", "%23", -1) - _, err := s.RequestWithBucketID("DELETE", EndpointMessageReaction(channelID, messageID, emojiID, userID), nil, EndpointMessageReaction(channelID, "", "", "")) + _, err := s.RequestWithBucketID("DELETE", EndpointMessageReaction(channelID, messageID, emojiID, userID), nil, EndpointMessageReaction(channelID, "", "", ""), options...) return err } @@ -2379,9 +2469,9 @@ func (s *Session) MessageReactionRemove(channelID, messageID, emojiID, userID st // MessageReactionsRemoveAll deletes all reactions from a message // channelID : The channel ID // messageID : The message ID. -func (s *Session) MessageReactionsRemoveAll(channelID, messageID string) error { +func (s *Session) MessageReactionsRemoveAll(channelID, messageID string, options ...RequestOption) error { - _, err := s.RequestWithBucketID("DELETE", EndpointMessageReactionsAll(channelID, messageID), nil, EndpointMessageReactionsAll(channelID, messageID)) + _, err := s.RequestWithBucketID("DELETE", EndpointMessageReactionsAll(channelID, messageID), nil, EndpointMessageReactionsAll(channelID, messageID), options...) return err } @@ -2390,11 +2480,11 @@ func (s *Session) MessageReactionsRemoveAll(channelID, messageID string) error { // channelID : The channel ID // messageID : The message ID // emojiID : The emoji ID -func (s *Session) MessageReactionsRemoveEmoji(channelID, messageID, emojiID string) error { +func (s *Session) MessageReactionsRemoveEmoji(channelID, messageID, emojiID string, options ...RequestOption) error { // emoji such as #⃣ need to have # escaped emojiID = strings.Replace(emojiID, "#", "%23", -1) - _, err := s.RequestWithBucketID("DELETE", EndpointMessageReactions(channelID, messageID, emojiID), nil, EndpointMessageReactions(channelID, messageID, emojiID)) + _, err := s.RequestWithBucketID("DELETE", EndpointMessageReactions(channelID, messageID, emojiID), nil, EndpointMessageReactions(channelID, messageID, emojiID), options...) return err } @@ -2406,7 +2496,7 @@ func (s *Session) MessageReactionsRemoveEmoji(channelID, messageID, emojiID stri // limit : max number of users to return (max 100) // beforeID : If provided all reactions returned will be before given ID. // afterID : If provided all reactions returned will be after given ID. -func (s *Session) MessageReactions(channelID, messageID, emojiID string, limit int, beforeID, afterID string) (st []*User, err error) { +func (s *Session) MessageReactions(channelID, messageID, emojiID string, limit int, beforeID, afterID string, options ...RequestOption) (st []*User, err error) { // emoji such as #⃣ need to have # escaped emojiID = strings.Replace(emojiID, "#", "%23", -1) uri := EndpointMessageReactions(channelID, messageID, emojiID) @@ -2428,7 +2518,7 @@ func (s *Session) MessageReactions(channelID, messageID, emojiID string, limit i uri += "?" + v.Encode() } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointMessageReaction(channelID, "", "", "")) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointMessageReaction(channelID, "", "", ""), options...) if err != nil { return } @@ -2445,10 +2535,10 @@ func (s *Session) MessageReactions(channelID, messageID, emojiID string, limit i // channelID : Channel to create thread in // messageID : Message to start thread from // data : Parameters of the thread -func (s *Session) MessageThreadStartComplex(channelID, messageID string, data *ThreadStart) (ch *Channel, err error) { +func (s *Session) MessageThreadStartComplex(channelID, messageID string, data *ThreadStart, options ...RequestOption) (ch *Channel, err error) { endpoint := EndpointChannelMessageThread(channelID, messageID) var body []byte - body, err = s.RequestWithBucketID("POST", endpoint, data, endpoint) + body, err = s.RequestWithBucketID("POST", endpoint, data, endpoint, options...) if err != nil { return } @@ -2462,20 +2552,20 @@ func (s *Session) MessageThreadStartComplex(channelID, messageID string, data *T // messageID : Message to start thread from // name : Name of the thread // archiveDuration : Auto archive duration (in minutes) -func (s *Session) MessageThreadStart(channelID, messageID string, name string, archiveDuration int) (ch *Channel, err error) { +func (s *Session) MessageThreadStart(channelID, messageID string, name string, archiveDuration int, options ...RequestOption) (ch *Channel, err error) { return s.MessageThreadStartComplex(channelID, messageID, &ThreadStart{ Name: name, AutoArchiveDuration: archiveDuration, - }) + }, options...) } // ThreadStartComplex creates a new thread. // channelID : Channel to create thread in // data : Parameters of the thread -func (s *Session) ThreadStartComplex(channelID string, data *ThreadStart) (ch *Channel, err error) { +func (s *Session) ThreadStartComplex(channelID string, data *ThreadStart, options ...RequestOption) (ch *Channel, err error) { endpoint := EndpointChannelThreads(channelID) var body []byte - body, err = s.RequestWithBucketID("POST", endpoint, data, endpoint) + body, err = s.RequestWithBucketID("POST", endpoint, data, endpoint, options...) if err != nil { return } @@ -2488,47 +2578,141 @@ func (s *Session) ThreadStartComplex(channelID string, data *ThreadStart) (ch *C // channelID : Channel to create thread in // name : Name of the thread // archiveDuration : Auto archive duration (in minutes) -func (s *Session) ThreadStart(channelID, name string, typ ChannelType, archiveDuration int) (ch *Channel, err error) { +func (s *Session) ThreadStart(channelID, name string, typ ChannelType, archiveDuration int, options ...RequestOption) (ch *Channel, err error) { return s.ThreadStartComplex(channelID, &ThreadStart{ Name: name, Type: typ, AutoArchiveDuration: archiveDuration, - }) + }, options...) +} + +// ForumThreadStartComplex starts a new thread (creates a post) in a forum channel. +// channelID : Channel to create thread in. +// threadData : Parameters of the thread. +// messageData : Parameters of the starting message. +func (s *Session) ForumThreadStartComplex(channelID string, threadData *ThreadStart, messageData *MessageSend, options ...RequestOption) (th *Channel, err error) { + endpoint := EndpointChannelThreads(channelID) + + // TODO: Remove this when compatibility is not required. + if messageData.Embed != nil { + if messageData.Embeds == nil { + messageData.Embeds = []*MessageEmbed{messageData.Embed} + } else { + err = fmt.Errorf("cannot specify both Embed and Embeds") + return + } + } + + for _, embed := range messageData.Embeds { + if embed.Type == "" { + embed.Type = "rich" + } + } + + // TODO: Remove this when compatibility is not required. + files := messageData.Files + if messageData.File != nil { + if files == nil { + files = []*File{messageData.File} + } else { + err = fmt.Errorf("cannot specify both File and Files") + return + } + } + + data := struct { + *ThreadStart + Message *MessageSend `json:"message"` + }{ThreadStart: threadData, Message: messageData} + + var response []byte + if len(files) > 0 { + contentType, body, encodeErr := MultipartBodyWithJSON(data, files) + if encodeErr != nil { + return th, encodeErr + } + + response, err = s.request("POST", endpoint, contentType, body, endpoint, 0, options...) + } else { + response, err = s.RequestWithBucketID("POST", endpoint, data, endpoint, options...) + } + if err != nil { + return + } + + err = unmarshal(response, &th) + return +} + +// ForumThreadStart starts a new thread (post) in a forum channel. +// channelID : Channel to create thread in. +// name : Name of the thread. +// archiveDuration : Auto archive duration. +// content : Content of the starting message. +func (s *Session) ForumThreadStart(channelID, name string, archiveDuration int, content string, options ...RequestOption) (th *Channel, err error) { + return s.ForumThreadStartComplex(channelID, &ThreadStart{ + Name: name, + AutoArchiveDuration: archiveDuration, + }, &MessageSend{Content: content}, options...) +} + +// ForumThreadStartEmbed starts a new thread (post) in a forum channel. +// channelID : Channel to create thread in. +// name : Name of the thread. +// archiveDuration : Auto archive duration. +// embed : Embed data of the starting message. +func (s *Session) ForumThreadStartEmbed(channelID, name string, archiveDuration int, embed *MessageEmbed, options ...RequestOption) (th *Channel, err error) { + return s.ForumThreadStartComplex(channelID, &ThreadStart{ + Name: name, + AutoArchiveDuration: archiveDuration, + }, &MessageSend{Embeds: []*MessageEmbed{embed}}, options...) +} + +// ForumThreadStartEmbeds starts a new thread (post) in a forum channel. +// channelID : Channel to create thread in. +// name : Name of the thread. +// archiveDuration : Auto archive duration. +// embeds : Embeds data of the starting message. +func (s *Session) ForumThreadStartEmbeds(channelID, name string, archiveDuration int, embeds []*MessageEmbed, options ...RequestOption) (th *Channel, err error) { + return s.ForumThreadStartComplex(channelID, &ThreadStart{ + Name: name, + AutoArchiveDuration: archiveDuration, + }, &MessageSend{Embeds: embeds}, options...) } // ThreadJoin adds current user to a thread -func (s *Session) ThreadJoin(id string) error { +func (s *Session) ThreadJoin(id string, options ...RequestOption) error { endpoint := EndpointThreadMember(id, "@me") - _, err := s.RequestWithBucketID("PUT", endpoint, nil, endpoint) + _, err := s.RequestWithBucketID("PUT", endpoint, nil, endpoint, options...) return err } // ThreadLeave removes current user to a thread -func (s *Session) ThreadLeave(id string) error { +func (s *Session) ThreadLeave(id string, options ...RequestOption) error { endpoint := EndpointThreadMember(id, "@me") - _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint) + _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint, options...) return err } // ThreadMemberAdd adds another member to a thread -func (s *Session) ThreadMemberAdd(threadID, memberID string) error { +func (s *Session) ThreadMemberAdd(threadID, memberID string, options ...RequestOption) error { endpoint := EndpointThreadMember(threadID, memberID) - _, err := s.RequestWithBucketID("PUT", endpoint, nil, endpoint) + _, err := s.RequestWithBucketID("PUT", endpoint, nil, endpoint, options...) return err } // ThreadMemberRemove removes another member from a thread -func (s *Session) ThreadMemberRemove(threadID, memberID string) error { +func (s *Session) ThreadMemberRemove(threadID, memberID string, options ...RequestOption) error { endpoint := EndpointThreadMember(threadID, memberID) - _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint) + _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint, options...) return err } // ThreadMember returns thread member object for the specified member of a thread -func (s *Session) ThreadMember(threadID, memberID string) (member *ThreadMember, err error) { +func (s *Session) ThreadMember(threadID, memberID string, options ...RequestOption) (member *ThreadMember, err error) { endpoint := EndpointThreadMember(threadID, memberID) var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return @@ -2539,9 +2723,9 @@ func (s *Session) ThreadMember(threadID, memberID string) (member *ThreadMember, } // ThreadMembers returns all members of specified thread. -func (s *Session) ThreadMembers(threadID string) (members []*ThreadMember, err error) { +func (s *Session) ThreadMembers(threadID string, options ...RequestOption) (members []*ThreadMember, err error) { var body []byte - body, err = s.RequestWithBucketID("GET", EndpointThreadMembers(threadID), nil, EndpointThreadMembers(threadID)) + body, err = s.RequestWithBucketID("GET", EndpointThreadMembers(threadID), nil, EndpointThreadMembers(threadID), options...) if err != nil { return @@ -2552,9 +2736,9 @@ func (s *Session) ThreadMembers(threadID string) (members []*ThreadMember, err e } // ThreadsActive returns all active threads for specified channel. -func (s *Session) ThreadsActive(channelID string) (threads *ThreadsList, err error) { +func (s *Session) ThreadsActive(channelID string, options ...RequestOption) (threads *ThreadsList, err error) { var body []byte - body, err = s.RequestWithBucketID("GET", EndpointChannelActiveThreads(channelID), nil, EndpointChannelActiveThreads(channelID)) + body, err = s.RequestWithBucketID("GET", EndpointChannelActiveThreads(channelID), nil, EndpointChannelActiveThreads(channelID), options...) if err != nil { return } @@ -2564,9 +2748,9 @@ func (s *Session) ThreadsActive(channelID string) (threads *ThreadsList, err err } // GuildThreadsActive returns all active threads for specified guild. -func (s *Session) GuildThreadsActive(guildID string) (threads *ThreadsList, err error) { +func (s *Session) GuildThreadsActive(guildID string, options ...RequestOption) (threads *ThreadsList, err error) { var body []byte - body, err = s.RequestWithBucketID("GET", EndpointGuildActiveThreads(guildID), nil, EndpointGuildActiveThreads(guildID)) + body, err = s.RequestWithBucketID("GET", EndpointGuildActiveThreads(guildID), nil, EndpointGuildActiveThreads(guildID), options...) if err != nil { return } @@ -2578,7 +2762,7 @@ func (s *Session) GuildThreadsActive(guildID string) (threads *ThreadsList, err // ThreadsArchived returns archived threads for specified channel. // before : If specified returns only threads before the timestamp // limit : Optional maximum amount of threads to return. -func (s *Session) ThreadsArchived(channelID string, before *time.Time, limit int) (threads *ThreadsList, err error) { +func (s *Session) ThreadsArchived(channelID string, before *time.Time, limit int, options ...RequestOption) (threads *ThreadsList, err error) { endpoint := EndpointChannelPublicArchivedThreads(channelID) v := url.Values{} if before != nil { @@ -2594,7 +2778,7 @@ func (s *Session) ThreadsArchived(channelID string, before *time.Time, limit int } var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -2606,7 +2790,7 @@ func (s *Session) ThreadsArchived(channelID string, before *time.Time, limit int // ThreadsPrivateArchived returns archived private threads for specified channel. // before : If specified returns only threads before the timestamp // limit : Optional maximum amount of threads to return. -func (s *Session) ThreadsPrivateArchived(channelID string, before *time.Time, limit int) (threads *ThreadsList, err error) { +func (s *Session) ThreadsPrivateArchived(channelID string, before *time.Time, limit int, options ...RequestOption) (threads *ThreadsList, err error) { endpoint := EndpointChannelPrivateArchivedThreads(channelID) v := url.Values{} if before != nil { @@ -2621,7 +2805,7 @@ func (s *Session) ThreadsPrivateArchived(channelID string, before *time.Time, li endpoint += "?" + v.Encode() } var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -2633,7 +2817,7 @@ func (s *Session) ThreadsPrivateArchived(channelID string, before *time.Time, li // ThreadsPrivateJoinedArchived returns archived joined private threads for specified channel. // before : If specified returns only threads before the timestamp // limit : Optional maximum amount of threads to return. -func (s *Session) ThreadsPrivateJoinedArchived(channelID string, before *time.Time, limit int) (threads *ThreadsList, err error) { +func (s *Session) ThreadsPrivateJoinedArchived(channelID string, before *time.Time, limit int, options ...RequestOption) (threads *ThreadsList, err error) { endpoint := EndpointChannelJoinedPrivateArchivedThreads(channelID) v := url.Values{} if before != nil { @@ -2648,7 +2832,7 @@ func (s *Session) ThreadsPrivateJoinedArchived(channelID string, before *time.Ti endpoint += "?" + v.Encode() } var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -2665,13 +2849,13 @@ func (s *Session) ThreadsPrivateJoinedArchived(channelID string, before *time.Ti // appID : The application ID. // guildID : Guild ID to create guild-specific application command. If empty - creates global application command. // cmd : New application command data. -func (s *Session) ApplicationCommandCreate(appID string, guildID string, cmd *ApplicationCommand) (ccmd *ApplicationCommand, err error) { +func (s *Session) ApplicationCommandCreate(appID string, guildID string, cmd *ApplicationCommand, options ...RequestOption) (ccmd *ApplicationCommand, err error) { endpoint := EndpointApplicationGlobalCommands(appID) if guildID != "" { endpoint = EndpointApplicationGuildCommands(appID, guildID) } - body, err := s.RequestWithBucketID("POST", endpoint, *cmd, endpoint) + body, err := s.RequestWithBucketID("POST", endpoint, *cmd, endpoint, options...) if err != nil { return } @@ -2686,13 +2870,13 @@ func (s *Session) ApplicationCommandCreate(appID string, guildID string, cmd *Ap // cmdID : Application command ID to edit. // guildID : Guild ID to edit guild-specific application command. If empty - edits global application command. // cmd : Updated application command data. -func (s *Session) ApplicationCommandEdit(appID, guildID, cmdID string, cmd *ApplicationCommand) (updated *ApplicationCommand, err error) { +func (s *Session) ApplicationCommandEdit(appID, guildID, cmdID string, cmd *ApplicationCommand, options ...RequestOption) (updated *ApplicationCommand, err error) { endpoint := EndpointApplicationGlobalCommand(appID, cmdID) if guildID != "" { endpoint = EndpointApplicationGuildCommand(appID, guildID, cmdID) } - body, err := s.RequestWithBucketID("PATCH", endpoint, *cmd, endpoint) + body, err := s.RequestWithBucketID("PATCH", endpoint, *cmd, endpoint, options...) if err != nil { return } @@ -2705,13 +2889,13 @@ func (s *Session) ApplicationCommandEdit(appID, guildID, cmdID string, cmd *Appl // ApplicationCommandBulkOverwrite Creates commands overwriting existing commands. Returns a list of commands. // appID : The application ID. // commands : The commands to create. -func (s *Session) ApplicationCommandBulkOverwrite(appID string, guildID string, commands []*ApplicationCommand) (createdCommands []*ApplicationCommand, err error) { +func (s *Session) ApplicationCommandBulkOverwrite(appID string, guildID string, commands []*ApplicationCommand, options ...RequestOption) (createdCommands []*ApplicationCommand, err error) { endpoint := EndpointApplicationGlobalCommands(appID) if guildID != "" { endpoint = EndpointApplicationGuildCommands(appID, guildID) } - body, err := s.RequestWithBucketID("PUT", endpoint, commands, endpoint) + body, err := s.RequestWithBucketID("PUT", endpoint, commands, endpoint, options...) if err != nil { return } @@ -2725,13 +2909,13 @@ func (s *Session) ApplicationCommandBulkOverwrite(appID string, guildID string, // appID : The application ID. // cmdID : Application command ID to delete. // guildID : Guild ID to delete guild-specific application command. If empty - deletes global application command. -func (s *Session) ApplicationCommandDelete(appID, guildID, cmdID string) error { +func (s *Session) ApplicationCommandDelete(appID, guildID, cmdID string, options ...RequestOption) error { endpoint := EndpointApplicationGlobalCommand(appID, cmdID) if guildID != "" { endpoint = EndpointApplicationGuildCommand(appID, guildID, cmdID) } - _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint) + _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint, options...) return err } @@ -2740,13 +2924,13 @@ func (s *Session) ApplicationCommandDelete(appID, guildID, cmdID string) error { // appID : The application ID. // cmdID : Application command ID. // guildID : Guild ID to retrieve guild-specific application command. If empty - retrieves global application command. -func (s *Session) ApplicationCommand(appID, guildID, cmdID string) (cmd *ApplicationCommand, err error) { +func (s *Session) ApplicationCommand(appID, guildID, cmdID string, options ...RequestOption) (cmd *ApplicationCommand, err error) { endpoint := EndpointApplicationGlobalCommand(appID, cmdID) if guildID != "" { endpoint = EndpointApplicationGuildCommand(appID, guildID, cmdID) } - body, err := s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err := s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -2759,13 +2943,13 @@ func (s *Session) ApplicationCommand(appID, guildID, cmdID string) (cmd *Applica // ApplicationCommands retrieves all commands in application. // appID : The application ID. // guildID : Guild ID to retrieve all guild-specific application commands. If empty - retrieves global application commands. -func (s *Session) ApplicationCommands(appID, guildID string) (cmd []*ApplicationCommand, err error) { +func (s *Session) ApplicationCommands(appID, guildID string, options ...RequestOption) (cmd []*ApplicationCommand, err error) { endpoint := EndpointApplicationGlobalCommands(appID) if guildID != "" { endpoint = EndpointApplicationGuildCommands(appID, guildID) } - body, err := s.RequestWithBucketID("GET", endpoint+"?with_localizations=true", nil, "GET "+endpoint) + body, err := s.RequestWithBucketID("GET", endpoint+"?with_localizations=true", nil, "GET "+endpoint, options...) if err != nil { return } @@ -2778,11 +2962,11 @@ func (s *Session) ApplicationCommands(appID, guildID string) (cmd []*Application // GuildApplicationCommandsPermissions returns permissions for application commands in a guild. // appID : The application ID // guildID : Guild ID to retrieve application commands permissions for. -func (s *Session) GuildApplicationCommandsPermissions(appID, guildID string) (permissions []*GuildApplicationCommandPermissions, err error) { +func (s *Session) GuildApplicationCommandsPermissions(appID, guildID string, options ...RequestOption) (permissions []*GuildApplicationCommandPermissions, err error) { endpoint := EndpointApplicationCommandsGuildPermissions(appID, guildID) var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -2795,11 +2979,11 @@ func (s *Session) GuildApplicationCommandsPermissions(appID, guildID string) (pe // appID : The Application ID // guildID : The guild ID containing the application command // cmdID : The command ID to retrieve the permissions of -func (s *Session) ApplicationCommandPermissions(appID, guildID, cmdID string) (permissions *GuildApplicationCommandPermissions, err error) { +func (s *Session) ApplicationCommandPermissions(appID, guildID, cmdID string, options ...RequestOption) (permissions *GuildApplicationCommandPermissions, err error) { endpoint := EndpointApplicationCommandPermissions(appID, guildID, cmdID) var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -2815,10 +2999,10 @@ func (s *Session) ApplicationCommandPermissions(appID, guildID, cmdID string) (p // permissions : An object containing a list of permissions for the application command // // NOTE: Requires OAuth2 token with applications.commands.permissions.update scope -func (s *Session) ApplicationCommandPermissionsEdit(appID, guildID, cmdID string, permissions *ApplicationCommandPermissionsList) (err error) { +func (s *Session) ApplicationCommandPermissionsEdit(appID, guildID, cmdID string, permissions *ApplicationCommandPermissionsList, options ...RequestOption) (err error) { endpoint := EndpointApplicationCommandPermissions(appID, guildID, cmdID) - _, err = s.RequestWithBucketID("PUT", endpoint, permissions, endpoint) + _, err = s.RequestWithBucketID("PUT", endpoint, permissions, endpoint, options...) return } @@ -2828,17 +3012,17 @@ func (s *Session) ApplicationCommandPermissionsEdit(appID, guildID, cmdID string // permissions : A list of permissions paired with a command ID, guild ID, and application ID per application command // // NOTE: This endpoint has been disabled with updates to command permissions (Permissions v2). Please use ApplicationCommandPermissionsEdit instead. -func (s *Session) ApplicationCommandPermissionsBatchEdit(appID, guildID string, permissions []*GuildApplicationCommandPermissions) (err error) { +func (s *Session) ApplicationCommandPermissionsBatchEdit(appID, guildID string, permissions []*GuildApplicationCommandPermissions, options ...RequestOption) (err error) { endpoint := EndpointApplicationCommandsGuildPermissions(appID, guildID) - _, err = s.RequestWithBucketID("PUT", endpoint, permissions, endpoint) + _, err = s.RequestWithBucketID("PUT", endpoint, permissions, endpoint, options...) return } // InteractionRespond creates the response to an interaction. // interaction : Interaction instance. // resp : Response message data. -func (s *Session) InteractionRespond(interaction *Interaction, resp *InteractionResponse) error { +func (s *Session) InteractionRespond(interaction *Interaction, resp *InteractionResponse, options ...RequestOption) error { endpoint := EndpointInteractionResponse(interaction.ID, interaction.Token) if resp.Data != nil && len(resp.Data.Files) > 0 { @@ -2847,33 +3031,33 @@ func (s *Session) InteractionRespond(interaction *Interaction, resp *Interaction return err } - _, err = s.request("POST", endpoint, contentType, body, endpoint, 0) + _, err = s.request("POST", endpoint, contentType, body, endpoint, 0, options...) return err } - _, err := s.RequestWithBucketID("POST", endpoint, *resp, endpoint) + _, err := s.RequestWithBucketID("POST", endpoint, *resp, endpoint, options...) return err } // InteractionResponse gets the response to an interaction. // interaction : Interaction instance. -func (s *Session) InteractionResponse(interaction *Interaction) (*Message, error) { - return s.WebhookMessage(interaction.AppID, interaction.Token, "@original") +func (s *Session) InteractionResponse(interaction *Interaction, options ...RequestOption) (*Message, error) { + return s.WebhookMessage(interaction.AppID, interaction.Token, "@original", options...) } // InteractionResponseEdit edits the response to an interaction. // interaction : Interaction instance. // newresp : Updated response message data. -func (s *Session) InteractionResponseEdit(interaction *Interaction, newresp *WebhookEdit) (*Message, error) { - return s.WebhookMessageEdit(interaction.AppID, interaction.Token, "@original", newresp) +func (s *Session) InteractionResponseEdit(interaction *Interaction, newresp *WebhookEdit, options ...RequestOption) (*Message, error) { + return s.WebhookMessageEdit(interaction.AppID, interaction.Token, "@original", newresp, options...) } // InteractionResponseDelete deletes the response to an interaction. // interaction : Interaction instance. -func (s *Session) InteractionResponseDelete(interaction *Interaction) error { +func (s *Session) InteractionResponseDelete(interaction *Interaction, options ...RequestOption) error { endpoint := EndpointInteractionResponseActions(interaction.AppID, interaction.Token) - _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint) + _, err := s.RequestWithBucketID("DELETE", endpoint, nil, endpoint, options...) return err } @@ -2882,23 +3066,23 @@ func (s *Session) InteractionResponseDelete(interaction *Interaction) error { // interaction : Interaction instance. // wait : Waits for server confirmation of message send and ensures that the return struct is populated (it is nil otherwise) // data : Data of the message to send. -func (s *Session) FollowupMessageCreate(interaction *Interaction, wait bool, data *WebhookParams) (*Message, error) { - return s.WebhookExecute(interaction.AppID, interaction.Token, wait, data) +func (s *Session) FollowupMessageCreate(interaction *Interaction, wait bool, data *WebhookParams, options ...RequestOption) (*Message, error) { + return s.WebhookExecute(interaction.AppID, interaction.Token, wait, data, options...) } // FollowupMessageEdit edits a followup message of an interaction. // interaction : Interaction instance. // messageID : The followup message ID. // data : Data to update the message -func (s *Session) FollowupMessageEdit(interaction *Interaction, messageID string, data *WebhookEdit) (*Message, error) { - return s.WebhookMessageEdit(interaction.AppID, interaction.Token, messageID, data) +func (s *Session) FollowupMessageEdit(interaction *Interaction, messageID string, data *WebhookEdit, options ...RequestOption) (*Message, error) { + return s.WebhookMessageEdit(interaction.AppID, interaction.Token, messageID, data, options...) } // FollowupMessageDelete deletes a followup message of an interaction. // interaction : Interaction instance. // messageID : The followup message ID. -func (s *Session) FollowupMessageDelete(interaction *Interaction, messageID string) error { - return s.WebhookMessageDelete(interaction.AppID, interaction.Token, messageID) +func (s *Session) FollowupMessageDelete(interaction *Interaction, messageID string, options ...RequestOption) error { + return s.WebhookMessageDelete(interaction.AppID, interaction.Token, messageID, options...) } // ------------------------------------------------------------------------------------------------ @@ -2908,8 +3092,8 @@ func (s *Session) FollowupMessageDelete(interaction *Interaction, messageID stri // StageInstanceCreate creates and returns a new Stage instance associated to a Stage channel. // data : Parameters needed to create a stage instance. // data : The data of the Stage instance to create -func (s *Session) StageInstanceCreate(data *StageInstanceParams) (si *StageInstance, err error) { - body, err := s.RequestWithBucketID("POST", EndpointStageInstances, data, EndpointStageInstances) +func (s *Session) StageInstanceCreate(data *StageInstanceParams, options ...RequestOption) (si *StageInstance, err error) { + body, err := s.RequestWithBucketID("POST", EndpointStageInstances, data, EndpointStageInstances, options...) if err != nil { return } @@ -2920,8 +3104,8 @@ func (s *Session) StageInstanceCreate(data *StageInstanceParams) (si *StageInsta // StageInstance will retrieve a Stage instance by ID of the Stage channel. // channelID : The ID of the Stage channel -func (s *Session) StageInstance(channelID string) (si *StageInstance, err error) { - body, err := s.RequestWithBucketID("GET", EndpointStageInstance(channelID), nil, EndpointStageInstance(channelID)) +func (s *Session) StageInstance(channelID string, options ...RequestOption) (si *StageInstance, err error) { + body, err := s.RequestWithBucketID("GET", EndpointStageInstance(channelID), nil, EndpointStageInstance(channelID), options...) if err != nil { return } @@ -2933,9 +3117,9 @@ func (s *Session) StageInstance(channelID string) (si *StageInstance, err error) // StageInstanceEdit will edit a Stage instance by ID of the Stage channel. // channelID : The ID of the Stage channel // data : The data to edit the Stage instance -func (s *Session) StageInstanceEdit(channelID string, data *StageInstanceParams) (si *StageInstance, err error) { +func (s *Session) StageInstanceEdit(channelID string, data *StageInstanceParams, options ...RequestOption) (si *StageInstance, err error) { - body, err := s.RequestWithBucketID("PATCH", EndpointStageInstance(channelID), data, EndpointStageInstance(channelID)) + body, err := s.RequestWithBucketID("PATCH", EndpointStageInstance(channelID), data, EndpointStageInstance(channelID), options...) if err != nil { return } @@ -2946,8 +3130,8 @@ func (s *Session) StageInstanceEdit(channelID string, data *StageInstanceParams) // StageInstanceDelete will delete a Stage instance by ID of the Stage channel. // channelID : The ID of the Stage channel -func (s *Session) StageInstanceDelete(channelID string) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointStageInstance(channelID), nil, EndpointStageInstance(channelID)) +func (s *Session) StageInstanceDelete(channelID string, options ...RequestOption) (err error) { + _, err = s.RequestWithBucketID("DELETE", EndpointStageInstance(channelID), nil, EndpointStageInstance(channelID), options...) return } @@ -2958,13 +3142,13 @@ func (s *Session) StageInstanceDelete(channelID string) (err error) { // GuildScheduledEvents returns an array of GuildScheduledEvent for a guild // guildID : The ID of a Guild // userCount : Whether to include the user count in the response -func (s *Session) GuildScheduledEvents(guildID string, userCount bool) (st []*GuildScheduledEvent, err error) { +func (s *Session) GuildScheduledEvents(guildID string, userCount bool, options ...RequestOption) (st []*GuildScheduledEvent, err error) { uri := EndpointGuildScheduledEvents(guildID) if userCount { uri += "?with_user_count=true" } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildScheduledEvents(guildID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildScheduledEvents(guildID), options...) if err != nil { return } @@ -2977,13 +3161,13 @@ func (s *Session) GuildScheduledEvents(guildID string, userCount bool) (st []*Gu // guildID : The ID of a Guild // eventID : The ID of the event // userCount : Whether to include the user count in the response -func (s *Session) GuildScheduledEvent(guildID, eventID string, userCount bool) (st *GuildScheduledEvent, err error) { +func (s *Session) GuildScheduledEvent(guildID, eventID string, userCount bool, options ...RequestOption) (st *GuildScheduledEvent, err error) { uri := EndpointGuildScheduledEvent(guildID, eventID) if userCount { uri += "?with_user_count=true" } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildScheduledEvent(guildID, eventID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildScheduledEvent(guildID, eventID), options...) if err != nil { return } @@ -2995,8 +3179,8 @@ func (s *Session) GuildScheduledEvent(guildID, eventID string, userCount bool) ( // GuildScheduledEventCreate creates a GuildScheduledEvent for a guild and returns it // guildID : The ID of a Guild // eventID : The ID of the event -func (s *Session) GuildScheduledEventCreate(guildID string, event *GuildScheduledEventParams) (st *GuildScheduledEvent, err error) { - body, err := s.RequestWithBucketID("POST", EndpointGuildScheduledEvents(guildID), event, EndpointGuildScheduledEvents(guildID)) +func (s *Session) GuildScheduledEventCreate(guildID string, event *GuildScheduledEventParams, options ...RequestOption) (st *GuildScheduledEvent, err error) { + body, err := s.RequestWithBucketID("POST", EndpointGuildScheduledEvents(guildID), event, EndpointGuildScheduledEvents(guildID), options...) if err != nil { return } @@ -3008,8 +3192,8 @@ func (s *Session) GuildScheduledEventCreate(guildID string, event *GuildSchedule // GuildScheduledEventEdit updates a specific event for a guild and returns it. // guildID : The ID of a Guild // eventID : The ID of the event -func (s *Session) GuildScheduledEventEdit(guildID, eventID string, event *GuildScheduledEventParams) (st *GuildScheduledEvent, err error) { - body, err := s.RequestWithBucketID("PATCH", EndpointGuildScheduledEvent(guildID, eventID), event, EndpointGuildScheduledEvent(guildID, eventID)) +func (s *Session) GuildScheduledEventEdit(guildID, eventID string, event *GuildScheduledEventParams, options ...RequestOption) (st *GuildScheduledEvent, err error) { + body, err := s.RequestWithBucketID("PATCH", EndpointGuildScheduledEvent(guildID, eventID), event, EndpointGuildScheduledEvent(guildID, eventID), options...) if err != nil { return } @@ -3021,8 +3205,8 @@ func (s *Session) GuildScheduledEventEdit(guildID, eventID string, event *GuildS // GuildScheduledEventDelete deletes a specific GuildScheduledEvent in a guild // guildID : The ID of a Guild // eventID : The ID of the event -func (s *Session) GuildScheduledEventDelete(guildID, eventID string) (err error) { - _, err = s.RequestWithBucketID("DELETE", EndpointGuildScheduledEvent(guildID, eventID), nil, EndpointGuildScheduledEvent(guildID, eventID)) +func (s *Session) GuildScheduledEventDelete(guildID, eventID string, options ...RequestOption) (err error) { + _, err = s.RequestWithBucketID("DELETE", EndpointGuildScheduledEvent(guildID, eventID), nil, EndpointGuildScheduledEvent(guildID, eventID), options...) return } @@ -3033,7 +3217,7 @@ func (s *Session) GuildScheduledEventDelete(guildID, eventID string) (err error) // withMember : Whether to include the member object in the response // beforeID : If is not empty all returned users entries will be before the given ID // afterID : If is not empty all returned users entries will be after the given ID -func (s *Session) GuildScheduledEventUsers(guildID, eventID string, limit int, withMember bool, beforeID, afterID string) (st []*GuildScheduledEventUser, err error) { +func (s *Session) GuildScheduledEventUsers(guildID, eventID string, limit int, withMember bool, beforeID, afterID string, options ...RequestOption) (st []*GuildScheduledEventUser, err error) { uri := EndpointGuildScheduledEventUsers(guildID, eventID) queryParams := url.Values{} @@ -3054,7 +3238,7 @@ func (s *Session) GuildScheduledEventUsers(guildID, eventID string, limit int, w uri += "?" + queryParams.Encode() } - body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildScheduledEventUsers(guildID, eventID)) + body, err := s.RequestWithBucketID("GET", uri, nil, EndpointGuildScheduledEventUsers(guildID, eventID), options...) if err != nil { return } @@ -3069,11 +3253,11 @@ func (s *Session) GuildScheduledEventUsers(guildID, eventID string, limit int, w // AutoModerationRules returns a list of auto moderation rules. // guildID : ID of the guild -func (s *Session) AutoModerationRules(guildID string) (st []*AutoModerationRule, err error) { +func (s *Session) AutoModerationRules(guildID string, options ...RequestOption) (st []*AutoModerationRule, err error) { endpoint := EndpointGuildAutoModerationRules(guildID) var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -3085,11 +3269,11 @@ func (s *Session) AutoModerationRules(guildID string) (st []*AutoModerationRule, // AutoModerationRule returns an auto moderation rule. // guildID : ID of the guild // ruleID : ID of the auto moderation rule -func (s *Session) AutoModerationRule(guildID, ruleID string) (st *AutoModerationRule, err error) { +func (s *Session) AutoModerationRule(guildID, ruleID string, options ...RequestOption) (st *AutoModerationRule, err error) { endpoint := EndpointGuildAutoModerationRule(guildID, ruleID) var body []byte - body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint, options...) if err != nil { return } @@ -3101,11 +3285,11 @@ func (s *Session) AutoModerationRule(guildID, ruleID string) (st *AutoModeration // AutoModerationRuleCreate creates an auto moderation rule with the given data and returns it. // guildID : ID of the guild // rule : Rule data -func (s *Session) AutoModerationRuleCreate(guildID string, rule *AutoModerationRule) (st *AutoModerationRule, err error) { +func (s *Session) AutoModerationRuleCreate(guildID string, rule *AutoModerationRule, options ...RequestOption) (st *AutoModerationRule, err error) { endpoint := EndpointGuildAutoModerationRules(guildID) var body []byte - body, err = s.RequestWithBucketID("POST", endpoint, rule, endpoint) + body, err = s.RequestWithBucketID("POST", endpoint, rule, endpoint, options...) if err != nil { return } @@ -3118,11 +3302,11 @@ func (s *Session) AutoModerationRuleCreate(guildID string, rule *AutoModerationR // guildID : ID of the guild // ruleID : ID of the auto moderation rule // rule : New rule data -func (s *Session) AutoModerationRuleEdit(guildID, ruleID string, rule *AutoModerationRule) (st *AutoModerationRule, err error) { +func (s *Session) AutoModerationRuleEdit(guildID, ruleID string, rule *AutoModerationRule, options ...RequestOption) (st *AutoModerationRule, err error) { endpoint := EndpointGuildAutoModerationRule(guildID, ruleID) var body []byte - body, err = s.RequestWithBucketID("PATCH", endpoint, rule, endpoint) + body, err = s.RequestWithBucketID("PATCH", endpoint, rule, endpoint, options...) if err != nil { return } @@ -3134,8 +3318,67 @@ func (s *Session) AutoModerationRuleEdit(guildID, ruleID string, rule *AutoModer // AutoModerationRuleDelete deletes an auto moderation rule. // guildID : ID of the guild // ruleID : ID of the auto moderation rule -func (s *Session) AutoModerationRuleDelete(guildID, ruleID string) (err error) { +func (s *Session) AutoModerationRuleDelete(guildID, ruleID string, options ...RequestOption) (err error) { endpoint := EndpointGuildAutoModerationRule(guildID, ruleID) - _, err = s.RequestWithBucketID("DELETE", endpoint, nil, endpoint) + _, err = s.RequestWithBucketID("DELETE", endpoint, nil, endpoint, options...) + return +} + +// ApplicationRoleConnectionMetadata returns application role connection metadata. +// appID : ID of the application +func (s *Session) ApplicationRoleConnectionMetadata(appID string) (st []*ApplicationRoleConnectionMetadata, err error) { + endpoint := EndpointApplicationRoleConnectionMetadata(appID) + var body []byte + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + if err != nil { + return + } + + err = unmarshal(body, &st) + return +} + +// ApplicationRoleConnectionMetadataUpdate updates and returns application role connection metadata. +// appID : ID of the application +// metadata : New metadata +func (s *Session) ApplicationRoleConnectionMetadataUpdate(appID string, metadata []*ApplicationRoleConnectionMetadata) (st []*ApplicationRoleConnectionMetadata, err error) { + endpoint := EndpointApplicationRoleConnectionMetadata(appID) + var body []byte + body, err = s.RequestWithBucketID("PUT", endpoint, metadata, endpoint) + if err != nil { + return + } + + err = unmarshal(body, &st) + return +} + +// UserApplicationRoleConnection returns user role connection to the specified application. +// appID : ID of the application +func (s *Session) UserApplicationRoleConnection(appID string) (st *ApplicationRoleConnection, err error) { + endpoint := EndpointUserApplicationRoleConnection(appID) + var body []byte + body, err = s.RequestWithBucketID("GET", endpoint, nil, endpoint) + if err != nil { + return + } + + err = unmarshal(body, &st) + return + +} + +// UserApplicationRoleConnectionUpdate updates and returns user role connection to the specified application. +// appID : ID of the application +// connection : New ApplicationRoleConnection data +func (s *Session) UserApplicationRoleConnectionUpdate(appID string, rconn *ApplicationRoleConnection) (st *ApplicationRoleConnection, err error) { + endpoint := EndpointUserApplicationRoleConnection(appID) + var body []byte + body, err = s.RequestWithBucketID("PUT", endpoint, rconn, endpoint) + if err != nil { + return + } + + err = unmarshal(body, &st) return } diff --git a/vendor/github.com/bwmarrin/discordgo/state.go b/vendor/github.com/bwmarrin/discordgo/state.go index 6404b71d..d0c7b422 100644 --- a/vendor/github.com/bwmarrin/discordgo/state.go +++ b/vendor/github.com/bwmarrin/discordgo/state.go @@ -207,6 +207,15 @@ func (s *State) presenceAdd(guildID string, presence *Presence) error { if presence.Status != "" { guild.Presences[i].Status = presence.Status } + if presence.ClientStatus.Desktop != "" { + guild.Presences[i].ClientStatus.Desktop = presence.ClientStatus.Desktop + } + if presence.ClientStatus.Mobile != "" { + guild.Presences[i].ClientStatus.Mobile = presence.ClientStatus.Mobile + } + if presence.ClientStatus.Web != "" { + guild.Presences[i].ClientStatus.Web = presence.ClientStatus.Web + } //Update the optionally sent user information //ID Is a mandatory field so you should not need to check if it is empty @@ -909,9 +918,11 @@ func (s *State) onReady(se *Session, r *Ready) (err error) { // if state is disabled, store the bare essentials. if !se.StateEnabled { ready := Ready{ - Version: r.Version, - SessionID: r.SessionID, - User: r.User, + Version: r.Version, + SessionID: r.SessionID, + User: r.User, + Shard: r.Shard, + Application: r.Application, } s.Ready = ready @@ -981,6 +992,13 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) { } case *GuildMemberUpdate: if s.TrackMembers { + var old *Member + old, err = s.Member(t.GuildID, t.User.ID) + if err == nil { + oldCopy := *old + t.BeforeUpdate = &oldCopy + } + err = s.MemberAdd(t.Member) } case *GuildMemberRemove: @@ -1023,7 +1041,14 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) { } case *GuildEmojisUpdate: if s.TrackEmojis { - err = s.EmojisAdd(t.GuildID, t.Emojis) + var guild *Guild + guild, err = s.Guild(t.GuildID) + if err != nil { + return err + } + s.Lock() + defer s.Unlock() + guild.Emojis = t.Emojis } case *ChannelCreate: if s.TrackChannels { diff --git a/vendor/github.com/bwmarrin/discordgo/structs.go b/vendor/github.com/bwmarrin/discordgo/structs.go index 26f507a9..1c29a7e9 100644 --- a/vendor/github.com/bwmarrin/discordgo/structs.go +++ b/vendor/github.com/bwmarrin/discordgo/structs.go @@ -17,7 +17,6 @@ import ( "math" "net/http" "regexp" - "strings" "sync" "time" @@ -156,6 +155,38 @@ type Application struct { Flags int `json:"flags,omitempty"` } +// ApplicationRoleConnectionMetadataType represents the type of application role connection metadata. +type ApplicationRoleConnectionMetadataType int + +// Application role connection metadata types. +const ( + ApplicationRoleConnectionMetadataIntegerLessThanOrEqual ApplicationRoleConnectionMetadataType = 1 + ApplicationRoleConnectionMetadataIntegerGreaterThanOrEqual ApplicationRoleConnectionMetadataType = 2 + ApplicationRoleConnectionMetadataIntegerEqual ApplicationRoleConnectionMetadataType = 3 + ApplicationRoleConnectionMetadataIntegerNotEqual ApplicationRoleConnectionMetadataType = 4 + ApplicationRoleConnectionMetadataDatetimeLessThanOrEqual ApplicationRoleConnectionMetadataType = 5 + ApplicationRoleConnectionMetadataDatetimeGreaterThanOrEqual ApplicationRoleConnectionMetadataType = 6 + ApplicationRoleConnectionMetadataBooleanEqual ApplicationRoleConnectionMetadataType = 7 + ApplicationRoleConnectionMetadataBooleanNotEqual ApplicationRoleConnectionMetadataType = 8 +) + +// ApplicationRoleConnectionMetadata stores application role connection metadata. +type ApplicationRoleConnectionMetadata struct { + Type ApplicationRoleConnectionMetadataType `json:"type"` + Key string `json:"key"` + Name string `json:"name"` + NameLocalizations map[Locale]string `json:"name_localizations"` + Description string `json:"description"` + DescriptionLocalizations map[Locale]string `json:"description_localizations"` +} + +// ApplicationRoleConnection represents the role connection that an application has attached to a user. +type ApplicationRoleConnection struct { + PlatformName string `json:"platform_name"` + PlatformUsername string `json:"platform_username"` + Metadata map[string]string `json:"metadata"` +} + // UserConnection is a Connection returned from the UserConnections endpoint type UserConnection struct { ID string `json:"id"` @@ -254,6 +285,42 @@ const ( ChannelTypeGuildPublicThread ChannelType = 11 ChannelTypeGuildPrivateThread ChannelType = 12 ChannelTypeGuildStageVoice ChannelType = 13 + ChannelTypeGuildForum ChannelType = 15 +) + +// ChannelFlags represent flags of a channel/thread. +type ChannelFlags int + +// Block containing known ChannelFlags values. +const ( + // ChannelFlagPinned indicates whether the thread is pinned in the forum channel. + // NOTE: forum threads only. + ChannelFlagPinned ChannelFlags = 1 << 1 + // ChannelFlagRequireTag indicates whether a tag is required to be specified when creating a thread. + // NOTE: forum channels only. + ChannelFlagRequireTag ChannelFlags = 1 << 4 +) + +// ForumSortOrderType represents sort order of a forum channel. +type ForumSortOrderType int + +const ( + // ForumSortOrderLatestActivity sorts posts by activity. + ForumSortOrderLatestActivity ForumSortOrderType = 0 + // ForumSortOrderCreationDate sorts posts by creation time (from most recent to oldest). + ForumSortOrderCreationDate ForumSortOrderType = 1 +) + +// ForumLayout represents layout of a forum channel. +type ForumLayout int + +const ( + // ForumLayoutNotSet represents no default layout. + ForumLayoutNotSet ForumLayout = 0 + // ForumLayoutListView displays forum posts as a list. + ForumLayoutListView ForumLayout = 1 + // ForumLayoutGalleryView displays forum posts as a collection of tiles. + ForumLayoutGalleryView ForumLayout = 2 ) // A Channel holds all data related to an individual Discord channel. @@ -332,6 +399,30 @@ type Channel struct { // All thread members. State channels only. Members []*ThreadMember `json:"-"` + + // Channel flags. + Flags ChannelFlags `json:"flags"` + + // The set of tags that can be used in a forum channel. + AvailableTags []ForumTag `json:"available_tags"` + + // The IDs of the set of tags that have been applied to a thread in a forum channel. + AppliedTags []string `json:"applied_tags"` + + // Emoji to use as the default reaction to a forum post. + DefaultReactionEmoji ForumDefaultReaction `json:"default_reaction_emoji"` + + // The initial RateLimitPerUser to set on newly created threads in a channel. + // This field is copied to the thread at creation time and does not live update. + DefaultThreadRateLimitPerUser int `json:"default_thread_rate_limit_per_user"` + + // The default sort order type used to order posts in forum channels. + // Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin. + DefaultSortOrder *ForumSortOrderType `json:"default_sort_order"` + + // The default forum layout view used to display posts in forum channels. + // Defaults to ForumLayoutNotSet, which indicates a layout view has not been set by a channel admin. + DefaultForumLayout ForumLayout `json:"default_forum_layout"` } // Mention returns a string which mentions the channel @@ -346,15 +437,17 @@ func (c *Channel) IsThread() bool { // A ChannelEdit holds Channel Field data for a channel edit. type ChannelEdit struct { - Name string `json:"name,omitempty"` - Topic string `json:"topic,omitempty"` - NSFW *bool `json:"nsfw,omitempty"` - Position int `json:"position"` - Bitrate int `json:"bitrate,omitempty"` - UserLimit int `json:"user_limit,omitempty"` - PermissionOverwrites []*PermissionOverwrite `json:"permission_overwrites,omitempty"` - ParentID string `json:"parent_id,omitempty"` - RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"` + Name string `json:"name,omitempty"` + Topic string `json:"topic,omitempty"` + NSFW *bool `json:"nsfw,omitempty"` + Position int `json:"position"` + Bitrate int `json:"bitrate,omitempty"` + UserLimit int `json:"user_limit,omitempty"` + PermissionOverwrites []*PermissionOverwrite `json:"permission_overwrites,omitempty"` + ParentID string `json:"parent_id,omitempty"` + RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"` + Flags *ChannelFlags `json:"flags,omitempty"` + DefaultThreadRateLimitPerUser *int `json:"default_thread_rate_limit_per_user,omitempty"` // NOTE: threads only @@ -362,6 +455,16 @@ type ChannelEdit struct { AutoArchiveDuration int `json:"auto_archive_duration,omitempty"` Locked *bool `json:"locked,omitempty"` Invitable *bool `json:"invitable,omitempty"` + + // NOTE: forum channels only + + AvailableTags *[]ForumTag `json:"available_tags,omitempty"` + DefaultReactionEmoji *ForumDefaultReaction `json:"default_reaction_emoji,omitempty"` + DefaultSortOrder *ForumSortOrderType `json:"default_sort_order,omitempty"` // TODO: null + DefaultForumLayout *ForumLayout `json:"default_forum_layout,omitempty"` + + // NOTE: forum threads only + AppliedTags *[]string `json:"applied_tags,omitempty"` } // A ChannelFollow holds data returned after following a news channel @@ -395,6 +498,9 @@ type ThreadStart struct { Type ChannelType `json:"type,omitempty"` Invitable bool `json:"invitable"` RateLimitPerUser int `json:"rate_limit_per_user,omitempty"` + + // NOTE: forum threads only + AppliedTags []string `json:"applied_tags,omitempty"` } // ThreadMetadata contains a number of thread-specific channel fields that are not needed by other channel types. @@ -438,6 +544,24 @@ type AddedThreadMember struct { Presence *Presence `json:"presence"` } +// ForumDefaultReaction specifies emoji to use as the default reaction to a forum post. +// NOTE: Exactly one of EmojiID and EmojiName must be set. +type ForumDefaultReaction struct { + // The id of a guild's custom emoji. + EmojiID string `json:"emoji_id,omitempty"` + // The unicode character of the emoji. + EmojiName string `json:"emoji_name,omitempty"` +} + +// ForumTag represents a tag that is able to be applied to a thread in a forum channel. +type ForumTag struct { + ID string `json:"id,omitempty"` + Name string `json:"name"` + Moderated bool `json:"moderated"` + EmojiID string `json:"emoji_id,omitempty"` + EmojiName string `json:"emoji_name,omitempty"` +} + // Emoji struct holds data related to Emoji's type Emoji struct { ID string `json:"id"` @@ -452,7 +576,7 @@ type Emoji struct { // EmojiRegex is the regex used to find and identify emojis in messages var ( - EmojiRegex = regexp.MustCompile(`<(a|):[A-z0-9_~]+:[0-9]{18}>`) + EmojiRegex = regexp.MustCompile(`<(a|):[A-z0-9_~]+:[0-9]{18,20}>`) ) // MessageFormat returns a correctly formatted Emoji for use in Message content and embeds @@ -792,16 +916,11 @@ type GuildPreview struct { } // IconURL returns a URL to the guild's icon. -func (g *GuildPreview) IconURL() string { - if g.Icon == "" { - return "" - } - - if strings.HasPrefix(g.Icon, "a_") { - return EndpointGuildIconAnimated(g.ID, g.Icon) - } - - return EndpointGuildIcon(g.ID, g.Icon) +// +// size: The size of the desired icon image as a power of two +// Image size can be any power of two between 16 and 4096. +func (g *GuildPreview) IconURL(size string) string { + return iconURL(g.Icon, EndpointGuildIcon(g.ID, g.Icon), EndpointGuildIconAnimated(g.ID, g.Icon), size) } // GuildScheduledEvent is a representation of a scheduled event in a guild. Only for retrieval of the data. @@ -917,13 +1036,13 @@ type GuildScheduledEventStatus int const ( // GuildScheduledEventStatusScheduled represents the current event is in scheduled state - GuildScheduledEventStatusScheduled = 1 + GuildScheduledEventStatusScheduled GuildScheduledEventStatus = 1 // GuildScheduledEventStatusActive represents the current event is in active state - GuildScheduledEventStatusActive = 2 + GuildScheduledEventStatusActive GuildScheduledEventStatus = 2 // GuildScheduledEventStatusCompleted represents the current event is in completed state - GuildScheduledEventStatusCompleted = 3 + GuildScheduledEventStatusCompleted GuildScheduledEventStatus = 3 // GuildScheduledEventStatusCanceled represents the current event is in canceled state - GuildScheduledEventStatusCanceled = 4 + GuildScheduledEventStatusCanceled GuildScheduledEventStatus = 4 ) // GuildScheduledEventEntityType is the type of entity associated with a guild scheduled event. @@ -932,11 +1051,11 @@ type GuildScheduledEventEntityType int const ( // GuildScheduledEventEntityTypeStageInstance represents a stage channel - GuildScheduledEventEntityTypeStageInstance = 1 + GuildScheduledEventEntityTypeStageInstance GuildScheduledEventEntityType = 1 // GuildScheduledEventEntityTypeVoice represents a voice channel - GuildScheduledEventEntityTypeVoice = 2 + GuildScheduledEventEntityTypeVoice GuildScheduledEventEntityType = 2 // GuildScheduledEventEntityTypeExternal represents an external event - GuildScheduledEventEntityTypeExternal = 3 + GuildScheduledEventEntityTypeExternal GuildScheduledEventEntityType = 3 ) // GuildScheduledEventUser is a user subscribed to a scheduled event. @@ -1007,29 +1126,26 @@ type SystemChannelFlag int // Block containing known SystemChannelFlag values const ( - SystemChannelFlagsSuppressJoin SystemChannelFlag = 1 << 0 - SystemChannelFlagsSuppressPremium SystemChannelFlag = 1 << 1 + SystemChannelFlagsSuppressJoinNotifications SystemChannelFlag = 1 << 0 + SystemChannelFlagsSuppressPremium SystemChannelFlag = 1 << 1 + SystemChannelFlagsSuppressGuildReminderNotifications SystemChannelFlag = 1 << 2 + SystemChannelFlagsSuppressJoinNotificationReplies SystemChannelFlag = 1 << 3 ) // IconURL returns a URL to the guild's icon. -func (g *Guild) IconURL() string { - if g.Icon == "" { - return "" - } - - if strings.HasPrefix(g.Icon, "a_") { - return EndpointGuildIconAnimated(g.ID, g.Icon) - } - - return EndpointGuildIcon(g.ID, g.Icon) +// +// size: The size of the desired icon image as a power of two +// Image size can be any power of two between 16 and 4096. +func (g *Guild) IconURL(size string) string { + return iconURL(g.Icon, EndpointGuildIcon(g.ID, g.Icon), EndpointGuildIconAnimated(g.ID, g.Icon), size) } // BannerURL returns a URL to the guild's banner. -func (g *Guild) BannerURL() string { - if g.Banner == "" { - return "" - } - return EndpointGuildBanner(g.ID, g.Banner) +// +// size: The size of the desired banner image as a power of two +// Image size can be any power of two between 16 and 4096. +func (g *Guild) BannerURL(size string) string { + return bannerURL(g.Banner, EndpointGuildBanner(g.ID, g.Banner), EndpointGuildBannerAnimated(g.ID, g.Banner), size) } // A UserGuild holds a brief version of a Guild @@ -1076,12 +1192,22 @@ type GuildParams struct { Region string `json:"region,omitempty"` VerificationLevel *VerificationLevel `json:"verification_level,omitempty"` DefaultMessageNotifications int `json:"default_message_notifications,omitempty"` // TODO: Separate type? + ExplicitContentFilter int `json:"explicit_content_filter,omitempty"` AfkChannelID string `json:"afk_channel_id,omitempty"` AfkTimeout int `json:"afk_timeout,omitempty"` Icon string `json:"icon,omitempty"` OwnerID string `json:"owner_id,omitempty"` Splash string `json:"splash,omitempty"` + DiscoverySplash string `json:"discovery_splash,omitempty"` Banner string `json:"banner,omitempty"` + SystemChannelID string `json:"system_channel_id,omitempty"` + SystemChannelFlags SystemChannelFlag `json:"system_channel_flags,omitempty"` + RulesChannelID string `json:"rules_channel_id,omitempty"` + PublicUpdatesChannelID string `json:"public_updates_channel_id,omitempty"` + PreferredLocale Locale `json:"preferred_locale,omitempty"` + Features []GuildFeature `json:"features,omitempty"` + Description string `json:"description,omitempty"` + PremiumProgressBarEnabled *bool `json:"premium_progress_bar_enabled,omitempty"` } // A Role stores information about Discord guild member roles. @@ -1167,10 +1293,11 @@ type VoiceState struct { // A Presence stores the online, offline, or idle and game status of Guild members. type Presence struct { - User *User `json:"user"` - Status Status `json:"status"` - Activities []*Activity `json:"activities"` - Since *int `json:"since"` + User *User `json:"user"` + Status Status `json:"status"` + Activities []*Activity `json:"activities"` + Since *int `json:"since"` + ClientStatus ClientStatus `json:"client_status"` } // A TimeStamps struct contains start and end times used in the rich presence "playing .." Game @@ -1249,9 +1376,10 @@ func (m *Member) Mention() string { } // AvatarURL returns the URL of the member's avatar -// size: The size of the user's avatar as a power of two -// if size is an empty string, no size parameter will -// be added to the URL. +// +// size: The size of the user's avatar as a power of two +// if size is an empty string, no size parameter will +// be added to the URL. func (m *Member) AvatarURL(size string) string { if m.Avatar == "" { return m.User.AvatarURL(size) @@ -1262,6 +1390,13 @@ func (m *Member) AvatarURL(size string) string { } +// ClientStatus stores the online, offline, idle, or dnd status of each device of a Guild member. +type ClientStatus struct { + Desktop Status `json:"desktop"` + Mobile Status `json:"mobile"` + Web Status `json:"web"` +} + // Status type definition type Status string @@ -1371,9 +1506,21 @@ type AutoModerationTriggerMetadata struct { // Substrings which will be searched for in content. // NOTE: should be only used with keyword trigger type. KeywordFilter []string `json:"keyword_filter,omitempty"` + // Regular expression patterns which will be matched against content (maximum of 10). + // NOTE: should be only used with keyword trigger type. + RegexPatterns []string `json:"regex_patterns,omitempty"` + // Internally pre-defined wordsets which will be searched for in content. // NOTE: should be only used with keyword preset trigger type. Presets []AutoModerationKeywordPreset `json:"presets,omitempty"` + + // Substrings which should not trigger the rule. + // NOTE: should be only used with keyword or keyword preset trigger type. + AllowList *[]string `json:"allow_list,omitempty"` + + // Total number of unique role and user mentions allowed per message. + // NOTE: should be only used with mention spam trigger type. + MentionTotalLimit int `json:"mention_total_limit,omitempty"` } // AutoModerationActionType represents an action which will execute whenever a rule is triggered. @@ -2074,6 +2221,7 @@ const ( ErrCodeUnknownGuildWelcomeScreen = 10069 ErrCodeUnknownGuildScheduledEvent = 10070 ErrCodeUnknownGuildScheduledEventUser = 10071 + ErrUnknownTag = 10087 ErrCodeBotsCannotUseEndpoint = 20001 ErrCodeOnlyBotsCanUseEndpoint = 20002 @@ -2087,28 +2235,30 @@ const ( ErrCodeStageTopicContainsNotAllowedWordsForPublicStages = 20031 ErrCodeGuildPremiumSubscriptionLevelTooLow = 20035 - ErrCodeMaximumGuildsReached = 30001 - ErrCodeMaximumPinsReached = 30003 - ErrCodeMaximumNumberOfRecipientsReached = 30004 - ErrCodeMaximumGuildRolesReached = 30005 - ErrCodeMaximumNumberOfWebhooksReached = 30007 - ErrCodeMaximumNumberOfEmojisReached = 30008 - ErrCodeTooManyReactions = 30010 - ErrCodeMaximumNumberOfGuildChannelsReached = 30013 - ErrCodeMaximumNumberOfAttachmentsInAMessageReached = 30015 - ErrCodeMaximumNumberOfInvitesReached = 30016 - ErrCodeMaximumNumberOfAnimatedEmojisReached = 30018 - ErrCodeMaximumNumberOfServerMembersReached = 30019 - ErrCodeMaximumNumberOfGuildDiscoverySubcategoriesReached = 30030 - ErrCodeGuildAlreadyHasATemplate = 30031 - ErrCodeMaximumNumberOfThreadParticipantsReached = 30033 - ErrCodeMaximumNumberOfBansForNonGuildMembersHaveBeenExceeded = 30035 - ErrCodeMaximumNumberOfBansFetchesHasBeenReached = 30037 - ErrCodeMaximumNumberOfUncompletedGuildScheduledEventsReached = 30038 - ErrCodeMaximumNumberOfStickersReached = 30039 - ErrCodeMaximumNumberOfPruneRequestsHasBeenReached = 30040 - ErrCodeMaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042 - ErrCodeMaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046 + ErrCodeMaximumGuildsReached = 30001 + ErrCodeMaximumPinsReached = 30003 + ErrCodeMaximumNumberOfRecipientsReached = 30004 + ErrCodeMaximumGuildRolesReached = 30005 + ErrCodeMaximumNumberOfWebhooksReached = 30007 + ErrCodeMaximumNumberOfEmojisReached = 30008 + ErrCodeTooManyReactions = 30010 + ErrCodeMaximumNumberOfGuildChannelsReached = 30013 + ErrCodeMaximumNumberOfAttachmentsInAMessageReached = 30015 + ErrCodeMaximumNumberOfInvitesReached = 30016 + ErrCodeMaximumNumberOfAnimatedEmojisReached = 30018 + ErrCodeMaximumNumberOfServerMembersReached = 30019 + ErrCodeMaximumNumberOfGuildDiscoverySubcategoriesReached = 30030 + ErrCodeGuildAlreadyHasATemplate = 30031 + ErrCodeMaximumNumberOfThreadParticipantsReached = 30033 + ErrCodeMaximumNumberOfBansForNonGuildMembersHaveBeenExceeded = 30035 + ErrCodeMaximumNumberOfBansFetchesHasBeenReached = 30037 + ErrCodeMaximumNumberOfUncompletedGuildScheduledEventsReached = 30038 + ErrCodeMaximumNumberOfStickersReached = 30039 + ErrCodeMaximumNumberOfPruneRequestsHasBeenReached = 30040 + ErrCodeMaximumNumberOfGuildWidgetSettingsUpdatesHasBeenReached = 30042 + ErrCodeMaximumNumberOfEditsToMessagesOlderThanOneHourReached = 30046 + ErrCodeMaximumNumberOfPinnedThreadsInForumChannelHasBeenReached = 30047 + ErrCodeMaximumNumberOfTagsInForumChannelHasBeenReached = 30048 ErrCodeUnauthorized = 40001 ErrCodeActionRequiredVerifiedAccount = 40002 @@ -2121,6 +2271,7 @@ const ( ErrCodeMessageAlreadyCrossposted = 40033 ErrCodeAnApplicationWithThatNameAlreadyExists = 40041 ErrCodeInteractionHasAlreadyBeenAcknowledged = 40060 + ErrCodeTagNamesMustBeUnique = 40061 ErrCodeMissingAccess = 50001 ErrCodeInvalidAccountType = 50002 diff --git a/vendor/github.com/bwmarrin/discordgo/util.go b/vendor/github.com/bwmarrin/discordgo/util.go index 86f43b5f..957f3018 100644 --- a/vendor/github.com/bwmarrin/discordgo/util.go +++ b/vendor/github.com/bwmarrin/discordgo/util.go @@ -51,7 +51,7 @@ func MultipartBodyWithJSON(data interface{}, files []*File) (requestContentType for i, file := range files { h := make(textproto.MIMEHeader) - h.Set("Content-Disposition", fmt.Sprintf(`form-data; name="file%d"; filename="%s"`, i, quoteEscaper.Replace(file.Name))) + h.Set("Content-Disposition", fmt.Sprintf(`form-data; name="files[%d]"; filename="%s"`, i, quoteEscaper.Replace(file.Name))) contentType := file.ContentType if contentType == "" { contentType = "application/octet-stream" @@ -107,3 +107,19 @@ func bannerURL(bannerHash, staticBannerURL, animatedBannerURL, size string) stri } return URL } + +func iconURL(iconHash, staticIconURL, animatedIconURL, size string) string { + var URL string + if iconHash == "" { + return "" + } else if strings.HasPrefix(iconHash, "a_") { + URL = animatedIconURL + } else { + URL = staticIconURL + } + + if size != "" { + return URL + "?size=" + size + } + return URL +} diff --git a/vendor/github.com/bwmarrin/discordgo/voice.go b/vendor/github.com/bwmarrin/discordgo/voice.go index efd88090..87e84b12 100644 --- a/vendor/github.com/bwmarrin/discordgo/voice.go +++ b/vendor/github.com/bwmarrin/discordgo/voice.go @@ -360,6 +360,25 @@ func (v *VoiceConnection) wsListen(wsConn *websocket.Conn, close <-chan struct{} v.wsConn = nil v.Unlock() + // Wait for VOICE_SERVER_UPDATE. + // When the bot is moved by the user to another voice channel, + // VOICE_SERVER_UPDATE is received after the code 4014. + for i := 0; i < 5; i++ { // TODO: temp, wait for VoiceServerUpdate. + <-time.After(1 * time.Second) + + v.RLock() + reconnected := v.wsConn != nil + v.RUnlock() + if !reconnected { + continue + } + v.log(LogInformational, "successfully reconnected after 4014 manual disconnection") + return + } + + // When VOICE_SERVER_UPDATE is not received, disconnect as usual. + v.log(LogInformational, "disconnect due to 4014 manual disconnection") + v.session.Lock() delete(v.session.VoiceConnections, v.GuildID) v.session.Unlock() @@ -835,7 +854,7 @@ func (v *VoiceConnection) opusReceiver(udpConn *net.UDPConn, close <-chan struct if opus, ok := secretbox.Open(nil, recvbuf[12:rlen], &nonce, &v.op4.SecretKey); ok { p.Opus = opus } else { - return + continue } // extension bit set, and not a RTCP packet diff --git a/vendor/github.com/bwmarrin/discordgo/wsapi.go b/vendor/github.com/bwmarrin/discordgo/wsapi.go index 2579ee42..6c823884 100644 --- a/vendor/github.com/bwmarrin/discordgo/wsapi.go +++ b/vendor/github.com/bwmarrin/discordgo/wsapi.go @@ -320,7 +320,7 @@ func (s *Session) heartbeat(wsConn *websocket.Conn, listening <-chan interface{} } } -// UpdateStatusData ia provided to UpdateStatusComplex() +// UpdateStatusData is provided to UpdateStatusComplex() type UpdateStatusData struct { IdleSince *int `json:"since"` Activities []*Activity `json:"activities"` @@ -361,6 +361,14 @@ func (s *Session) UpdateGameStatus(idle int, name string) (err error) { return s.UpdateStatusComplex(*newUpdateStatusData(idle, ActivityTypeGame, name, "")) } +// UpdateWatchStatus is used to update the user's watch status. +// If idle>0 then set status to idle. +// If name!="" then set movie/stream. +// if otherwise, set status to active, and no activity. +func (s *Session) UpdateWatchStatus(idle int, name string) (err error) { + return s.UpdateStatusComplex(*newUpdateStatusData(idle, ActivityTypeWatching, name, "")) +} + // UpdateStreamingStatus is used to update the user's streaming status. // If idle>0 then set status to idle. // If name!="" then set game. diff --git a/vendor/github.com/hashicorp/golang-lru/.golangci.yml b/vendor/github.com/hashicorp/golang-lru/.golangci.yml new file mode 100644 index 00000000..49202fc4 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/.golangci.yml @@ -0,0 +1,30 @@ +linters: + enable: + - megacheck + - revive + - govet + - unconvert + - megacheck + - gas + - gocyclo + - dupl + - misspell + - unparam + - unused + - typecheck + - ineffassign + - stylecheck + - exportloopref + - gocritic + - nakedret + - gosimple + - prealloc + fast: false + disable-all: true + +issues: + exclude-rules: + - path: _test\.go + linters: + - dupl + exclude-use-default: false diff --git a/vendor/github.com/hashicorp/golang-lru/2q.go b/vendor/github.com/hashicorp/golang-lru/2q.go index e474cd07..15fcad03 100644 --- a/vendor/github.com/hashicorp/golang-lru/2q.go +++ b/vendor/github.com/hashicorp/golang-lru/2q.go @@ -44,7 +44,7 @@ func New2Q(size int) (*TwoQueueCache, error) { // New2QParams creates a new TwoQueueCache using the provided // parameter values. -func New2QParams(size int, recentRatio float64, ghostRatio float64) (*TwoQueueCache, error) { +func New2QParams(size int, recentRatio, ghostRatio float64) (*TwoQueueCache, error) { if size <= 0 { return nil, fmt.Errorf("invalid size") } @@ -138,7 +138,6 @@ func (c *TwoQueueCache) Add(key, value interface{}) { // Add to the recently seen list c.ensureSpace(false) c.recent.Add(key, value) - return } // ensureSpace is used to ensure we have space in the cache diff --git a/vendor/github.com/hashicorp/golang-lru/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE index be2cc4df..0e5d580e 100644 --- a/vendor/github.com/hashicorp/golang-lru/LICENSE +++ b/vendor/github.com/hashicorp/golang-lru/LICENSE @@ -1,3 +1,5 @@ +Copyright (c) 2014 HashiCorp, Inc. + Mozilla Public License, version 2.0 1. Definitions diff --git a/vendor/github.com/hashicorp/golang-lru/README.md b/vendor/github.com/hashicorp/golang-lru/README.md index 33e58cfa..063bb160 100644 --- a/vendor/github.com/hashicorp/golang-lru/README.md +++ b/vendor/github.com/hashicorp/golang-lru/README.md @@ -7,7 +7,7 @@ thread safe LRU cache. It is based on the cache in Groupcache. Documentation ============= -Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru) +Full docs are available on [Godoc](https://pkg.go.dev/github.com/hashicorp/golang-lru) Example ======= diff --git a/vendor/github.com/hashicorp/golang-lru/arc.go b/vendor/github.com/hashicorp/golang-lru/arc.go index 555225a2..e396f842 100644 --- a/vendor/github.com/hashicorp/golang-lru/arc.go +++ b/vendor/github.com/hashicorp/golang-lru/arc.go @@ -173,7 +173,6 @@ func (c *ARCCache) Add(key, value interface{}) { // Add to the recently seen list c.t1.Add(key, value) - return } // replace is used to adaptively evict from either T1 or T2 diff --git a/vendor/github.com/hashicorp/golang-lru/lru.go b/vendor/github.com/hashicorp/golang-lru/lru.go index 4e5e9d8f..895d8e3e 100644 --- a/vendor/github.com/hashicorp/golang-lru/lru.go +++ b/vendor/github.com/hashicorp/golang-lru/lru.go @@ -6,10 +6,17 @@ import ( "github.com/hashicorp/golang-lru/simplelru" ) +const ( + // DefaultEvictedBufferSize defines the default buffer size to store evicted key/val + DefaultEvictedBufferSize = 16 +) + // Cache is a thread-safe fixed size LRU cache. type Cache struct { - lru simplelru.LRUCache - lock sync.RWMutex + lru *simplelru.LRU + evictedKeys, evictedVals []interface{} + onEvictedCB func(k, v interface{}) + lock sync.RWMutex } // New creates an LRU of the given size. @@ -19,30 +26,63 @@ func New(size int) (*Cache, error) { // NewWithEvict constructs a fixed size cache with the given eviction // callback. -func NewWithEvict(size int, onEvicted func(key interface{}, value interface{})) (*Cache, error) { - lru, err := simplelru.NewLRU(size, simplelru.EvictCallback(onEvicted)) - if err != nil { - return nil, err +func NewWithEvict(size int, onEvicted func(key, value interface{})) (c *Cache, err error) { + // create a cache with default settings + c = &Cache{ + onEvictedCB: onEvicted, } - c := &Cache{ - lru: lru, + if onEvicted != nil { + c.initEvictBuffers() + onEvicted = c.onEvicted } - return c, nil + c.lru, err = simplelru.NewLRU(size, onEvicted) + return +} + +func (c *Cache) initEvictBuffers() { + c.evictedKeys = make([]interface{}, 0, DefaultEvictedBufferSize) + c.evictedVals = make([]interface{}, 0, DefaultEvictedBufferSize) +} + +// onEvicted save evicted key/val and sent in externally registered callback +// outside of critical section +func (c *Cache) onEvicted(k, v interface{}) { + c.evictedKeys = append(c.evictedKeys, k) + c.evictedVals = append(c.evictedVals, v) } // Purge is used to completely clear the cache. func (c *Cache) Purge() { + var ks, vs []interface{} c.lock.Lock() c.lru.Purge() + if c.onEvictedCB != nil && len(c.evictedKeys) > 0 { + ks, vs = c.evictedKeys, c.evictedVals + c.initEvictBuffers() + } c.lock.Unlock() + // invoke callback outside of critical section + if c.onEvictedCB != nil { + for i := 0; i < len(ks); i++ { + c.onEvictedCB(ks[i], vs[i]) + } + } } // Add adds a value to the cache. Returns true if an eviction occurred. func (c *Cache) Add(key, value interface{}) (evicted bool) { + var k, v interface{} c.lock.Lock() evicted = c.lru.Add(key, value) + if c.onEvictedCB != nil && evicted { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } c.lock.Unlock() - return evicted + if c.onEvictedCB != nil && evicted { + c.onEvictedCB(k, v) + } + return } // Get looks up a key's value from the cache. @@ -75,13 +115,21 @@ func (c *Cache) Peek(key interface{}) (value interface{}, ok bool) { // recent-ness or deleting it for being stale, and if not, adds the value. // Returns whether found and whether an eviction occurred. func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) { + var k, v interface{} c.lock.Lock() - defer c.lock.Unlock() - if c.lru.Contains(key) { + c.lock.Unlock() return true, false } evicted = c.lru.Add(key, value) + if c.onEvictedCB != nil && evicted { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && evicted { + c.onEvictedCB(k, v) + } return false, evicted } @@ -89,47 +137,80 @@ func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) { // recent-ness or deleting it for being stale, and if not, adds the value. // Returns whether found and whether an eviction occurred. func (c *Cache) PeekOrAdd(key, value interface{}) (previous interface{}, ok, evicted bool) { + var k, v interface{} c.lock.Lock() - defer c.lock.Unlock() - previous, ok = c.lru.Peek(key) if ok { + c.lock.Unlock() return previous, true, false } - evicted = c.lru.Add(key, value) + if c.onEvictedCB != nil && evicted { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } + c.lock.Unlock() + if c.onEvictedCB != nil && evicted { + c.onEvictedCB(k, v) + } return nil, false, evicted } // Remove removes the provided key from the cache. func (c *Cache) Remove(key interface{}) (present bool) { + var k, v interface{} c.lock.Lock() present = c.lru.Remove(key) + if c.onEvictedCB != nil && present { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } c.lock.Unlock() + if c.onEvictedCB != nil && present { + c.onEvictedCB(k, v) + } return } // Resize changes the cache size. func (c *Cache) Resize(size int) (evicted int) { + var ks, vs []interface{} c.lock.Lock() evicted = c.lru.Resize(size) + if c.onEvictedCB != nil && evicted > 0 { + ks, vs = c.evictedKeys, c.evictedVals + c.initEvictBuffers() + } c.lock.Unlock() + if c.onEvictedCB != nil && evicted > 0 { + for i := 0; i < len(ks); i++ { + c.onEvictedCB(ks[i], vs[i]) + } + } return evicted } // RemoveOldest removes the oldest item from the cache. -func (c *Cache) RemoveOldest() (key interface{}, value interface{}, ok bool) { +func (c *Cache) RemoveOldest() (key, value interface{}, ok bool) { + var k, v interface{} c.lock.Lock() key, value, ok = c.lru.RemoveOldest() + if c.onEvictedCB != nil && ok { + k, v = c.evictedKeys[0], c.evictedVals[0] + c.evictedKeys, c.evictedVals = c.evictedKeys[:0], c.evictedVals[:0] + } c.lock.Unlock() + if c.onEvictedCB != nil && ok { + c.onEvictedCB(k, v) + } return } // GetOldest returns the oldest entry -func (c *Cache) GetOldest() (key interface{}, value interface{}, ok bool) { - c.lock.Lock() +func (c *Cache) GetOldest() (key, value interface{}, ok bool) { + c.lock.RLock() key, value, ok = c.lru.GetOldest() - c.lock.Unlock() + c.lock.RUnlock() return } diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go index a86c8539..9233583c 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go @@ -25,7 +25,7 @@ type entry struct { // NewLRU constructs an LRU of the given size func NewLRU(size int, onEvict EvictCallback) (*LRU, error) { if size <= 0 { - return nil, errors.New("Must provide a positive size") + return nil, errors.New("must provide a positive size") } c := &LRU{ size: size, @@ -109,7 +109,7 @@ func (c *LRU) Remove(key interface{}) (present bool) { } // RemoveOldest removes the oldest item from the cache. -func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) { +func (c *LRU) RemoveOldest() (key, value interface{}, ok bool) { ent := c.evictList.Back() if ent != nil { c.removeElement(ent) @@ -120,7 +120,7 @@ func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) { } // GetOldest returns the oldest entry -func (c *LRU) GetOldest() (key interface{}, value interface{}, ok bool) { +func (c *LRU) GetOldest() (key, value interface{}, ok bool) { ent := c.evictList.Back() if ent != nil { kv := ent.Value.(*entry) diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 92d70934..cb7f8caf 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -1,3 +1,4 @@ +// Package simplelru provides simple LRU implementation based on build-in container/list. package simplelru // LRUCache is the interface for simple LRU cache. @@ -34,6 +35,6 @@ type LRUCache interface { // Clears all cache entries. Purge() - // Resizes cache, returning number evicted - Resize(int) int + // Resizes cache, returning number evicted + Resize(int) int } diff --git a/vendor/github.com/hashicorp/golang-lru/testing.go b/vendor/github.com/hashicorp/golang-lru/testing.go new file mode 100644 index 00000000..49276078 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/testing.go @@ -0,0 +1,16 @@ +package lru + +import ( + "crypto/rand" + "math" + "math/big" + "testing" +) + +func getRand(tb testing.TB) int64 { + out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64)) + if err != nil { + tb.Fatal(err) + } + return out.Int64() +} diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go index 129c43fa..bb2d26b8 100644 --- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go +++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/chat.go @@ -122,7 +122,8 @@ func (a *API) GetTextMessages(channel chat1.ChatChannel, unreadOnly bool) ([]cha return res, nil } -func (a *API) SendMessage(channel chat1.ChatChannel, body string, args ...interface{}) (SendResponse, error) { +func (a *API) SendMessage(channel chat1.ChatChannel, body string, args ...interface{}) (resp SendResponse, err error) { + defer a.Trace(&err, "SendMessage")() arg := newSendArg(sendMessageOptions{ Channel: channel, Message: sendMessageBody{ @@ -139,7 +140,8 @@ func (a *API) Broadcast(body string, args ...interface{}) (SendResponse, error) }, fmt.Sprintf(body, args...)) } -func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...interface{}) (SendResponse, error) { +func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...interface{}) (resp SendResponse, err error) { + defer a.Trace(&err, "SendMessageByConvID")() arg := newSendArg(sendMessageOptions{ ConversationID: convID, Message: sendMessageBody{ @@ -150,7 +152,8 @@ func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...i } // SendMessageByTlfName sends a message on the given TLF name -func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interface{}) (SendResponse, error) { +func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interface{}) (resp SendResponse, err error) { + defer a.Trace(&err, "SendMessageByTlfName")() arg := newSendArg(sendMessageOptions{ Channel: chat1.ChatChannel{ Name: tlfName, @@ -162,7 +165,8 @@ func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interfac return a.doSend(arg) } -func (a *API) SendMessageByTeamName(teamName string, inChannel *string, body string, args ...interface{}) (SendResponse, error) { +func (a *API) SendMessageByTeamName(teamName string, inChannel *string, body string, args ...interface{}) (resp SendResponse, err error) { + defer a.Trace(&err, "SendMessageByTeamName")() channel := "general" if inChannel != nil { channel = *inChannel diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go index b8d9eb3c..b5248106 100644 --- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go +++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io" + "math" "os" "os/exec" "runtime" @@ -45,10 +46,10 @@ type Subscription struct { } func NewSubscription() *Subscription { - newMsgsCh := make(chan SubscriptionMessage, 100) - newConvsCh := make(chan SubscriptionConversation, 100) - newWalletCh := make(chan SubscriptionWalletEvent, 100) - errorCh := make(chan error, 100) + newMsgsCh := make(chan SubscriptionMessage, 250) + newConvsCh := make(chan SubscriptionConversation, 250) + newWalletCh := make(chan SubscriptionWalletEvent, 250) + errorCh := make(chan error, 250) shutdownCh := make(chan struct{}) return &Subscription{ DebugOutput: NewDebugOutput("Subscription"), @@ -137,6 +138,8 @@ type RunOptions struct { EnableTyping bool // Disable bot lite mode DisableBotLiteMode bool + // Number of processes to spin up to connect to the keybase service + NumPipes int } func (r RunOptions) Location() string { @@ -164,13 +167,20 @@ func Start(runOpts RunOptions, opts ...func(*API)) (*API, error) { return api, nil } +type apiPipe struct { + sync.Mutex + input io.Writer + output *bufio.Reader + cmd *exec.Cmd +} + // API is the main object used for communicating with the Keybase JSON API type API struct { sync.Mutex *DebugOutput - apiInput io.Writer - apiOutput *bufio.Reader - apiCmd *exec.Cmd + // Round robin hand out API pipes to allow concurrent API requests. + pipeIdx int + pipes []*apiPipe username string runOpts RunOptions subscriptions []*Subscription @@ -282,12 +292,15 @@ func (a *API) auth() (string, error) { func (a *API) startPipes() (err error) { a.Lock() defer a.Unlock() - if a.apiCmd != nil { - if err := a.apiCmd.Process.Kill(); err != nil { - return fmt.Errorf("unable to kill previous API command %v", err) + for _, pipe := range a.pipes { + if pipe.cmd != nil { + if err := pipe.cmd.Process.Kill(); err != nil { + return fmt.Errorf("unable to kill previous API command %v", err) + } } + pipe.cmd = nil } - a.apiCmd = nil + a.pipes = nil if a.runOpts.StartService { args := []string{fmt.Sprintf("-enable-bot-lite-mode=%v", a.runOpts.DisableBotLiteMode), "service"} @@ -306,30 +319,39 @@ func (a *API) startPipes() (err error) { a.Debug("unable to set notifiation settings %v", err) } - a.apiCmd = a.runOpts.Command("chat", "api") - if a.apiInput, err = a.apiCmd.StdinPipe(); err != nil { - return fmt.Errorf("unable to get api stdin: %v", err) + // Startup NumPipes processes to the keybase chat api + for i := 0; i < int(math.Max(float64(a.runOpts.NumPipes), 1)); i++ { + pipe := apiPipe{} + pipe.cmd = a.runOpts.Command("chat", "api") + if pipe.input, err = pipe.cmd.StdinPipe(); err != nil { + return fmt.Errorf("unable to get api stdin: %v", err) + } + output, err := pipe.cmd.StdoutPipe() + if err != nil { + return fmt.Errorf("unable to get api stdout: %v", err) + } + if runtime.GOOS != "windows" { + pipe.cmd.ExtraFiles = []*os.File{output.(*os.File)} + } + if err := pipe.cmd.Start(); err != nil { + return fmt.Errorf("unable to run chat api cmd: %v", err) + } + pipe.output = bufio.NewReader(output) + a.pipes = append(a.pipes, &pipe) } - output, err := a.apiCmd.StdoutPipe() - if err != nil { - return fmt.Errorf("unable to get api stdout: %v", err) - } - if runtime.GOOS != "windows" { - a.apiCmd.ExtraFiles = []*os.File{output.(*os.File)} - } - if err := a.apiCmd.Start(); err != nil { - return fmt.Errorf("unable to run chat api cmd: %v", err) - } - a.apiOutput = bufio.NewReader(output) return nil } -func (a *API) getAPIPipesLocked() (io.Writer, *bufio.Reader, error) { - // this should only be called inside a lock - if a.apiCmd == nil { - return nil, nil, errAPIDisconnected +func (a *API) getAPIPipes() (*apiPipe, error) { + a.Lock() + defer a.Unlock() + idx := a.pipeIdx % len(a.pipes) + a.pipeIdx++ + pipe := a.pipes[idx] + if pipe.cmd == nil { + return nil, errAPIDisconnected } - return a.apiInput, a.apiOutput, nil + return pipe, nil } func (a *API) GetUsername() string { @@ -337,21 +359,21 @@ func (a *API) GetUsername() string { } func (a *API) doSend(arg interface{}) (resp SendResponse, err error) { - a.Lock() - defer a.Unlock() - bArg, err := json.Marshal(arg) if err != nil { return SendResponse{}, fmt.Errorf("unable to send arg: %+v: %v", arg, err) } - input, output, err := a.getAPIPipesLocked() + pipe, err := a.getAPIPipes() if err != nil { return SendResponse{}, err } - if _, err := io.WriteString(input, string(bArg)); err != nil { + pipe.Lock() + defer pipe.Unlock() + + if _, err := io.WriteString(pipe.input, string(bArg)); err != nil { return SendResponse{}, err } - responseRaw, err := output.ReadBytes('\n') + responseRaw, err := pipe.output.ReadBytes('\n') if err != nil { return SendResponse{}, err } @@ -364,17 +386,17 @@ func (a *API) doSend(arg interface{}) (resp SendResponse, err error) { } func (a *API) doFetch(apiInput string) ([]byte, error) { - a.Lock() - defer a.Unlock() - - input, output, err := a.getAPIPipesLocked() + pipe, err := a.getAPIPipes() if err != nil { return nil, err } - if _, err := io.WriteString(input, apiInput); err != nil { + pipe.Lock() + defer pipe.Unlock() + + if _, err := io.WriteString(pipe.input, apiInput); err != nil { return nil, err } - byteOutput, err := output.ReadBytes('\n') + byteOutput, err := pipe.output.ReadBytes('\n') if err != nil { return nil, err } @@ -412,16 +434,22 @@ func (a *API) Listen(opts ListenOptions) (*Subscription, error) { } boutput.Scan() t := boutput.Text() + submitErr := func(err error) { + if len(sub.errorCh)*2 > cap(sub.errorCh) { + a.Debug("large errorCh queue: len: %d cap: %d ", len(sub.errorCh), cap(sub.errorCh)) + } + sub.errorCh <- err + } var typeHolder TypeHolder if err := json.Unmarshal([]byte(t), &typeHolder); err != nil { - sub.errorCh <- fmt.Errorf("err: %v, data: %v", err, t) + submitErr(fmt.Errorf("err: %v, data: %v", err, t)) break } switch typeHolder.Type { case "chat": var notification chat1.MsgNotification if err := json.Unmarshal([]byte(t), ¬ification); err != nil { - sub.errorCh <- fmt.Errorf("err: %v, data: %v", err, t) + submitErr(fmt.Errorf("err: %v, data: %v", err, t)) break } if notification.Error != nil { @@ -434,12 +462,15 @@ func (a *API) Listen(opts ListenOptions) (*Subscription, error) { Channel: notification.Msg.Channel, }, } + if len(sub.newMsgsCh)*2 > cap(sub.newMsgsCh) { + a.Debug("large newMsgsCh queue: len: %d cap: %d ", len(sub.newMsgsCh), cap(sub.newMsgsCh)) + } sub.newMsgsCh <- subscriptionMessage } case "chat_conv": var notification chat1.ConvNotification if err := json.Unmarshal([]byte(t), ¬ification); err != nil { - sub.errorCh <- fmt.Errorf("err: %v, data: %v", err, t) + submitErr(fmt.Errorf("err: %v, data: %v", err, t)) break } if notification.Error != nil { @@ -448,15 +479,21 @@ func (a *API) Listen(opts ListenOptions) (*Subscription, error) { subscriptionConv := SubscriptionConversation{ Conversation: *notification.Conv, } + if len(sub.newConvsCh)*2 > cap(sub.newConvsCh) { + a.Debug("large newConvsCh queue: len: %d cap: %d ", len(sub.newConvsCh), cap(sub.newConvsCh)) + } sub.newConvsCh <- subscriptionConv } case "wallet": var holder PaymentHolder if err := json.Unmarshal([]byte(t), &holder); err != nil { - sub.errorCh <- fmt.Errorf("err: %v, data: %v", err, t) + submitErr(fmt.Errorf("err: %v, data: %v", err, t)) break } subscriptionPayment := SubscriptionWalletEvent(holder) + if len(sub.newWalletCh)*2 > cap(sub.newWalletCh) { + a.Debug("large newWalletCh queue: len: %d cap: %d ", len(sub.newWalletCh), cap(sub.newWalletCh)) + } sub.newWalletCh <- subscriptionPayment default: continue @@ -518,7 +555,6 @@ func (a *API) Listen(opts ListenOptions) (*Subscription, error) { } boutput := bufio.NewScanner(output) if err := p.Start(); err != nil { - a.Debug("Listen: failed to make listen scanner: %s", err) time.Sleep(pause) continue @@ -568,10 +604,12 @@ func (a *API) Shutdown() (err error) { for _, sub := range a.subscriptions { sub.Shutdown() } - if a.apiCmd != nil { - a.Debug("waiting for API command") - if err := a.apiCmd.Wait(); err != nil { - return err + for _, pipe := range a.pipes { + if pipe.cmd != nil { + a.Debug("waiting for API command") + if err := pipe.cmd.Wait(); err != nil { + return err + } } } diff --git a/vendor/github.com/kyokomi/emoji/v2/README.md b/vendor/github.com/kyokomi/emoji/v2/README.md index e6045985..7cf9ba57 100644 --- a/vendor/github.com/kyokomi/emoji/v2/README.md +++ b/vendor/github.com/kyokomi/emoji/v2/README.md @@ -1,7 +1,7 @@ # Emoji Emoji is a simple golang package. -[![wercker status](https://app.wercker.com/status/7bef60de2c6d3e0e6c13d56b2393c5d8/s/master "wercker status")](https://app.wercker.com/project/byKey/7bef60de2c6d3e0e6c13d56b2393c5d8) +![master workflow](https://github.com/kyokomi/emoji/actions/workflows/go.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/kyokomi/emoji/badge.png?branch=master)](https://coveralls.io/r/kyokomi/emoji?branch=master) [![GoDoc](https://pkg.go.dev/badge/github.com/kyokomi/emoji.svg)](https://pkg.go.dev/github.com/kyokomi/emoji/v2) diff --git a/vendor/github.com/kyokomi/emoji/v2/emoji_codemap.go b/vendor/github.com/kyokomi/emoji/v2/emoji_codemap.go index 278b711c..c44cb618 100644 --- a/vendor/github.com/kyokomi/emoji/v2/emoji_codemap.go +++ b/vendor/github.com/kyokomi/emoji/v2/emoji_codemap.go @@ -84,6 +84,7 @@ func emojiCode() map[string]string { ":UP!_button:": "\U0001f199", ":VS_button:": "\U0001f19a", ":Virgo:": "\u264d", + ":ZZZ:": "\U0001f4a4", ":a:": "\U0001f170\ufe0f", ":ab:": "\U0001f18e", ":abacus:": "\U0001f9ee", @@ -298,6 +299,7 @@ func emojiCode() map[string]string { ":birthday_cake:": "\U0001f382", ":bison:": "\U0001f9ac", ":biting_lip:": "\U0001fae6", + ":black_bird:": "\U0001f426\u200d\u2b1b", ":black_cat:": "\U0001f408\u200d\u2b1b", ":black_circle:": "\u26ab", ":black_circle_for_record:": "\u23fa\ufe0f", @@ -779,6 +781,7 @@ func emojiCode() map[string]string { ":dolphin:": "\U0001f42c", ":dominica:": "\U0001f1e9\U0001f1f2", ":dominican_republic:": "\U0001f1e9\U0001f1f4", + ":donkey:": "\U0001facf", ":door:": "\U0001f6aa", ":dotted_line_face:": "\U0001fae5", ":dotted_six-pointed_star:": "\U0001f52f", @@ -850,6 +853,7 @@ func emojiCode() map[string]string { ":empty_nest:": "\U0001fab9", ":end:": "\U0001f51a", ":england:": "\U0001f3f4\U000e0067\U000e0062\U000e0065\U000e006e\U000e0067\U000e007f", + ":enraged_face:": "\U0001f621", ":envelope:": "\u2709", ":envelope_with_arrow:": "\U0001f4e9", ":equatorial_guinea:": "\U0001f1ec\U0001f1f6", @@ -1837,12 +1841,14 @@ func emojiCode() map[string]string { ":flower_playing_cards:": "\U0001f3b4", ":flushed:": "\U0001f633", ":flushed_face:": "\U0001f633", + ":flute:": "\U0001fa88", ":fly:": "\U0001fab0", ":flying_disc:": "\U0001f94f", ":flying_saucer:": "\U0001f6f8", ":fog:": "\U0001f32b\ufe0f", ":foggy:": "\U0001f301", ":folded_hands:": "\U0001f64f", + ":folding_hand_fan:": "\U0001faad", ":fondue:": "\U0001fad5", ":foot:": "\U0001f9b6", ":football:": "\U0001f3c8", @@ -1906,6 +1912,7 @@ func emojiCode() map[string]string { ":gibraltar:": "\U0001f1ec\U0001f1ee", ":gift:": "\U0001f381", ":gift_heart:": "\U0001f49d", + ":ginger_root:": "\U0001fada", ":giraffe:": "\U0001f992", ":giraffe_face:": "\U0001f992", ":girl:": "\U0001f467", @@ -1932,6 +1939,7 @@ func emojiCode() map[string]string { ":golfing:": "\U0001f3cc\ufe0f", ":golfing_man:": "\U0001f3cc\ufe0f\u200d\u2642\ufe0f", ":golfing_woman:": "\U0001f3cc\ufe0f\u200d\u2640\ufe0f", + ":goose:": "\U0001fabf", ":gorilla:": "\U0001f98d", ":graduation_cap:": "\U0001f393", ":grapes:": "\U0001f347", @@ -1945,6 +1953,7 @@ func emojiCode() map[string]string { ":greenland:": "\U0001f1ec\U0001f1f1", ":grenada:": "\U0001f1ec\U0001f1e9", ":grey_exclamation:": "\u2755", + ":grey_heart:": "\U0001fa76", ":grey_question:": "\u2754", ":grimacing:": "\U0001f62c", ":grimacing_face:": "\U0001f62c", @@ -1976,6 +1985,7 @@ func emojiCode() map[string]string { ":guitar:": "\U0001f3b8", ":gun:": "\U0001f52b", ":guyana:": "\U0001f1ec\U0001f1fe", + ":hair_pick:": "\U0001faae", ":haircut:": "\U0001f487\u200d\u2640\ufe0f", ":haircut_man:": "\U0001f487\u200d\u2642\ufe0f", ":haircut_woman:": "\U0001f487\u200d\u2640\ufe0f", @@ -2094,6 +2104,7 @@ func emojiCode() map[string]string { ":hushed:": "\U0001f62f", ":hushed_face:": "\U0001f62f", ":hut:": "\U0001f6d6", + ":hyacinth:": "\U0001fabb", ":i_love_you_hand_sign:": "\U0001f91f", ":ice:": "\U0001f9ca", ":ice_cream:": "\U0001f368", @@ -2142,6 +2153,7 @@ func emojiCode() map[string]string { ":japanese_ogre:": "\U0001f479", ":jar:": "\U0001fad9", ":jeans:": "\U0001f456", + ":jellyfish:": "\U0001fabc", ":jersey:": "\U0001f1ef\U0001f1ea", ":jigsaw:": "\U0001f9e9", ":joker:": "\U0001f0cf", @@ -2175,6 +2187,7 @@ func emojiCode() map[string]string { ":keycap_9:": "9\ufe0f\u20e3", ":keycap_star:": "*\ufe0f\u20e3", ":keycap_ten:": "\U0001f51f", + ":khanda:": "\U0001faaf", ":kick_scooter:": "\U0001f6f4", ":kimono:": "\U0001f458", ":kiribati:": "\U0001f1f0\U0001f1ee", @@ -2261,6 +2274,7 @@ func emojiCode() map[string]string { ":left_speech_bubble:": "\U0001f5e8\ufe0f", ":leftwards_arrow_with_hook:": "\u21a9\ufe0f", ":leftwards_hand:": "\U0001faf2", + ":leftwards_pushing_hand:": "\U0001faf7", ":leg:": "\U0001f9b5", ":lemon:": "\U0001f34b", ":leo:": "\u264c", @@ -2271,6 +2285,7 @@ func emojiCode() map[string]string { ":libra:": "\u264e", ":libya:": "\U0001f1f1\U0001f1fe", ":liechtenstein:": "\U0001f1f1\U0001f1ee", + ":light_blue_heart:": "\U0001fa75", ":light_bulb:": "\U0001f4a1", ":light_rail:": "\U0001f688", ":lightning:": "\U0001f329\ufe0f", @@ -2807,6 +2822,7 @@ func emojiCode() map[string]string { ":map:": "\U0001f5fa", ":map_of_Japan:": "\U0001f5fe", ":maple_leaf:": "\U0001f341", + ":maracas:": "\U0001fa87", ":marshall_islands:": "\U0001f1f2\U0001f1ed", ":martial_arts_uniform:": "\U0001f94b", ":martinique:": "\U0001f1f2\U0001f1f6", @@ -2911,6 +2927,7 @@ func emojiCode() map[string]string { ":moon:": "\U0001f314", ":moon_cake:": "\U0001f96e", ":moon_viewing_ceremony:": "\U0001f391", + ":moose:": "\U0001face", ":morocco:": "\U0001f1f2\U0001f1e6", ":mortar_board:": "\U0001f393", ":mosque:": "\U0001f54c", @@ -3159,6 +3176,7 @@ func emojiCode() map[string]string { ":passport_control:": "\U0001f6c2", ":pause_button:": "\u23f8", ":paw_prints:": "\U0001f43e", + ":pea_pod:": "\U0001fadb", ":peace:": "\u262e", ":peace_symbol:": "\u262e\ufe0f", ":peach:": "\U0001f351", @@ -3410,6 +3428,7 @@ func emojiCode() map[string]string { ":pine_decoration:": "\U0001f38d", ":pineapple:": "\U0001f34d", ":ping_pong:": "\U0001f3d3", + ":pink_heart:": "\U0001fa77", ":pirate_flag:": "\U0001f3f4\u200d\u2620\ufe0f", ":pisces:": "\u2653", ":pitcairn_islands:": "\U0001f1f5\U0001f1f3", @@ -3486,7 +3505,7 @@ func emojiCode() map[string]string { ":pouring_liquid:": "\U0001fad7", ":pout:": "\U0001f621", ":pouting_cat:": "\U0001f63e", - ":pouting_face:": "\U0001f621", + ":pouting_face:": "\U0001f64e", ":pouting_man:": "\U0001f64e\u200d\u2642\ufe0f", ":pouting_woman:": "\U0001f64e\u200d\u2640\ufe0f", ":pray:": "\U0001f64f", @@ -3641,6 +3660,7 @@ func emojiCode() map[string]string { ":right_facing_fist_tone4:": "\U0001f91c\U0001f3fe", ":right_facing_fist_tone5:": "\U0001f91c\U0001f3ff", ":rightwards_hand:": "\U0001faf1", + ":rightwards_pushing_hand:": "\U0001faf8", ":ring:": "\U0001f48d", ":ring_buoy:": "\U0001f6df", ":ringed_planet:": "\U0001fa90", @@ -3747,6 +3767,7 @@ func emojiCode() map[string]string { ":seven_o’clock:": "\U0001f556", ":sewing_needle:": "\U0001faa1", ":seychelles:": "\U0001f1f8\U0001f1e8", + ":shaking_face:": "\U0001fae8", ":shallow_pan_of_food:": "\U0001f958", ":shamrock:": "\u2618\ufe0f", ":shark:": "\U0001f988", @@ -4275,9 +4296,11 @@ func emojiCode() map[string]string { ":wind_face:": "\U0001f32c", ":window:": "\U0001fa9f", ":wine_glass:": "\U0001f377", + ":wing:": "\U0001fabd", ":wink:": "\U0001f609", ":winking_face:": "\U0001f609", ":winking_face_with_tongue:": "\U0001f61c", + ":wireless:": "\U0001f6dc", ":wolf:": "\U0001f43a", ":woman:": "\U0001f469", ":woman-biking:": "\U0001f6b4\u200d\u2640\ufe0f", @@ -4708,6 +4731,7 @@ func emojiCode() map[string]string { ":writing_hand_tone5:": "\u270d\U0001f3ff", ":x:": "\u274c", ":x-ray:": "\U0001fa7b", + ":x_ray:": "\U0001fa7b", ":yarn:": "\U0001f9f6", ":yawning_face:": "\U0001f971", ":yellow_circle:": "\U0001f7e1", @@ -5470,6 +5494,7 @@ func emojiRevCode() map[string][]string { "\U0001f424": {":baby_chick:"}, "\U0001f425": {":hatched_chick:", ":front-facing_baby_chick:"}, "\U0001f426": {":bird:"}, + "\U0001f426\u200d\u2b1b": {":black_bird:"}, "\U0001f427": {":penguin:"}, "\U0001f428": {":koala:"}, "\U0001f429": {":poodle:"}, @@ -6104,7 +6129,7 @@ func emojiRevCode() map[string][]string { "\U0001f4a1": {":bulb:", ":light_bulb:"}, "\U0001f4a2": {":anger:", ":anger_symbol:"}, "\U0001f4a3": {":bomb:"}, - "\U0001f4a4": {":zzz:"}, + "\U0001f4a4": {":ZZZ:", ":zzz:"}, "\U0001f4a5": {":boom:", ":collision:"}, "\U0001f4a6": {":sweat_drops:", ":sweat_droplets:"}, "\U0001f4a7": {":droplet:"}, @@ -6438,7 +6463,7 @@ func emojiRevCode() map[string][]string { "\U0001f61e": {":disappointed:", ":disappointed_face:"}, "\U0001f61f": {":worried:", ":worried_face:"}, "\U0001f620": {":angry:", ":angry_face:"}, - "\U0001f621": {":pout:", ":rage:", ":pouting_face:"}, + "\U0001f621": {":pout:", ":rage:", ":enraged_face:"}, "\U0001f622": {":cry:", ":crying_face:"}, "\U0001f623": {":persevere:", ":persevering_face:"}, "\U0001f624": {":triumph:", ":face_with_steam_from_nose:"}, @@ -6576,7 +6601,7 @@ func emojiRevCode() map[string][]string { "\U0001f64d\U0001f3ff\u200d\u2642\ufe0f": {":man_frowning_tone5:"}, "\U0001f64d\u200d\u2640\ufe0f": {":frowning_woman:", ":woman-frowning:", ":woman_frowning:", ":person_frowning:"}, "\U0001f64d\u200d\u2642\ufe0f": {":frowning_man:", ":man-frowning:", ":man_frowning:"}, - "\U0001f64e": {":person_pouting:"}, + "\U0001f64e": {":pouting_face:", ":person_pouting:"}, "\U0001f64e\U0001f3fb": {":person_pouting_tone1:"}, "\U0001f64e\U0001f3fb\u200d\u2640\ufe0f": {":woman_pouting_tone1:"}, "\U0001f64e\U0001f3fb\u200d\u2642\ufe0f": {":man_pouting_tone1:"}, @@ -6761,6 +6786,7 @@ func emojiRevCode() map[string][]string { "\U0001f6d5": {":hindu_temple:"}, "\U0001f6d6": {":hut:"}, "\U0001f6d7": {":elevator:"}, + "\U0001f6dc": {":wireless:"}, "\U0001f6dd": {":playground_slide:"}, "\U0001f6de": {":wheel:"}, "\U0001f6df": {":ring_buoy:"}, @@ -7422,10 +7448,13 @@ func emojiRevCode() map[string][]string { "\U0001fa72": {":briefs:", ":swim_brief:"}, "\U0001fa73": {":shorts:"}, "\U0001fa74": {":thong_sandal:"}, + "\U0001fa75": {":light_blue_heart:"}, + "\U0001fa76": {":grey_heart:"}, + "\U0001fa77": {":pink_heart:"}, "\U0001fa78": {":drop_of_blood:"}, "\U0001fa79": {":adhesive_bandage:"}, "\U0001fa7a": {":stethoscope:"}, - "\U0001fa7b": {":x-ray:"}, + "\U0001fa7b": {":x-ray:", ":x_ray:"}, "\U0001fa7c": {":crutch:"}, "\U0001fa80": {":yo-yo:", ":yo_yo:"}, "\U0001fa81": {":kite:"}, @@ -7434,6 +7463,8 @@ func emojiRevCode() map[string][]string { "\U0001fa84": {":magic_wand:"}, "\U0001fa85": {":pinata:", ":piñata:"}, "\U0001fa86": {":nesting_dolls:"}, + "\U0001fa87": {":maracas:"}, + "\U0001fa88": {":flute:"}, "\U0001fa90": {":ringed_planet:"}, "\U0001fa91": {":chair:"}, "\U0001fa92": {":razor:"}, @@ -7463,6 +7494,9 @@ func emojiRevCode() map[string][]string { "\U0001faaa": {":identification_card:"}, "\U0001faab": {":low_battery:"}, "\U0001faac": {":hamsa:"}, + "\U0001faad": {":folding_hand_fan:"}, + "\U0001faae": {":hair_pick:"}, + "\U0001faaf": {":khanda:"}, "\U0001fab0": {":fly:"}, "\U0001fab1": {":worm:"}, "\U0001fab2": {":beetle:"}, @@ -7474,12 +7508,18 @@ func emojiRevCode() map[string][]string { "\U0001fab8": {":coral:"}, "\U0001fab9": {":empty_nest:"}, "\U0001faba": {":nest_with_eggs:"}, + "\U0001fabb": {":hyacinth:"}, + "\U0001fabc": {":jellyfish:"}, + "\U0001fabd": {":wing:"}, + "\U0001fabf": {":goose:"}, "\U0001fac0": {":anatomical_heart:"}, "\U0001fac1": {":lungs:"}, "\U0001fac2": {":people_hugging:"}, "\U0001fac3": {":pregnant_man:"}, "\U0001fac4": {":pregnant_person:"}, "\U0001fac5": {":person_with_crown:"}, + "\U0001face": {":moose:"}, + "\U0001facf": {":donkey:"}, "\U0001fad0": {":blueberries:"}, "\U0001fad1": {":bell_pepper:"}, "\U0001fad2": {":olive:"}, @@ -7490,6 +7530,8 @@ func emojiRevCode() map[string][]string { "\U0001fad7": {":pouring_liquid:"}, "\U0001fad8": {":beans:"}, "\U0001fad9": {":jar:"}, + "\U0001fada": {":ginger_root:"}, + "\U0001fadb": {":pea_pod:"}, "\U0001fae0": {":melting_face:"}, "\U0001fae1": {":saluting_face:"}, "\U0001fae2": {":face_with_open_eyes_and_hand_over_mouth:"}, @@ -7498,6 +7540,7 @@ func emojiRevCode() map[string][]string { "\U0001fae5": {":dotted_line_face:"}, "\U0001fae6": {":biting_lip:"}, "\U0001fae7": {":bubbles:"}, + "\U0001fae8": {":shaking_face:"}, "\U0001faf0": {":hand_with_index_finger_and_thumb_crossed:"}, "\U0001faf1": {":rightwards_hand:"}, "\U0001faf2": {":leftwards_hand:"}, @@ -7505,6 +7548,8 @@ func emojiRevCode() map[string][]string { "\U0001faf4": {":palm_up_hand:"}, "\U0001faf5": {":index_pointing_at_the_viewer:"}, "\U0001faf6": {":heart_hands:"}, + "\U0001faf7": {":leftwards_pushing_hand:"}, + "\U0001faf8": {":rightwards_pushing_hand:"}, "\u00a9\ufe0f": {":copyright:"}, "\u00ae\ufe0f": {":registered:"}, "\u203c": {":double_exclamation_mark:"}, diff --git a/vendor/github.com/kyokomi/emoji/v2/wercker.yml b/vendor/github.com/kyokomi/emoji/v2/wercker.yml deleted file mode 100644 index 82bd2099..00000000 --- a/vendor/github.com/kyokomi/emoji/v2/wercker.yml +++ /dev/null @@ -1,33 +0,0 @@ -box: golang -build: - steps: - - setup-go-workspace - - script: - name: go version - code: go version - - script: - name: install tools - code: | - go install github.com/mattn/goveralls@latest - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - - script: - name: go get - code: | - go get ./... - - script: - name: go build - code: | - go build ./... - - script: - name: golangci-lint - code: | - golangci-lint run - - script: - name: go test - code: | - go test ./... - - script: - name: coveralls - code: | - goveralls -v -service wercker.com -repotoken $COVERALLS_TOKEN - diff --git a/vendor/github.com/labstack/echo/v4/CHANGELOG.md b/vendor/github.com/labstack/echo/v4/CHANGELOG.md index 8b71fb8e..c1c3c107 100644 --- a/vendor/github.com/labstack/echo/v4/CHANGELOG.md +++ b/vendor/github.com/labstack/echo/v4/CHANGELOG.md @@ -1,5 +1,42 @@ # Changelog +## v4.10.0 - 2022-12-27 + +**Security** + +* We are deprecating JWT middleware in this repository. Please use https://github.com/labstack/echo-jwt instead. + + JWT middleware is moved to separate repository to allow us to bump/upgrade version of JWT implementation (`github.com/golang-jwt/jwt`) we are using +which we can not do in Echo core because this would break backwards compatibility guarantees we try to maintain. + +* This minor version bumps minimum Go version to 1.17 (from 1.16) due `golang.org/x/` packages we depend on. There are + several vulnerabilities fixed in these libraries. + + Echo still tries to support last 4 Go versions but there are occasions we can not guarantee this promise. + + +**Enhancements** + +* Bump x/text to 0.3.8 [#2305](https://github.com/labstack/echo/pull/2305) +* Bump dependencies and add notes about Go releases we support [#2336](https://github.com/labstack/echo/pull/2336) +* Add helper interface for ProxyBalancer interface [#2316](https://github.com/labstack/echo/pull/2316) +* Expose `middleware.CreateExtractors` function so we can use it from echo-contrib repository [#2338](https://github.com/labstack/echo/pull/2338) +* Refactor func(Context) error to HandlerFunc [#2315](https://github.com/labstack/echo/pull/2315) +* Improve function comments [#2329](https://github.com/labstack/echo/pull/2329) +* Add new method HTTPError.WithInternal [#2340](https://github.com/labstack/echo/pull/2340) +* Replace io/ioutil package usages [#2342](https://github.com/labstack/echo/pull/2342) +* Add staticcheck to CI flow [#2343](https://github.com/labstack/echo/pull/2343) +* Replace relative path determination from proprietary to std [#2345](https://github.com/labstack/echo/pull/2345) +* Remove square brackets from ipv6 addresses in XFF (X-Forwarded-For header) [#2182](https://github.com/labstack/echo/pull/2182) +* Add testcases for some BodyLimit middleware configuration options [#2350](https://github.com/labstack/echo/pull/2350) +* Additional configuration options for RequestLogger and Logger middleware [#2341](https://github.com/labstack/echo/pull/2341) +* Add route to request log [#2162](https://github.com/labstack/echo/pull/2162) +* GitHub Workflows security hardening [#2358](https://github.com/labstack/echo/pull/2358) +* Add govulncheck to CI and bump dependencies [#2362](https://github.com/labstack/echo/pull/2362) +* Fix rate limiter docs [#2366](https://github.com/labstack/echo/pull/2366) +* Refactor how `e.Routes()` work and introduce `e.OnAddRouteHandler` callback [#2337](https://github.com/labstack/echo/pull/2337) + + ## v4.9.1 - 2022-10-12 **Fixes** diff --git a/vendor/github.com/labstack/echo/v4/Makefile b/vendor/github.com/labstack/echo/v4/Makefile index a6c4aaa9..6aff6a89 100644 --- a/vendor/github.com/labstack/echo/v4/Makefile +++ b/vendor/github.com/labstack/echo/v4/Makefile @@ -10,8 +10,10 @@ check: lint vet race ## Check project init: @go install golang.org/x/lint/golint@latest + @go install honnef.co/go/tools/cmd/staticcheck@latest lint: ## Lint the files + @staticcheck ${PKG_LIST} @golint -set_exit_status ${PKG_LIST} vet: ## Vet the files @@ -29,6 +31,6 @@ benchmark: ## Run benchmarks help: ## Display this help screen @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -goversion ?= "1.16" -test_version: ## Run tests inside Docker with given version (defaults to 1.15 oldest supported). Example: make test_version goversion=1.16 +goversion ?= "1.17" +test_version: ## Run tests inside Docker with given version (defaults to 1.17 oldest supported). Example: make test_version goversion=1.17 @docker run --rm -it -v $(shell pwd):/project golang:$(goversion) /bin/sh -c "cd /project && make init check" diff --git a/vendor/github.com/labstack/echo/v4/context.go b/vendor/github.com/labstack/echo/v4/context.go index 5567100b..b3a7ce8d 100644 --- a/vendor/github.com/labstack/echo/v4/context.go +++ b/vendor/github.com/labstack/echo/v4/context.go @@ -169,7 +169,11 @@ type ( // Redirect redirects the request to a provided URL with status code. Redirect(code int, url string) error - // Error invokes the registered HTTP error handler. Generally used by middleware. + // Error invokes the registered global HTTP error handler. Generally used by middleware. + // A side-effect of calling global error handler is that now Response has been committed (sent to the client) and + // middlewares up in chain can not change Response status code or Response body anymore. + // + // Avoid using this method in handlers as no middleware will be able to effectively handle errors after that. Error(err error) // Handler returns the matched handler by router. @@ -282,11 +286,16 @@ func (c *context) RealIP() string { if ip := c.request.Header.Get(HeaderXForwardedFor); ip != "" { i := strings.IndexAny(ip, ",") if i > 0 { - return strings.TrimSpace(ip[:i]) + xffip := strings.TrimSpace(ip[:i]) + xffip = strings.TrimPrefix(xffip, "[") + xffip = strings.TrimSuffix(xffip, "]") + return xffip } return ip } if ip := c.request.Header.Get(HeaderXRealIP); ip != "" { + ip = strings.TrimPrefix(ip, "[") + ip = strings.TrimSuffix(ip, "]") return ip } ra, _, _ := net.SplitHostPort(c.request.RemoteAddr) diff --git a/vendor/github.com/labstack/echo/v4/echo.go b/vendor/github.com/labstack/echo/v4/echo.go index 5ae8a142..f6d89b96 100644 --- a/vendor/github.com/labstack/echo/v4/echo.go +++ b/vendor/github.com/labstack/echo/v4/echo.go @@ -3,50 +3,49 @@ Package echo implements high performance, minimalist Go web framework. Example: - package main + package main - import ( - "net/http" + import ( + "net/http" - "github.com/labstack/echo/v4" - "github.com/labstack/echo/v4/middleware" - ) + "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" + ) - // Handler - func hello(c echo.Context) error { - return c.String(http.StatusOK, "Hello, World!") - } + // Handler + func hello(c echo.Context) error { + return c.String(http.StatusOK, "Hello, World!") + } - func main() { - // Echo instance - e := echo.New() + func main() { + // Echo instance + e := echo.New() - // Middleware - e.Use(middleware.Logger()) - e.Use(middleware.Recover()) + // Middleware + e.Use(middleware.Logger()) + e.Use(middleware.Recover()) - // Routes - e.GET("/", hello) + // Routes + e.GET("/", hello) - // Start server - e.Logger.Fatal(e.Start(":1323")) - } + // Start server + e.Logger.Fatal(e.Start(":1323")) + } Learn more at https://echo.labstack.com */ package echo import ( - "bytes" stdContext "context" "crypto/tls" "errors" "fmt" "io" - "io/ioutil" stdLog "log" "net" "net/http" + "os" "reflect" "runtime" "sync" @@ -62,20 +61,28 @@ import ( type ( // Echo is the top-level framework instance. + // + // Goroutine safety: Do not mutate Echo instance fields after server has started. Accessing these + // fields from handlers/middlewares and changing field values at the same time leads to data-races. + // Adding new routes after the server has been started is also not safe! Echo struct { filesystem common // startupMutex is mutex to lock Echo instance access during server configuration and startup. Useful for to get // listener address info (on which interface/port was listener binded) without having data races. - startupMutex sync.RWMutex + startupMutex sync.RWMutex + colorer *color.Color + + // premiddleware are middlewares that are run before routing is done. In case a pre-middleware returns + // an error the router is not executed and the request will end up in the global error handler. + premiddleware []MiddlewareFunc + middleware []MiddlewareFunc + maxParam *int + router *Router + routers map[string]*Router + pool sync.Pool + StdLogger *stdLog.Logger - colorer *color.Color - premiddleware []MiddlewareFunc - middleware []MiddlewareFunc - maxParam *int - router *Router - routers map[string]*Router - pool sync.Pool Server *http.Server TLSServer *http.Server Listener net.Listener @@ -93,6 +100,9 @@ type ( Logger Logger IPExtractor IPExtractor ListenerNetwork string + + // OnAddRouteHandler is called when Echo adds new route to specific host router. + OnAddRouteHandler func(host string, route Route, handler HandlerFunc, middleware []MiddlewareFunc) } // Route contains a handler and information for matching against requests. @@ -116,7 +126,7 @@ type ( HandlerFunc func(c Context) error // HTTPErrorHandler is a centralized HTTP error handler. - HTTPErrorHandler func(error, Context) + HTTPErrorHandler func(err error, c Context) // Validator is the interface that wraps the Validate function. Validator interface { @@ -248,7 +258,7 @@ const ( const ( // Version of Echo - Version = "4.9.0" + Version = "4.10.0" website = "https://echo.labstack.com" // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo banner = ` @@ -527,21 +537,20 @@ func (e *Echo) File(path, file string, m ...MiddlewareFunc) *Route { return e.file(path, file, e.GET, m...) } -func (e *Echo) add(host, method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route { - name := handlerName(handler) +func (e *Echo) add(host, method, path string, handler HandlerFunc, middlewares ...MiddlewareFunc) *Route { router := e.findRouter(host) - // FIXME: when handler+middleware are both nil ... make it behave like handler removal - router.Add(method, path, func(c Context) error { - h := applyMiddleware(handler, middleware...) + //FIXME: when handler+middleware are both nil ... make it behave like handler removal + name := handlerName(handler) + route := router.add(method, path, name, func(c Context) error { + h := applyMiddleware(handler, middlewares...) return h(c) }) - r := &Route{ - Method: method, - Path: path, - Name: name, + + if e.OnAddRouteHandler != nil { + e.OnAddRouteHandler(host, *route, handler, middlewares) } - e.router.routes[method+path] = r - return r + + return route } // Add registers a new route for an HTTP method and path with matching handler @@ -565,7 +574,7 @@ func (e *Echo) Group(prefix string, m ...MiddlewareFunc) (g *Group) { return } -// URI generates a URI from handler. +// URI generates an URI from handler. func (e *Echo) URI(handler HandlerFunc, params ...interface{}) string { name := handlerName(handler) return e.Reverse(name, params...) @@ -578,35 +587,13 @@ func (e *Echo) URL(h HandlerFunc, params ...interface{}) string { // Reverse generates an URL from route name and provided parameters. func (e *Echo) Reverse(name string, params ...interface{}) string { - uri := new(bytes.Buffer) - ln := len(params) - n := 0 - for _, r := range e.router.routes { - if r.Name == name { - for i, l := 0, len(r.Path); i < l; i++ { - if (r.Path[i] == ':' || r.Path[i] == '*') && n < ln { - for ; i < l && r.Path[i] != '/'; i++ { - } - uri.WriteString(fmt.Sprintf("%v", params[n])) - n++ - } - if i < l { - uri.WriteByte(r.Path[i]) - } - } - break - } - } - return uri.String() + return e.router.Reverse(name, params...) } -// Routes returns the registered routes. +// Routes returns the registered routes for default router. +// In case when Echo serves multiple hosts/domains use `e.Routers()["domain2.site"].Routes()` to get specific host routes. func (e *Echo) Routes() []*Route { - routes := make([]*Route, 0, len(e.router.routes)) - for _, v := range e.router.routes { - routes = append(routes, v) - } - return routes + return e.router.Routes() } // AcquireContext returns an empty `Context` instance from the pool. @@ -626,7 +613,7 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Acquire context c := e.pool.Get().(*context) c.Reset(r, w) - var h func(Context) error + var h HandlerFunc if e.premiddleware == nil { e.findRouter(r.Host).Find(r.Method, GetPath(r), c) @@ -700,7 +687,7 @@ func (e *Echo) StartTLS(address string, certFile, keyFile interface{}) (err erro func filepathOrContent(fileOrContent interface{}) (content []byte, err error) { switch v := fileOrContent.(type) { case string: - return ioutil.ReadFile(v) + return os.ReadFile(v) case []byte: return v, nil default: @@ -884,6 +871,15 @@ func (he *HTTPError) SetInternal(err error) *HTTPError { return he } +// WithInternal returns clone of HTTPError with err set to HTTPError.Internal field +func (he *HTTPError) WithInternal(err error) *HTTPError { + return &HTTPError{ + Code: he.Code, + Message: he.Message, + Internal: err, + } +} + // Unwrap satisfies the Go 1.13 error wrapper interface. func (he *HTTPError) Unwrap() error { return he.Internal @@ -913,8 +909,8 @@ func WrapMiddleware(m func(http.Handler) http.Handler) MiddlewareFunc { // GetPath returns RawPath, if it's empty returns Path from URL // Difference between RawPath and Path is: -// * Path is where request path is stored. Value is stored in decoded form: /%47%6f%2f becomes /Go/. -// * RawPath is an optional field which only gets set if the default encoding is different from Path. +// - Path is where request path is stored. Value is stored in decoded form: /%47%6f%2f becomes /Go/. +// - RawPath is an optional field which only gets set if the default encoding is different from Path. func GetPath(r *http.Request) string { path := r.URL.RawPath if path == "" { diff --git a/vendor/github.com/labstack/echo/v4/echo_fs.go b/vendor/github.com/labstack/echo/v4/echo_fs.go index b8526da9..9f83a035 100644 --- a/vendor/github.com/labstack/echo/v4/echo_fs.go +++ b/vendor/github.com/labstack/echo/v4/echo_fs.go @@ -7,7 +7,6 @@ import ( "net/url" "os" "path/filepath" - "runtime" "strings" ) @@ -125,7 +124,7 @@ func subFS(currentFs fs.FS, root string) (fs.FS, error) { // we need to make exception for `defaultFS` instances as it interprets root prefix differently from fs.FS. // fs.Fs.Open does not like relative paths ("./", "../") and absolute paths at all but prior echo.Filesystem we // were able to use paths like `./myfile.log`, `/etc/hosts` and these would work fine with `os.Open` but not with fs.Fs - if isRelativePath(root) { + if !filepath.IsAbs(root) { root = filepath.Join(dFS.prefix, root) } return &defaultFS{ @@ -136,21 +135,6 @@ func subFS(currentFs fs.FS, root string) (fs.FS, error) { return fs.Sub(currentFs, root) } -func isRelativePath(path string) bool { - if path == "" { - return true - } - if path[0] == '/' { - return false - } - if runtime.GOOS == "windows" && strings.IndexByte(path, ':') != -1 { - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#file_and_directory_names - // https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats - return false - } - return true -} - // MustSubFS creates sub FS from current filesystem or panic on failure. // Panic happens when `fsRoot` contains invalid path according to `fs.ValidPath` rules. // diff --git a/vendor/github.com/labstack/echo/v4/ip.go b/vendor/github.com/labstack/echo/v4/ip.go index 46d464cf..1bcd756a 100644 --- a/vendor/github.com/labstack/echo/v4/ip.go +++ b/vendor/github.com/labstack/echo/v4/ip.go @@ -227,6 +227,8 @@ func ExtractIPFromRealIPHeader(options ...TrustOption) IPExtractor { return func(req *http.Request) string { realIP := req.Header.Get(HeaderXRealIP) if realIP != "" { + realIP = strings.TrimPrefix(realIP, "[") + realIP = strings.TrimSuffix(realIP, "]") if ip := net.ParseIP(realIP); ip != nil && checker.trust(ip) { return realIP } @@ -248,7 +250,10 @@ func ExtractIPFromXFFHeader(options ...TrustOption) IPExtractor { } ips := append(strings.Split(strings.Join(xffs, ","), ","), directIP) for i := len(ips) - 1; i >= 0; i-- { - ip := net.ParseIP(strings.TrimSpace(ips[i])) + ips[i] = strings.TrimSpace(ips[i]) + ips[i] = strings.TrimPrefix(ips[i], "[") + ips[i] = strings.TrimSuffix(ips[i], "]") + ip := net.ParseIP(ips[i]) if ip == nil { // Unable to parse IP; cannot trust entire records return directIP diff --git a/vendor/github.com/labstack/echo/v4/middleware/body_dump.go b/vendor/github.com/labstack/echo/v4/middleware/body_dump.go index ebd0d0ab..fa7891b1 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/body_dump.go +++ b/vendor/github.com/labstack/echo/v4/middleware/body_dump.go @@ -4,7 +4,6 @@ import ( "bufio" "bytes" "io" - "io/ioutil" "net" "net/http" @@ -68,9 +67,9 @@ func BodyDumpWithConfig(config BodyDumpConfig) echo.MiddlewareFunc { // Request reqBody := []byte{} if c.Request().Body != nil { // Read - reqBody, _ = ioutil.ReadAll(c.Request().Body) + reqBody, _ = io.ReadAll(c.Request().Body) } - c.Request().Body = ioutil.NopCloser(bytes.NewBuffer(reqBody)) // Reset + c.Request().Body = io.NopCloser(bytes.NewBuffer(reqBody)) // Reset // Response resBody := new(bytes.Buffer) diff --git a/vendor/github.com/labstack/echo/v4/middleware/compress.go b/vendor/github.com/labstack/echo/v4/middleware/compress.go index ac6672e9..9e5f6106 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/compress.go +++ b/vendor/github.com/labstack/echo/v4/middleware/compress.go @@ -4,7 +4,6 @@ import ( "bufio" "compress/gzip" "io" - "io/ioutil" "net" "net/http" "strings" @@ -89,7 +88,7 @@ func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc { // nothing is written to body or error is returned. // See issue #424, #407. res.Writer = rw - w.Reset(ioutil.Discard) + w.Reset(io.Discard) } w.Close() pool.Put(w) @@ -135,7 +134,7 @@ func (w *gzipResponseWriter) Push(target string, opts *http.PushOptions) error { func gzipCompressPool(config GzipConfig) sync.Pool { return sync.Pool{ New: func() interface{} { - w, err := gzip.NewWriterLevel(ioutil.Discard, config.Level) + w, err := gzip.NewWriterLevel(io.Discard, config.Level) if err != nil { return err } diff --git a/vendor/github.com/labstack/echo/v4/middleware/csrf.go b/vendor/github.com/labstack/echo/v4/middleware/csrf.go index ea90fdba..8661c9f8 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/csrf.go +++ b/vendor/github.com/labstack/echo/v4/middleware/csrf.go @@ -119,7 +119,7 @@ func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc { config.CookieSecure = true } - extractors, err := createExtractors(config.TokenLookup, "") + extractors, err := CreateExtractors(config.TokenLookup) if err != nil { panic(err) } diff --git a/vendor/github.com/labstack/echo/v4/middleware/extractor.go b/vendor/github.com/labstack/echo/v4/middleware/extractor.go index afdfd819..5d9cee6d 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/extractor.go +++ b/vendor/github.com/labstack/echo/v4/middleware/extractor.go @@ -24,6 +24,26 @@ var errFormExtractorValueMissing = errors.New("missing value in the form") // ValuesExtractor defines a function for extracting values (keys/tokens) from the given context. type ValuesExtractor func(c echo.Context) ([]string, error) +// CreateExtractors creates ValuesExtractors from given lookups. +// Lookups is a string in the form of ":" or ":,:" that is used +// to extract key from the request. +// Possible values: +// - "header:" or "header::" +// `` is argument value to cut/trim prefix of the extracted value. This is useful if header +// value has static prefix like `Authorization: ` where part that we +// want to cut is ` ` note the space at the end. +// In case of basic authentication `Authorization: Basic ` prefix we want to remove is `Basic `. +// - "query:" +// - "param:" +// - "form:" +// - "cookie:" +// +// Multiple sources example: +// - "header:Authorization,header:X-Api-Key" +func CreateExtractors(lookups string) ([]ValuesExtractor, error) { + return createExtractors(lookups, "") +} + func createExtractors(lookups string, authScheme string) ([]ValuesExtractor, error) { if lookups == "" { return nil, nil diff --git a/vendor/github.com/labstack/echo/v4/middleware/jwt.go b/vendor/github.com/labstack/echo/v4/middleware/jwt.go index bec5167e..bd628264 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/jwt.go +++ b/vendor/github.com/labstack/echo/v4/middleware/jwt.go @@ -154,6 +154,8 @@ var ( // // See: https://jwt.io/introduction // See `JWTConfig.TokenLookup` +// +// Deprecated: Please use https://github.com/labstack/echo-jwt instead func JWT(key interface{}) echo.MiddlewareFunc { c := DefaultJWTConfig c.SigningKey = key @@ -162,6 +164,8 @@ func JWT(key interface{}) echo.MiddlewareFunc { // JWTWithConfig returns a JWT auth middleware with config. // See: `JWT()`. +// +// Deprecated: Please use https://github.com/labstack/echo-jwt instead func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc { // Defaults if config.Skipper == nil { @@ -262,7 +266,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc { } func (config *JWTConfig) defaultParseToken(auth string, c echo.Context) (interface{}, error) { - token := new(jwt.Token) + var token *jwt.Token var err error // Issue #647, #656 if _, ok := config.Claims.(jwt.MapClaims); ok { diff --git a/vendor/github.com/labstack/echo/v4/middleware/logger.go b/vendor/github.com/labstack/echo/v4/middleware/logger.go index a21df8f3..7958d873 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/logger.go +++ b/vendor/github.com/labstack/echo/v4/middleware/logger.go @@ -35,6 +35,7 @@ type ( // - host // - method // - path + // - route // - protocol // - referer // - user_agent @@ -47,6 +48,7 @@ type ( // - header: // - query: // - form: + // - custom (see CustomTagFunc field) // // Example "${remote_ip} ${status}" // @@ -56,6 +58,11 @@ type ( // Optional. Default value DefaultLoggerConfig.CustomTimeFormat. CustomTimeFormat string `yaml:"custom_time_format"` + // CustomTagFunc is function called for `${custom}` tag to output user implemented text by writing it to buf. + // Make sure that outputted text creates valid JSON string with other logged tags. + // Optional. + CustomTagFunc func(c echo.Context, buf *bytes.Buffer) (int, error) + // Output is a writer where logs in JSON format are written. // Optional. Default value os.Stdout. Output io.Writer @@ -126,6 +133,11 @@ func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc { if _, err = config.template.ExecuteFunc(buf, func(w io.Writer, tag string) (int, error) { switch tag { + case "custom": + if config.CustomTagFunc == nil { + return 0, nil + } + return config.CustomTagFunc(c, buf) case "time_unix": return buf.WriteString(strconv.FormatInt(time.Now().Unix(), 10)) case "time_unix_milli": @@ -162,6 +174,8 @@ func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc { p = "/" } return buf.WriteString(p) + case "route": + return buf.WriteString(c.Path()) case "protocol": return buf.WriteString(req.Proto) case "referer": diff --git a/vendor/github.com/labstack/echo/v4/middleware/proxy.go b/vendor/github.com/labstack/echo/v4/middleware/proxy.go index 6cfd6731..d2cd2aa6 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/proxy.go +++ b/vendor/github.com/labstack/echo/v4/middleware/proxy.go @@ -72,6 +72,11 @@ type ( Next(echo.Context) *ProxyTarget } + // TargetProvider defines an interface that gives the opportunity for balancer to return custom errors when selecting target. + TargetProvider interface { + NextTarget(echo.Context) (*ProxyTarget, error) + } + commonBalancer struct { targets []*ProxyTarget mutex sync.RWMutex @@ -223,6 +228,7 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc { } } + provider, isTargetProvider := config.Balancer.(TargetProvider) return func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) (err error) { if config.Skipper(c) { @@ -231,7 +237,16 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc { req := c.Request() res := c.Response() - tgt := config.Balancer.Next(c) + + var tgt *ProxyTarget + if isTargetProvider { + tgt, err = provider.NextTarget(c) + if err != nil { + return err + } + } else { + tgt = config.Balancer.Next(c) + } c.Set(config.ContextKey, tgt) if err := rewriteURL(config.RegexRewrite, req); err != nil { diff --git a/vendor/github.com/labstack/echo/v4/middleware/rate_limiter.go b/vendor/github.com/labstack/echo/v4/middleware/rate_limiter.go index be2b348d..f7fae83c 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/rate_limiter.go +++ b/vendor/github.com/labstack/echo/v4/middleware/rate_limiter.go @@ -155,7 +155,7 @@ type ( RateLimiterMemoryStore struct { visitors map[string]*Visitor mutex sync.Mutex - rate rate.Limit //for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit. + rate rate.Limit // for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit. burst int expiresIn time.Duration @@ -170,15 +170,16 @@ type ( /* NewRateLimiterMemoryStore returns an instance of RateLimiterMemoryStore with -the provided rate (as req/s). The provided rate less than 1 will be treated as zero. +the provided rate (as req/s). for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit. Burst and ExpiresIn will be set to default values. +Note that if the provided rate is a float number and Burst is zero, Burst will be treated as the rounded down value of the rate. + Example (with 20 requests/sec): limiterStore := middleware.NewRateLimiterMemoryStore(20) - */ func NewRateLimiterMemoryStore(rate rate.Limit) (store *RateLimiterMemoryStore) { return NewRateLimiterMemoryStoreWithConfig(RateLimiterMemoryStoreConfig{ @@ -188,7 +189,7 @@ func NewRateLimiterMemoryStore(rate rate.Limit) (store *RateLimiterMemoryStore) /* NewRateLimiterMemoryStoreWithConfig returns an instance of RateLimiterMemoryStore -with the provided configuration. Rate must be provided. Burst will be set to the value of +with the provided configuration. Rate must be provided. Burst will be set to the rounded down value of the configured rate if not provided or set to 0. The build-in memory store is usually capable for modest loads. For higher loads other @@ -225,7 +226,7 @@ func NewRateLimiterMemoryStoreWithConfig(config RateLimiterMemoryStoreConfig) (s // RateLimiterMemoryStoreConfig represents configuration for RateLimiterMemoryStore type RateLimiterMemoryStoreConfig struct { Rate rate.Limit // Rate of requests allowed to pass as req/s. For more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit. - Burst int // Burst additionally allows a number of requests to pass when rate limit is reached + Burst int // Burst is maximum number of requests to pass at the same moment. It additionally allows a number of requests to pass when rate limit is reached. ExpiresIn time.Duration // ExpiresIn is the duration after that a rate limiter is cleaned up } diff --git a/vendor/github.com/labstack/echo/v4/middleware/request_logger.go b/vendor/github.com/labstack/echo/v4/middleware/request_logger.go index 7a4d9822..b9e36925 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/request_logger.go +++ b/vendor/github.com/labstack/echo/v4/middleware/request_logger.go @@ -10,10 +10,16 @@ import ( // Example for `fmt.Printf` // e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{ -// LogStatus: true, -// LogURI: true, +// LogStatus: true, +// LogURI: true, +// LogError: true, +// HandleError: true, // forwards error to the global error handler, so it can decide appropriate status code // LogValuesFunc: func(c echo.Context, v middleware.RequestLoggerValues) error { -// fmt.Printf("REQUEST: uri: %v, status: %v\n", v.URI, v.Status) +// if v.Error == nil { +// fmt.Printf("REQUEST: uri: %v, status: %v\n", v.URI, v.Status) +// } else { +// fmt.Printf("REQUEST_ERROR: uri: %v, status: %v, err: %v\n", v.URI, v.Status, v.Error) +// } // return nil // }, // })) @@ -21,14 +27,23 @@ import ( // Example for Zerolog (https://github.com/rs/zerolog) // logger := zerolog.New(os.Stdout) // e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{ -// LogURI: true, -// LogStatus: true, +// LogURI: true, +// LogStatus: true, +// LogError: true, +// HandleError: true, // forwards error to the global error handler, so it can decide appropriate status code // LogValuesFunc: func(c echo.Context, v middleware.RequestLoggerValues) error { -// logger.Info(). -// Str("URI", v.URI). -// Int("status", v.Status). -// Msg("request") -// +// if v.Error == nil { +// logger.Info(). +// Str("URI", v.URI). +// Int("status", v.Status). +// Msg("request") +// } else { +// logger.Error(). +// Err(v.Error). +// Str("URI", v.URI). +// Int("status", v.Status). +// Msg("request error") +// } // return nil // }, // })) @@ -36,29 +51,47 @@ import ( // Example for Zap (https://github.com/uber-go/zap) // logger, _ := zap.NewProduction() // e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{ -// LogURI: true, -// LogStatus: true, +// LogURI: true, +// LogStatus: true, +// LogError: true, +// HandleError: true, // forwards error to the global error handler, so it can decide appropriate status code // LogValuesFunc: func(c echo.Context, v middleware.RequestLoggerValues) error { -// logger.Info("request", -// zap.String("URI", v.URI), -// zap.Int("status", v.Status), -// ) -// +// if v.Error == nil { +// logger.Info("request", +// zap.String("URI", v.URI), +// zap.Int("status", v.Status), +// ) +// } else { +// logger.Error("request error", +// zap.String("URI", v.URI), +// zap.Int("status", v.Status), +// zap.Error(v.Error), +// ) +// } // return nil // }, // })) // // Example for Logrus (https://github.com/sirupsen/logrus) -// log := logrus.New() +// log := logrus.New() // e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{ -// LogURI: true, -// LogStatus: true, -// LogValuesFunc: func(c echo.Context, values middleware.RequestLoggerValues) error { -// log.WithFields(logrus.Fields{ -// "URI": values.URI, -// "status": values.Status, -// }).Info("request") -// +// LogURI: true, +// LogStatus: true, +// LogError: true, +// HandleError: true, // forwards error to the global error handler, so it can decide appropriate status code +// LogValuesFunc: func(c echo.Context, v middleware.RequestLoggerValues) error { +// if v.Error == nil { +// log.WithFields(logrus.Fields{ +// "URI": v.URI, +// "status": v.Status, +// }).Info("request") +// } else { +// log.WithFields(logrus.Fields{ +// "URI": v.URI, +// "status": v.Status, +// "error": v.Error, +// }).Error("request error") +// } // return nil // }, // })) @@ -74,6 +107,13 @@ type RequestLoggerConfig struct { // Mandatory. LogValuesFunc func(c echo.Context, v RequestLoggerValues) error + // HandleError instructs logger to call global error handler when next middleware/handler returns an error. + // This is useful when you have custom error handler that can decide to use different status codes. + // + // A side-effect of calling global error handler is that now Response has been committed and sent to the client + // and middlewares up in chain can not change Response status code or response body. + HandleError bool + // LogLatency instructs logger to record duration it took to execute rest of the handler chain (next(c) call). LogLatency bool // LogProtocol instructs logger to extract request protocol (i.e. `HTTP/1.1` or `HTTP/2`) @@ -217,6 +257,9 @@ func (config RequestLoggerConfig) ToMiddleware() (echo.MiddlewareFunc, error) { config.BeforeNextFunc(c) } err := next(c) + if config.HandleError { + c.Error(err) + } v := RequestLoggerValues{ StartTime: start, @@ -264,7 +307,9 @@ func (config RequestLoggerConfig) ToMiddleware() (echo.MiddlewareFunc, error) { } if config.LogStatus { v.Status = res.Status - if err != nil { + if err != nil && !config.HandleError { + // this block should not be executed in case of HandleError=true as the global error handler will decide + // the status code. In that case status code could be different from what err contains. var httpErr *echo.HTTPError if errors.As(err, &httpErr) { v.Status = httpErr.Code @@ -310,6 +355,9 @@ func (config RequestLoggerConfig) ToMiddleware() (echo.MiddlewareFunc, error) { return errOnLog } + // in case of HandleError=true we are returning the error that we already have handled with global error handler + // this is deliberate as this error could be useful for upstream middlewares and default global error handler + // will ignore that error when it bubbles up in middleware chain. return err } }, nil diff --git a/vendor/github.com/labstack/echo/v4/middleware/slash.go b/vendor/github.com/labstack/echo/v4/middleware/slash.go index 4188675b..a3bf807e 100644 --- a/vendor/github.com/labstack/echo/v4/middleware/slash.go +++ b/vendor/github.com/labstack/echo/v4/middleware/slash.go @@ -33,7 +33,7 @@ func AddTrailingSlash() echo.MiddlewareFunc { return AddTrailingSlashWithConfig(DefaultTrailingSlashConfig) } -// AddTrailingSlashWithConfig returns a AddTrailingSlash middleware with config. +// AddTrailingSlashWithConfig returns an AddTrailingSlash middleware with config. // See `AddTrailingSlash()`. func AddTrailingSlashWithConfig(config TrailingSlashConfig) echo.MiddlewareFunc { // Defaults diff --git a/vendor/github.com/labstack/echo/v4/router.go b/vendor/github.com/labstack/echo/v4/router.go index 23c5bd3b..86a986a2 100644 --- a/vendor/github.com/labstack/echo/v4/router.go +++ b/vendor/github.com/labstack/echo/v4/router.go @@ -2,6 +2,7 @@ package echo import ( "bytes" + "fmt" "net/http" ) @@ -141,6 +142,51 @@ func NewRouter(e *Echo) *Router { } } +// Routes returns the registered routes. +func (r *Router) Routes() []*Route { + routes := make([]*Route, 0, len(r.routes)) + for _, v := range r.routes { + routes = append(routes, v) + } + return routes +} + +// Reverse generates an URL from route name and provided parameters. +func (r *Router) Reverse(name string, params ...interface{}) string { + uri := new(bytes.Buffer) + ln := len(params) + n := 0 + for _, route := range r.routes { + if route.Name == name { + for i, l := 0, len(route.Path); i < l; i++ { + if (route.Path[i] == ':' || route.Path[i] == '*') && n < ln { + for ; i < l && route.Path[i] != '/'; i++ { + } + uri.WriteString(fmt.Sprintf("%v", params[n])) + n++ + } + if i < l { + uri.WriteByte(route.Path[i]) + } + } + break + } + } + return uri.String() +} + +func (r *Router) add(method, path, name string, h HandlerFunc) *Route { + r.Add(method, path, h) + + route := &Route{ + Method: method, + Path: path, + Name: name, + } + r.routes[method+path] = route + return route +} + // Add registers a new route for method and path with matching handler. func (r *Router) Add(method, path string, h HandlerFunc) { // Validate path diff --git a/vendor/github.com/lrstanley/girc/.editorconfig b/vendor/github.com/lrstanley/girc/.editorconfig index 6df59d5c..32ecf3ee 100644 --- a/vendor/github.com/lrstanley/girc/.editorconfig +++ b/vendor/github.com/lrstanley/girc/.editorconfig @@ -22,7 +22,7 @@ indent_size = 4 [*.md] trim_trailing_whitespace = false -[*.{md,py,sh,yml,yaml,js,ts,vue,css}] +[*.{md,py,sh,yml,yaml,cjs,js,ts,vue,css}] max_line_length = 105 [*.{yml,yaml,toml}] @@ -36,7 +36,7 @@ insert_final_newline = ignore max_line_length = 140 indent_size = 2 -[*.{js,ts,vue,css}] +[*.{cjs,js,ts,vue,css}] indent_size = 2 [Makefile] diff --git a/vendor/github.com/lrstanley/girc/README.md b/vendor/github.com/lrstanley/girc/README.md index 19670eae..ddb0bc1b 100644 --- a/vendor/github.com/lrstanley/girc/README.md +++ b/vendor/github.com/lrstanley/girc/README.md @@ -12,7 +12,7 @@ - + diff --git a/vendor/github.com/magiconair/properties/.travis.yml b/vendor/github.com/magiconair/properties/.travis.yml deleted file mode 100644 index baf9031d..00000000 --- a/vendor/github.com/magiconair/properties/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: go -go: - - 1.3.x - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - "1.10.x" - - "1.11.x" - - "1.12.x" - - "1.13.x" - - "1.14.x" - - "1.15.x" - - "1.16.x" - - tip diff --git a/vendor/github.com/magiconair/properties/CHANGELOG.md b/vendor/github.com/magiconair/properties/CHANGELOG.md index ff8d0253..842e8e24 100644 --- a/vendor/github.com/magiconair/properties/CHANGELOG.md +++ b/vendor/github.com/magiconair/properties/CHANGELOG.md @@ -1,5 +1,50 @@ ## Changelog +### [1.8.7](https://github.com/magiconair/properties/tree/v1.8.7) - 08 Dec 2022 + + * [PR #65](https://github.com/magiconair/properties/pull/65): Speedup Merge + + Thanks to [@AdityaVallabh](https://github.com/AdityaVallabh) for the patch. + + * [PR #66](https://github.com/magiconair/properties/pull/66): use github actions + +### [1.8.6](https://github.com/magiconair/properties/tree/v1.8.6) - 23 Feb 2022 + + * [PR #57](https://github.com/magiconair/properties/pull/57):Fix "unreachable code" lint error + + Thanks to [@ellie](https://github.com/ellie) for the patch. + + * [PR #63](https://github.com/magiconair/properties/pull/63): Make TestMustGetParsedDuration backwards compatible + + This patch ensures that the `TestMustGetParsedDuration` still works with `go1.3` to make the + author happy until it affects real users. + + Thanks to [@maage](https://github.com/maage) for the patch. + +### [1.8.5](https://github.com/magiconair/properties/tree/v1.8.5) - 24 Mar 2021 + + * [PR #55](https://github.com/magiconair/properties/pull/55): Fix: Encoding Bug in Comments + + When reading comments \ are loaded correctly, but when writing they are then + replaced by \\. This leads to wrong comments when writing and reading multiple times. + + Thanks to [@doxsch](https://github.com/doxsch) for the patch. + +### [1.8.4](https://github.com/magiconair/properties/tree/v1.8.4) - 23 Sep 2020 + + * [PR #50](https://github.com/magiconair/properties/pull/50): enhance error message for circular references + + Thanks to [@sriv](https://github.com/sriv) for the patch. + +### [1.8.3](https://github.com/magiconair/properties/tree/v1.8.3) - 14 Sep 2020 + + * [PR #49](https://github.com/magiconair/properties/pull/49): Include the key in error message causing the circular reference + + The change is include the key in the error message which is causing the circular + reference when parsing/loading the properties files. + + Thanks to [@haroon-sheikh](https://github.com/haroon-sheikh) for the patch. + ### [1.8.2](https://github.com/magiconair/properties/tree/v1.8.2) - 25 Aug 2020 * [PR #36](https://github.com/magiconair/properties/pull/36): Escape backslash on write diff --git a/vendor/github.com/magiconair/properties/decode.go b/vendor/github.com/magiconair/properties/decode.go index 3ebf8049..8e6aa441 100644 --- a/vendor/github.com/magiconair/properties/decode.go +++ b/vendor/github.com/magiconair/properties/decode.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -48,49 +48,49 @@ import ( // // Examples: // -// // Field is ignored. -// Field int `properties:"-"` +// // Field is ignored. +// Field int `properties:"-"` // -// // Field is assigned value of 'Field'. -// Field int +// // Field is assigned value of 'Field'. +// Field int // -// // Field is assigned value of 'myName'. -// Field int `properties:"myName"` +// // Field is assigned value of 'myName'. +// Field int `properties:"myName"` // -// // Field is assigned value of key 'myName' and has a default -// // value 15 if the key does not exist. -// Field int `properties:"myName,default=15"` +// // Field is assigned value of key 'myName' and has a default +// // value 15 if the key does not exist. +// Field int `properties:"myName,default=15"` // -// // Field is assigned value of key 'Field' and has a default -// // value 15 if the key does not exist. -// Field int `properties:",default=15"` +// // Field is assigned value of key 'Field' and has a default +// // value 15 if the key does not exist. +// Field int `properties:",default=15"` // -// // Field is assigned value of key 'date' and the date -// // is in format 2006-01-02 -// Field time.Time `properties:"date,layout=2006-01-02"` +// // Field is assigned value of key 'date' and the date +// // is in format 2006-01-02 +// Field time.Time `properties:"date,layout=2006-01-02"` // -// // Field is assigned the non-empty and whitespace trimmed -// // values of key 'Field' split by commas. -// Field []string +// // Field is assigned the non-empty and whitespace trimmed +// // values of key 'Field' split by commas. +// Field []string // -// // Field is assigned the non-empty and whitespace trimmed -// // values of key 'Field' split by commas and has a default -// // value ["a", "b", "c"] if the key does not exist. -// Field []string `properties:",default=a;b;c"` +// // Field is assigned the non-empty and whitespace trimmed +// // values of key 'Field' split by commas and has a default +// // value ["a", "b", "c"] if the key does not exist. +// Field []string `properties:",default=a;b;c"` // -// // Field is decoded recursively with "Field." as key prefix. -// Field SomeStruct +// // Field is decoded recursively with "Field." as key prefix. +// Field SomeStruct // -// // Field is decoded recursively with "myName." as key prefix. -// Field SomeStruct `properties:"myName"` +// // Field is decoded recursively with "myName." as key prefix. +// Field SomeStruct `properties:"myName"` // -// // Field is decoded recursively with "Field." as key prefix -// // and the next dotted element of the key as map key. -// Field map[string]string +// // Field is decoded recursively with "Field." as key prefix +// // and the next dotted element of the key as map key. +// Field map[string]string // -// // Field is decoded recursively with "myName." as key prefix -// // and the next dotted element of the key as map key. -// Field map[string]string `properties:"myName"` +// // Field is decoded recursively with "myName." as key prefix +// // and the next dotted element of the key as map key. +// Field map[string]string `properties:"myName"` func (p *Properties) Decode(x interface{}) error { t, v := reflect.TypeOf(x), reflect.ValueOf(x) if t.Kind() != reflect.Ptr || v.Elem().Type().Kind() != reflect.Struct { diff --git a/vendor/github.com/magiconair/properties/doc.go b/vendor/github.com/magiconair/properties/doc.go index f8822da2..7c797931 100644 --- a/vendor/github.com/magiconair/properties/doc.go +++ b/vendor/github.com/magiconair/properties/doc.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -13,7 +13,7 @@ // // To load a single properties file use MustLoadFile(): // -// p := properties.MustLoadFile(filename, properties.UTF8) +// p := properties.MustLoadFile(filename, properties.UTF8) // // To load multiple properties files use MustLoadFiles() // which loads the files in the given order and merges the @@ -23,25 +23,25 @@ // Filenames can contain environment variables which are expanded // before loading. // -// f1 := "/etc/myapp/myapp.conf" -// f2 := "/home/${USER}/myapp.conf" -// p := MustLoadFiles([]string{f1, f2}, properties.UTF8, true) +// f1 := "/etc/myapp/myapp.conf" +// f2 := "/home/${USER}/myapp.conf" +// p := MustLoadFiles([]string{f1, f2}, properties.UTF8, true) // // All of the different key/value delimiters ' ', ':' and '=' are // supported as well as the comment characters '!' and '#' and // multi-line values. // -// ! this is a comment -// # and so is this +// ! this is a comment +// # and so is this // -// # the following expressions are equal -// key value -// key=value -// key:value -// key = value -// key : value -// key = val\ -// ue +// # the following expressions are equal +// key value +// key=value +// key:value +// key = value +// key : value +// key = val\ +// ue // // Properties stores all comments preceding a key and provides // GetComments() and SetComments() methods to retrieve and @@ -55,62 +55,62 @@ // and malformed expressions are not allowed and cause an // error. Expansion of environment variables is supported. // -// # standard property -// key = value +// # standard property +// key = value // -// # property expansion: key2 = value -// key2 = ${key} +// # property expansion: key2 = value +// key2 = ${key} // -// # recursive expansion: key3 = value -// key3 = ${key2} +// # recursive expansion: key3 = value +// key3 = ${key2} // -// # circular reference (error) -// key = ${key} +// # circular reference (error) +// key = ${key} // -// # malformed expression (error) -// key = ${ke +// # malformed expression (error) +// key = ${ke // -// # refers to the users' home dir -// home = ${HOME} +// # refers to the users' home dir +// home = ${HOME} // -// # local key takes precedence over env var: u = foo -// USER = foo -// u = ${USER} +// # local key takes precedence over env var: u = foo +// USER = foo +// u = ${USER} // // The default property expansion format is ${key} but can be // changed by setting different pre- and postfix values on the // Properties object. // -// p := properties.NewProperties() -// p.Prefix = "#[" -// p.Postfix = "]#" +// p := properties.NewProperties() +// p.Prefix = "#[" +// p.Postfix = "]#" // // Properties provides convenience functions for getting typed // values with default values if the key does not exist or the // type conversion failed. // -// # Returns true if the value is either "1", "on", "yes" or "true" -// # Returns false for every other value and the default value if -// # the key does not exist. -// v = p.GetBool("key", false) +// # Returns true if the value is either "1", "on", "yes" or "true" +// # Returns false for every other value and the default value if +// # the key does not exist. +// v = p.GetBool("key", false) // -// # Returns the value if the key exists and the format conversion -// # was successful. Otherwise, the default value is returned. -// v = p.GetInt64("key", 999) -// v = p.GetUint64("key", 999) -// v = p.GetFloat64("key", 123.0) -// v = p.GetString("key", "def") -// v = p.GetDuration("key", 999) +// # Returns the value if the key exists and the format conversion +// # was successful. Otherwise, the default value is returned. +// v = p.GetInt64("key", 999) +// v = p.GetUint64("key", 999) +// v = p.GetFloat64("key", 123.0) +// v = p.GetString("key", "def") +// v = p.GetDuration("key", 999) // // As an alternative properties may be applied with the standard // library's flag implementation at any time. // -// # Standard configuration -// v = flag.Int("key", 999, "help message") -// flag.Parse() +// # Standard configuration +// v = flag.Int("key", 999, "help message") +// flag.Parse() // -// # Merge p into the flag set -// p.MustFlag(flag.CommandLine) +// # Merge p into the flag set +// p.MustFlag(flag.CommandLine) // // Properties provides several MustXXX() convenience functions // which will terminate the app if an error occurs. The behavior @@ -119,30 +119,30 @@ // of logging the error set a different ErrorHandler before // you use the Properties package. // -// properties.ErrorHandler = properties.PanicHandler +// properties.ErrorHandler = properties.PanicHandler // -// # Will panic instead of logging an error -// p := properties.MustLoadFile("config.properties") +// # Will panic instead of logging an error +// p := properties.MustLoadFile("config.properties") // // You can also provide your own ErrorHandler function. The only requirement // is that the error handler function must exit after handling the error. // -// properties.ErrorHandler = func(err error) { -// fmt.Println(err) -// os.Exit(1) -// } +// properties.ErrorHandler = func(err error) { +// fmt.Println(err) +// os.Exit(1) +// } // -// # Will write to stdout and then exit -// p := properties.MustLoadFile("config.properties") +// # Will write to stdout and then exit +// p := properties.MustLoadFile("config.properties") // // Properties can also be loaded into a struct via the `Decode` // method, e.g. // -// type S struct { -// A string `properties:"a,default=foo"` -// D time.Duration `properties:"timeout,default=5s"` -// E time.Time `properties:"expires,layout=2006-01-02,default=2015-01-01"` -// } +// type S struct { +// A string `properties:"a,default=foo"` +// D time.Duration `properties:"timeout,default=5s"` +// E time.Time `properties:"expires,layout=2006-01-02,default=2015-01-01"` +// } // // See `Decode()` method for the full documentation. // @@ -152,5 +152,4 @@ // http://en.wikipedia.org/wiki/.properties // // http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29 -// package properties diff --git a/vendor/github.com/magiconair/properties/integrate.go b/vendor/github.com/magiconair/properties/integrate.go index 74d38dc6..35d0ae97 100644 --- a/vendor/github.com/magiconair/properties/integrate.go +++ b/vendor/github.com/magiconair/properties/integrate.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -10,8 +10,9 @@ import "flag" // the respective key for flag.Flag.Name. // // It's use is recommended with command line arguments as in: -// flag.Parse() -// p.MustFlag(flag.CommandLine) +// +// flag.Parse() +// p.MustFlag(flag.CommandLine) func (p *Properties) MustFlag(dst *flag.FlagSet) { m := make(map[string]*flag.Flag) dst.VisitAll(func(f *flag.Flag) { diff --git a/vendor/github.com/magiconair/properties/lex.go b/vendor/github.com/magiconair/properties/lex.go index e1e9dd7b..3d15a1f6 100644 --- a/vendor/github.com/magiconair/properties/lex.go +++ b/vendor/github.com/magiconair/properties/lex.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // diff --git a/vendor/github.com/magiconair/properties/load.go b/vendor/github.com/magiconair/properties/load.go index c83c2dad..635368dc 100644 --- a/vendor/github.com/magiconair/properties/load.go +++ b/vendor/github.com/magiconair/properties/load.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/vendor/github.com/magiconair/properties/parser.go b/vendor/github.com/magiconair/properties/parser.go index 430e4fcd..fccfd39f 100644 --- a/vendor/github.com/magiconair/properties/parser.go +++ b/vendor/github.com/magiconair/properties/parser.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/vendor/github.com/magiconair/properties/properties.go b/vendor/github.com/magiconair/properties/properties.go index 62ae2d67..fb2f7b40 100644 --- a/vendor/github.com/magiconair/properties/properties.go +++ b/vendor/github.com/magiconair/properties/properties.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -700,22 +700,17 @@ func (p *Properties) Delete(key string) { // Merge merges properties, comments and keys from other *Properties into p func (p *Properties) Merge(other *Properties) { + for _, k := range other.k { + if _, ok := p.m[k]; !ok { + p.k = append(p.k, k) + } + } for k, v := range other.m { p.m[k] = v } for k, v := range other.c { p.c[k] = v } - -outer: - for _, otherKey := range other.k { - for _, key := range p.k { - if otherKey == key { - continue outer - } - } - p.k = append(p.k, otherKey) - } } // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/magiconair/properties/rangecheck.go b/vendor/github.com/magiconair/properties/rangecheck.go index b013a2e5..dbd60b36 100644 --- a/vendor/github.com/magiconair/properties/rangecheck.go +++ b/vendor/github.com/magiconair/properties/rangecheck.go @@ -1,4 +1,4 @@ -// Copyright 2018 Frank Schroeder. All rights reserved. +// Copyright 2013-2022 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml b/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml index 793fb184..3aa1840e 100644 --- a/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml +++ b/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml @@ -16,7 +16,11 @@ builds: mod_timestamp: '{{ .CommitTimestamp }}' targets: - linux_amd64 + - linux_arm64 + - linux_arm - windows_amd64 + - windows_arm64 + - windows_arm - darwin_amd64 - darwin_arm64 - id: tomljson @@ -31,7 +35,11 @@ builds: mod_timestamp: '{{ .CommitTimestamp }}' targets: - linux_amd64 + - linux_arm64 + - linux_arm - windows_amd64 + - windows_arm64 + - windows_arm - darwin_amd64 - darwin_arm64 - id: jsontoml @@ -46,7 +54,11 @@ builds: mod_timestamp: '{{ .CommitTimestamp }}' targets: - linux_amd64 + - linux_arm64 + - linux_arm - windows_amd64 + - windows_arm64 + - windows_arm - darwin_amd64 - darwin_arm64 universal_binaries: diff --git a/vendor/github.com/pelletier/go-toml/v2/README.md b/vendor/github.com/pelletier/go-toml/v2/README.md index a63c3a79..9f8439cc 100644 --- a/vendor/github.com/pelletier/go-toml/v2/README.md +++ b/vendor/github.com/pelletier/go-toml/v2/README.md @@ -140,6 +140,17 @@ fmt.Println(string(b)) [marshal]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#Marshal +## Unstable API + +This API does not yet follow the backward compatibility guarantees of this +library. They provide early access to features that may have rough edges or an +API subject to change. + +### Parser + +Parser is the unstable API that allows iterative parsing of a TOML document at +the AST level. See https://pkg.go.dev/github.com/pelletier/go-toml/v2/unstable. + ## Benchmarks Execution time speedup compared to other Go TOML libraries: diff --git a/vendor/github.com/pelletier/go-toml/v2/decode.go b/vendor/github.com/pelletier/go-toml/v2/decode.go index 4af96536..3a860d0f 100644 --- a/vendor/github.com/pelletier/go-toml/v2/decode.go +++ b/vendor/github.com/pelletier/go-toml/v2/decode.go @@ -5,6 +5,8 @@ import ( "math" "strconv" "time" + + "github.com/pelletier/go-toml/v2/unstable" ) func parseInteger(b []byte) (int64, error) { @@ -32,7 +34,7 @@ func parseLocalDate(b []byte) (LocalDate, error) { var date LocalDate if len(b) != 10 || b[4] != '-' || b[7] != '-' { - return date, newDecodeError(b, "dates are expected to have the format YYYY-MM-DD") + return date, unstable.NewParserError(b, "dates are expected to have the format YYYY-MM-DD") } var err error @@ -53,7 +55,7 @@ func parseLocalDate(b []byte) (LocalDate, error) { } if !isValidDate(date.Year, date.Month, date.Day) { - return LocalDate{}, newDecodeError(b, "impossible date") + return LocalDate{}, unstable.NewParserError(b, "impossible date") } return date, nil @@ -64,7 +66,7 @@ func parseDecimalDigits(b []byte) (int, error) { for i, c := range b { if c < '0' || c > '9' { - return 0, newDecodeError(b[i:i+1], "expected digit (0-9)") + return 0, unstable.NewParserError(b[i:i+1], "expected digit (0-9)") } v *= 10 v += int(c - '0') @@ -97,7 +99,7 @@ func parseDateTime(b []byte) (time.Time, error) { } else { const dateTimeByteLen = 6 if len(b) != dateTimeByteLen { - return time.Time{}, newDecodeError(b, "invalid date-time timezone") + return time.Time{}, unstable.NewParserError(b, "invalid date-time timezone") } var direction int switch b[0] { @@ -106,11 +108,11 @@ func parseDateTime(b []byte) (time.Time, error) { case '+': direction = +1 default: - return time.Time{}, newDecodeError(b[:1], "invalid timezone offset character") + return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset character") } if b[3] != ':' { - return time.Time{}, newDecodeError(b[3:4], "expected a : separator") + return time.Time{}, unstable.NewParserError(b[3:4], "expected a : separator") } hours, err := parseDecimalDigits(b[1:3]) @@ -118,7 +120,7 @@ func parseDateTime(b []byte) (time.Time, error) { return time.Time{}, err } if hours > 23 { - return time.Time{}, newDecodeError(b[:1], "invalid timezone offset hours") + return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset hours") } minutes, err := parseDecimalDigits(b[4:6]) @@ -126,7 +128,7 @@ func parseDateTime(b []byte) (time.Time, error) { return time.Time{}, err } if minutes > 59 { - return time.Time{}, newDecodeError(b[:1], "invalid timezone offset minutes") + return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset minutes") } seconds := direction * (hours*3600 + minutes*60) @@ -139,7 +141,7 @@ func parseDateTime(b []byte) (time.Time, error) { } if len(b) > 0 { - return time.Time{}, newDecodeError(b, "extra bytes at the end of the timezone") + return time.Time{}, unstable.NewParserError(b, "extra bytes at the end of the timezone") } t := time.Date( @@ -160,7 +162,7 @@ func parseLocalDateTime(b []byte) (LocalDateTime, []byte, error) { const localDateTimeByteMinLen = 11 if len(b) < localDateTimeByteMinLen { - return dt, nil, newDecodeError(b, "local datetimes are expected to have the format YYYY-MM-DDTHH:MM:SS[.NNNNNNNNN]") + return dt, nil, unstable.NewParserError(b, "local datetimes are expected to have the format YYYY-MM-DDTHH:MM:SS[.NNNNNNNNN]") } date, err := parseLocalDate(b[:10]) @@ -171,7 +173,7 @@ func parseLocalDateTime(b []byte) (LocalDateTime, []byte, error) { sep := b[10] if sep != 'T' && sep != ' ' && sep != 't' { - return dt, nil, newDecodeError(b[10:11], "datetime separator is expected to be T or a space") + return dt, nil, unstable.NewParserError(b[10:11], "datetime separator is expected to be T or a space") } t, rest, err := parseLocalTime(b[11:]) @@ -195,7 +197,7 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) { // check if b matches to have expected format HH:MM:SS[.NNNNNN] const localTimeByteLen = 8 if len(b) < localTimeByteLen { - return t, nil, newDecodeError(b, "times are expected to have the format HH:MM:SS[.NNNNNN]") + return t, nil, unstable.NewParserError(b, "times are expected to have the format HH:MM:SS[.NNNNNN]") } var err error @@ -206,10 +208,10 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) { } if t.Hour > 23 { - return t, nil, newDecodeError(b[0:2], "hour cannot be greater 23") + return t, nil, unstable.NewParserError(b[0:2], "hour cannot be greater 23") } if b[2] != ':' { - return t, nil, newDecodeError(b[2:3], "expecting colon between hours and minutes") + return t, nil, unstable.NewParserError(b[2:3], "expecting colon between hours and minutes") } t.Minute, err = parseDecimalDigits(b[3:5]) @@ -217,10 +219,10 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) { return t, nil, err } if t.Minute > 59 { - return t, nil, newDecodeError(b[3:5], "minutes cannot be greater 59") + return t, nil, unstable.NewParserError(b[3:5], "minutes cannot be greater 59") } if b[5] != ':' { - return t, nil, newDecodeError(b[5:6], "expecting colon between minutes and seconds") + return t, nil, unstable.NewParserError(b[5:6], "expecting colon between minutes and seconds") } t.Second, err = parseDecimalDigits(b[6:8]) @@ -229,7 +231,7 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) { } if t.Second > 60 { - return t, nil, newDecodeError(b[6:8], "seconds cannot be greater 60") + return t, nil, unstable.NewParserError(b[6:8], "seconds cannot be greater 60") } b = b[8:] @@ -242,7 +244,7 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) { for i, c := range b[1:] { if !isDigit(c) { if i == 0 { - return t, nil, newDecodeError(b[0:1], "need at least one digit after fraction point") + return t, nil, unstable.NewParserError(b[0:1], "need at least one digit after fraction point") } break } @@ -266,7 +268,7 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) { } if precision == 0 { - return t, nil, newDecodeError(b[:1], "nanoseconds need at least one digit") + return t, nil, unstable.NewParserError(b[:1], "nanoseconds need at least one digit") } t.Nanosecond = frac * nspow[precision] @@ -289,24 +291,24 @@ func parseFloat(b []byte) (float64, error) { } if cleaned[0] == '.' { - return 0, newDecodeError(b, "float cannot start with a dot") + return 0, unstable.NewParserError(b, "float cannot start with a dot") } if cleaned[len(cleaned)-1] == '.' { - return 0, newDecodeError(b, "float cannot end with a dot") + return 0, unstable.NewParserError(b, "float cannot end with a dot") } dotAlreadySeen := false for i, c := range cleaned { if c == '.' { if dotAlreadySeen { - return 0, newDecodeError(b[i:i+1], "float can have at most one decimal point") + return 0, unstable.NewParserError(b[i:i+1], "float can have at most one decimal point") } if !isDigit(cleaned[i-1]) { - return 0, newDecodeError(b[i-1:i+1], "float decimal point must be preceded by a digit") + return 0, unstable.NewParserError(b[i-1:i+1], "float decimal point must be preceded by a digit") } if !isDigit(cleaned[i+1]) { - return 0, newDecodeError(b[i:i+2], "float decimal point must be followed by a digit") + return 0, unstable.NewParserError(b[i:i+2], "float decimal point must be followed by a digit") } dotAlreadySeen = true } @@ -317,12 +319,12 @@ func parseFloat(b []byte) (float64, error) { start = 1 } if cleaned[start] == '0' && isDigit(cleaned[start+1]) { - return 0, newDecodeError(b, "float integer part cannot have leading zeroes") + return 0, unstable.NewParserError(b, "float integer part cannot have leading zeroes") } f, err := strconv.ParseFloat(string(cleaned), 64) if err != nil { - return 0, newDecodeError(b, "unable to parse float: %w", err) + return 0, unstable.NewParserError(b, "unable to parse float: %w", err) } return f, nil @@ -336,7 +338,7 @@ func parseIntHex(b []byte) (int64, error) { i, err := strconv.ParseInt(string(cleaned), 16, 64) if err != nil { - return 0, newDecodeError(b, "couldn't parse hexadecimal number: %w", err) + return 0, unstable.NewParserError(b, "couldn't parse hexadecimal number: %w", err) } return i, nil @@ -350,7 +352,7 @@ func parseIntOct(b []byte) (int64, error) { i, err := strconv.ParseInt(string(cleaned), 8, 64) if err != nil { - return 0, newDecodeError(b, "couldn't parse octal number: %w", err) + return 0, unstable.NewParserError(b, "couldn't parse octal number: %w", err) } return i, nil @@ -364,7 +366,7 @@ func parseIntBin(b []byte) (int64, error) { i, err := strconv.ParseInt(string(cleaned), 2, 64) if err != nil { - return 0, newDecodeError(b, "couldn't parse binary number: %w", err) + return 0, unstable.NewParserError(b, "couldn't parse binary number: %w", err) } return i, nil @@ -387,12 +389,12 @@ func parseIntDec(b []byte) (int64, error) { } if len(cleaned) > startIdx+1 && cleaned[startIdx] == '0' { - return 0, newDecodeError(b, "leading zero not allowed on decimal number") + return 0, unstable.NewParserError(b, "leading zero not allowed on decimal number") } i, err := strconv.ParseInt(string(cleaned), 10, 64) if err != nil { - return 0, newDecodeError(b, "couldn't parse decimal number: %w", err) + return 0, unstable.NewParserError(b, "couldn't parse decimal number: %w", err) } return i, nil @@ -409,11 +411,11 @@ func checkAndRemoveUnderscoresIntegers(b []byte) ([]byte, error) { } if b[start] == '_' { - return nil, newDecodeError(b[start:start+1], "number cannot start with underscore") + return nil, unstable.NewParserError(b[start:start+1], "number cannot start with underscore") } if b[len(b)-1] == '_' { - return nil, newDecodeError(b[len(b)-1:], "number cannot end with underscore") + return nil, unstable.NewParserError(b[len(b)-1:], "number cannot end with underscore") } // fast path @@ -435,7 +437,7 @@ func checkAndRemoveUnderscoresIntegers(b []byte) ([]byte, error) { c := b[i] if c == '_' { if !before { - return nil, newDecodeError(b[i-1:i+1], "number must have at least one digit between underscores") + return nil, unstable.NewParserError(b[i-1:i+1], "number must have at least one digit between underscores") } before = false } else { @@ -449,11 +451,11 @@ func checkAndRemoveUnderscoresIntegers(b []byte) ([]byte, error) { func checkAndRemoveUnderscoresFloats(b []byte) ([]byte, error) { if b[0] == '_' { - return nil, newDecodeError(b[0:1], "number cannot start with underscore") + return nil, unstable.NewParserError(b[0:1], "number cannot start with underscore") } if b[len(b)-1] == '_' { - return nil, newDecodeError(b[len(b)-1:], "number cannot end with underscore") + return nil, unstable.NewParserError(b[len(b)-1:], "number cannot end with underscore") } // fast path @@ -476,10 +478,10 @@ func checkAndRemoveUnderscoresFloats(b []byte) ([]byte, error) { switch c { case '_': if !before { - return nil, newDecodeError(b[i-1:i+1], "number must have at least one digit between underscores") + return nil, unstable.NewParserError(b[i-1:i+1], "number must have at least one digit between underscores") } if i < len(b)-1 && (b[i+1] == 'e' || b[i+1] == 'E') { - return nil, newDecodeError(b[i+1:i+2], "cannot have underscore before exponent") + return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore before exponent") } before = false case '+', '-': @@ -488,15 +490,15 @@ func checkAndRemoveUnderscoresFloats(b []byte) ([]byte, error) { before = false case 'e', 'E': if i < len(b)-1 && b[i+1] == '_' { - return nil, newDecodeError(b[i+1:i+2], "cannot have underscore after exponent") + return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore after exponent") } cleaned = append(cleaned, c) case '.': if i < len(b)-1 && b[i+1] == '_' { - return nil, newDecodeError(b[i+1:i+2], "cannot have underscore after decimal point") + return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore after decimal point") } if i > 0 && b[i-1] == '_' { - return nil, newDecodeError(b[i-1:i], "cannot have underscore before decimal point") + return nil, unstable.NewParserError(b[i-1:i], "cannot have underscore before decimal point") } cleaned = append(cleaned, c) default: @@ -542,3 +544,7 @@ func daysIn(m int, year int) int { func isLeap(year int) bool { return year%4 == 0 && (year%100 != 0 || year%400 == 0) } + +func isDigit(r byte) bool { + return r >= '0' && r <= '9' +} diff --git a/vendor/github.com/pelletier/go-toml/v2/errors.go b/vendor/github.com/pelletier/go-toml/v2/errors.go index 5e6635c3..309733f1 100644 --- a/vendor/github.com/pelletier/go-toml/v2/errors.go +++ b/vendor/github.com/pelletier/go-toml/v2/errors.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/pelletier/go-toml/v2/internal/danger" + "github.com/pelletier/go-toml/v2/unstable" ) // DecodeError represents an error encountered during the parsing or decoding @@ -55,25 +56,6 @@ func (s *StrictMissingError) String() string { type Key []string -// internal version of DecodeError that is used as the base to create a -// DecodeError with full context. -type decodeError struct { - highlight []byte - message string - key Key // optional -} - -func (de *decodeError) Error() string { - return de.message -} - -func newDecodeError(highlight []byte, format string, args ...interface{}) error { - return &decodeError{ - highlight: highlight, - message: fmt.Errorf(format, args...).Error(), - } -} - // Error returns the error message contained in the DecodeError. func (e *DecodeError) Error() string { return "toml: " + e.message @@ -103,13 +85,14 @@ func (e *DecodeError) Key() Key { // // The function copies all bytes used in DecodeError, so that document and // highlight can be freely deallocated. +// //nolint:funlen -func wrapDecodeError(document []byte, de *decodeError) *DecodeError { - offset := danger.SubsliceOffset(document, de.highlight) +func wrapDecodeError(document []byte, de *unstable.ParserError) *DecodeError { + offset := danger.SubsliceOffset(document, de.Highlight) errMessage := de.Error() errLine, errColumn := positionAtEnd(document[:offset]) - before, after := linesOfContext(document, de.highlight, offset, 3) + before, after := linesOfContext(document, de.Highlight, offset, 3) var buf strings.Builder @@ -139,7 +122,7 @@ func wrapDecodeError(document []byte, de *decodeError) *DecodeError { buf.Write(before[0]) } - buf.Write(de.highlight) + buf.Write(de.Highlight) if len(after) > 0 { buf.Write(after[0]) @@ -157,7 +140,7 @@ func wrapDecodeError(document []byte, de *decodeError) *DecodeError { buf.WriteString(strings.Repeat(" ", len(before[0]))) } - buf.WriteString(strings.Repeat("~", len(de.highlight))) + buf.WriteString(strings.Repeat("~", len(de.Highlight))) if len(errMessage) > 0 { buf.WriteString(" ") @@ -182,7 +165,7 @@ func wrapDecodeError(document []byte, de *decodeError) *DecodeError { message: errMessage, line: errLine, column: errColumn, - key: de.key, + key: de.Key, human: buf.String(), } } diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/ast/builder.go b/vendor/github.com/pelletier/go-toml/v2/internal/ast/builder.go deleted file mode 100644 index 120f16e5..00000000 --- a/vendor/github.com/pelletier/go-toml/v2/internal/ast/builder.go +++ /dev/null @@ -1,51 +0,0 @@ -package ast - -type Reference int - -const InvalidReference Reference = -1 - -func (r Reference) Valid() bool { - return r != InvalidReference -} - -type Builder struct { - tree Root - lastIdx int -} - -func (b *Builder) Tree() *Root { - return &b.tree -} - -func (b *Builder) NodeAt(ref Reference) *Node { - return b.tree.at(ref) -} - -func (b *Builder) Reset() { - b.tree.nodes = b.tree.nodes[:0] - b.lastIdx = 0 -} - -func (b *Builder) Push(n Node) Reference { - b.lastIdx = len(b.tree.nodes) - b.tree.nodes = append(b.tree.nodes, n) - return Reference(b.lastIdx) -} - -func (b *Builder) PushAndChain(n Node) Reference { - newIdx := len(b.tree.nodes) - b.tree.nodes = append(b.tree.nodes, n) - if b.lastIdx >= 0 { - b.tree.nodes[b.lastIdx].next = newIdx - b.lastIdx - } - b.lastIdx = newIdx - return Reference(b.lastIdx) -} - -func (b *Builder) AttachChild(parent Reference, child Reference) { - b.tree.nodes[parent].child = int(child) - int(parent) -} - -func (b *Builder) Chain(from Reference, to Reference) { - b.tree.nodes[from].next = int(to) - int(from) -} diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go b/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go new file mode 100644 index 00000000..80f698db --- /dev/null +++ b/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go @@ -0,0 +1,42 @@ +package characters + +var invalidAsciiTable = [256]bool{ + 0x00: true, + 0x01: true, + 0x02: true, + 0x03: true, + 0x04: true, + 0x05: true, + 0x06: true, + 0x07: true, + 0x08: true, + // 0x09 TAB + // 0x0A LF + 0x0B: true, + 0x0C: true, + // 0x0D CR + 0x0E: true, + 0x0F: true, + 0x10: true, + 0x11: true, + 0x12: true, + 0x13: true, + 0x14: true, + 0x15: true, + 0x16: true, + 0x17: true, + 0x18: true, + 0x19: true, + 0x1A: true, + 0x1B: true, + 0x1C: true, + 0x1D: true, + 0x1E: true, + 0x1F: true, + // 0x20 - 0x7E Printable ASCII characters + 0x7F: true, +} + +func InvalidAscii(b byte) bool { + return invalidAsciiTable[b] +} diff --git a/vendor/github.com/pelletier/go-toml/v2/utf8.go b/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go similarity index 87% rename from vendor/github.com/pelletier/go-toml/v2/utf8.go rename to vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go index d47a4f20..db4f45ac 100644 --- a/vendor/github.com/pelletier/go-toml/v2/utf8.go +++ b/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go @@ -1,4 +1,4 @@ -package toml +package characters import ( "unicode/utf8" @@ -32,7 +32,7 @@ func (u utf8Err) Zero() bool { // 0x9 => tab, ok // 0xA - 0x1F => invalid // 0x7F => invalid -func utf8TomlValidAlreadyEscaped(p []byte) (err utf8Err) { +func Utf8TomlValidAlreadyEscaped(p []byte) (err utf8Err) { // Fast path. Check for and skip 8 bytes of ASCII characters per iteration. offset := 0 for len(p) >= 8 { @@ -48,7 +48,7 @@ func utf8TomlValidAlreadyEscaped(p []byte) (err utf8Err) { } for i, b := range p[:8] { - if invalidAscii(b) { + if InvalidAscii(b) { err.Index = offset + i err.Size = 1 return @@ -62,7 +62,7 @@ func utf8TomlValidAlreadyEscaped(p []byte) (err utf8Err) { for i := 0; i < n; { pi := p[i] if pi < utf8.RuneSelf { - if invalidAscii(pi) { + if InvalidAscii(pi) { err.Index = offset + i err.Size = 1 return @@ -106,11 +106,11 @@ func utf8TomlValidAlreadyEscaped(p []byte) (err utf8Err) { } // Return the size of the next rune if valid, 0 otherwise. -func utf8ValidNext(p []byte) int { +func Utf8ValidNext(p []byte) int { c := p[0] if c < utf8.RuneSelf { - if invalidAscii(c) { + if InvalidAscii(c) { return 0 } return 1 @@ -140,47 +140,6 @@ func utf8ValidNext(p []byte) int { return size } -var invalidAsciiTable = [256]bool{ - 0x00: true, - 0x01: true, - 0x02: true, - 0x03: true, - 0x04: true, - 0x05: true, - 0x06: true, - 0x07: true, - 0x08: true, - // 0x09 TAB - // 0x0A LF - 0x0B: true, - 0x0C: true, - // 0x0D CR - 0x0E: true, - 0x0F: true, - 0x10: true, - 0x11: true, - 0x12: true, - 0x13: true, - 0x14: true, - 0x15: true, - 0x16: true, - 0x17: true, - 0x18: true, - 0x19: true, - 0x1A: true, - 0x1B: true, - 0x1C: true, - 0x1D: true, - 0x1E: true, - 0x1F: true, - // 0x20 - 0x7E Printable ASCII characters - 0x7F: true, -} - -func invalidAscii(b byte) bool { - return invalidAsciiTable[b] -} - // acceptRange gives the range of valid values for the second byte in a UTF-8 // sequence. type acceptRange struct { diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go index 7c148f48..149b17f5 100644 --- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go +++ b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go @@ -1,8 +1,6 @@ package tracker -import ( - "github.com/pelletier/go-toml/v2/internal/ast" -) +import "github.com/pelletier/go-toml/v2/unstable" // KeyTracker is a tracker that keeps track of the current Key as the AST is // walked. @@ -11,19 +9,19 @@ type KeyTracker struct { } // UpdateTable sets the state of the tracker with the AST table node. -func (t *KeyTracker) UpdateTable(node *ast.Node) { +func (t *KeyTracker) UpdateTable(node *unstable.Node) { t.reset() t.Push(node) } // UpdateArrayTable sets the state of the tracker with the AST array table node. -func (t *KeyTracker) UpdateArrayTable(node *ast.Node) { +func (t *KeyTracker) UpdateArrayTable(node *unstable.Node) { t.reset() t.Push(node) } // Push the given key on the stack. -func (t *KeyTracker) Push(node *ast.Node) { +func (t *KeyTracker) Push(node *unstable.Node) { it := node.Key() for it.Next() { t.k = append(t.k, string(it.Node().Data)) @@ -31,7 +29,7 @@ func (t *KeyTracker) Push(node *ast.Node) { } // Pop key from stack. -func (t *KeyTracker) Pop(node *ast.Node) { +func (t *KeyTracker) Pop(node *unstable.Node) { it := node.Key() for it.Next() { t.k = t.k[:len(t.k)-1] diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go index a7ee05ba..40e23f83 100644 --- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go +++ b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - "github.com/pelletier/go-toml/v2/internal/ast" + "github.com/pelletier/go-toml/v2/unstable" ) type keyKind uint8 @@ -150,23 +150,23 @@ func (s *SeenTracker) setExplicitFlag(parentIdx int) { // CheckExpression takes a top-level node and checks that it does not contain // keys that have been seen in previous calls, and validates that types are // consistent. -func (s *SeenTracker) CheckExpression(node *ast.Node) error { +func (s *SeenTracker) CheckExpression(node *unstable.Node) error { if s.entries == nil { s.reset() } switch node.Kind { - case ast.KeyValue: + case unstable.KeyValue: return s.checkKeyValue(node) - case ast.Table: + case unstable.Table: return s.checkTable(node) - case ast.ArrayTable: + case unstable.ArrayTable: return s.checkArrayTable(node) default: panic(fmt.Errorf("this should not be a top level node type: %s", node.Kind)) } } -func (s *SeenTracker) checkTable(node *ast.Node) error { +func (s *SeenTracker) checkTable(node *unstable.Node) error { if s.currentIdx >= 0 { s.setExplicitFlag(s.currentIdx) } @@ -219,7 +219,7 @@ func (s *SeenTracker) checkTable(node *ast.Node) error { return nil } -func (s *SeenTracker) checkArrayTable(node *ast.Node) error { +func (s *SeenTracker) checkArrayTable(node *unstable.Node) error { if s.currentIdx >= 0 { s.setExplicitFlag(s.currentIdx) } @@ -267,7 +267,7 @@ func (s *SeenTracker) checkArrayTable(node *ast.Node) error { return nil } -func (s *SeenTracker) checkKeyValue(node *ast.Node) error { +func (s *SeenTracker) checkKeyValue(node *unstable.Node) error { parentIdx := s.currentIdx it := node.Key() @@ -297,26 +297,26 @@ func (s *SeenTracker) checkKeyValue(node *ast.Node) error { value := node.Value() switch value.Kind { - case ast.InlineTable: + case unstable.InlineTable: return s.checkInlineTable(value) - case ast.Array: + case unstable.Array: return s.checkArray(value) } return nil } -func (s *SeenTracker) checkArray(node *ast.Node) error { +func (s *SeenTracker) checkArray(node *unstable.Node) error { it := node.Children() for it.Next() { n := it.Node() switch n.Kind { - case ast.InlineTable: + case unstable.InlineTable: err := s.checkInlineTable(n) if err != nil { return err } - case ast.Array: + case unstable.Array: err := s.checkArray(n) if err != nil { return err @@ -326,7 +326,7 @@ func (s *SeenTracker) checkArray(node *ast.Node) error { return nil } -func (s *SeenTracker) checkInlineTable(node *ast.Node) error { +func (s *SeenTracker) checkInlineTable(node *unstable.Node) error { if pool.New == nil { pool.New = func() interface{} { return &SeenTracker{} diff --git a/vendor/github.com/pelletier/go-toml/v2/localtime.go b/vendor/github.com/pelletier/go-toml/v2/localtime.go index 30a31dcb..a856bfdb 100644 --- a/vendor/github.com/pelletier/go-toml/v2/localtime.go +++ b/vendor/github.com/pelletier/go-toml/v2/localtime.go @@ -4,6 +4,8 @@ import ( "fmt" "strings" "time" + + "github.com/pelletier/go-toml/v2/unstable" ) // LocalDate represents a calendar day in no specific timezone. @@ -75,7 +77,7 @@ func (d LocalTime) MarshalText() ([]byte, error) { func (d *LocalTime) UnmarshalText(b []byte) error { res, left, err := parseLocalTime(b) if err == nil && len(left) != 0 { - err = newDecodeError(left, "extra characters") + err = unstable.NewParserError(left, "extra characters") } if err != nil { return err @@ -109,7 +111,7 @@ func (d LocalDateTime) MarshalText() ([]byte, error) { func (d *LocalDateTime) UnmarshalText(data []byte) error { res, left, err := parseLocalDateTime(data) if err == nil && len(left) != 0 { - err = newDecodeError(left, "extra characters") + err = unstable.NewParserError(left, "extra characters") } if err != nil { return err diff --git a/vendor/github.com/pelletier/go-toml/v2/marshaler.go b/vendor/github.com/pelletier/go-toml/v2/marshaler.go index c14c1cea..07aceb90 100644 --- a/vendor/github.com/pelletier/go-toml/v2/marshaler.go +++ b/vendor/github.com/pelletier/go-toml/v2/marshaler.go @@ -12,6 +12,8 @@ import ( "strings" "time" "unicode" + + "github.com/pelletier/go-toml/v2/internal/characters" ) // Marshal serializes a Go value as a TOML document. @@ -54,7 +56,7 @@ func NewEncoder(w io.Writer) *Encoder { // This behavior can be controlled on an individual struct field basis with the // inline tag: // -// MyField `inline:"true"` +// MyField `toml:",inline"` func (enc *Encoder) SetTablesInline(inline bool) *Encoder { enc.tablesInline = inline return enc @@ -65,7 +67,7 @@ func (enc *Encoder) SetTablesInline(inline bool) *Encoder { // // This behavior can be controlled on an individual struct field basis with the multiline tag: // -// MyField `multiline:"true"` +// MyField `multiline:"true"` func (enc *Encoder) SetArraysMultiline(multiline bool) *Encoder { enc.arraysMultiline = multiline return enc @@ -89,7 +91,7 @@ func (enc *Encoder) SetIndentTables(indent bool) *Encoder { // // If v cannot be represented to TOML it returns an error. // -// Encoding rules +// # Encoding rules // // A top level slice containing only maps or structs is encoded as [[table // array]]. @@ -107,10 +109,30 @@ func (enc *Encoder) SetIndentTables(indent bool) *Encoder { // a newline character or a single quote. In that case they are emitted as // quoted strings. // +// Unsigned integers larger than math.MaxInt64 cannot be encoded. Doing so +// results in an error. This rule exists because the TOML specification only +// requires parsers to support at least the 64 bits integer range. Allowing +// larger numbers would create non-standard TOML documents, which may not be +// readable (at best) by other implementations. To encode such numbers, a +// solution is a custom type that implements encoding.TextMarshaler. +// // When encoding structs, fields are encoded in order of definition, with their // exact name. // -// Struct tags +// Tables and array tables are separated by empty lines. However, consecutive +// subtables definitions are not. For example: +// +// [top1] +// +// [top2] +// [top2.child1] +// +// [[array]] +// +// [[array]] +// [array.child2] +// +// # Struct tags // // The encoding of each public struct field can be customized by the format // string in the "toml" key of the struct field's tag. This follows @@ -303,7 +325,11 @@ func (enc *Encoder) encode(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, e b = append(b, "false"...) } case reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uint: - b = strconv.AppendUint(b, v.Uint(), 10) + x := v.Uint() + if x > uint64(math.MaxInt64) { + return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, int64(math.MaxInt64)) + } + b = strconv.AppendUint(b, x, 10) case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int: b = strconv.AppendInt(b, v.Int(), 10) default: @@ -322,13 +348,13 @@ func isNil(v reflect.Value) bool { } } +func shouldOmitEmpty(options valueOptions, v reflect.Value) bool { + return options.omitempty && isEmptyValue(v) +} + func (enc *Encoder) encodeKv(b []byte, ctx encoderCtx, options valueOptions, v reflect.Value) ([]byte, error) { var err error - if (ctx.options.omitempty || options.omitempty) && isEmptyValue(v) { - return b, nil - } - if !ctx.inline { b = enc.encodeComment(ctx.indent, options.comment, b) } @@ -354,6 +380,8 @@ func (enc *Encoder) encodeKv(b []byte, ctx encoderCtx, options valueOptions, v r func isEmptyValue(v reflect.Value) bool { switch v.Kind() { + case reflect.Struct: + return isEmptyStruct(v) case reflect.Array, reflect.Map, reflect.Slice, reflect.String: return v.Len() == 0 case reflect.Bool: @@ -370,6 +398,34 @@ func isEmptyValue(v reflect.Value) bool { return false } +func isEmptyStruct(v reflect.Value) bool { + // TODO: merge with walkStruct and cache. + typ := v.Type() + for i := 0; i < typ.NumField(); i++ { + fieldType := typ.Field(i) + + // only consider exported fields + if fieldType.PkgPath != "" { + continue + } + + tag := fieldType.Tag.Get("toml") + + // special field name to skip field + if tag == "-" { + continue + } + + f := v.Field(i) + + if !isEmptyValue(f) { + return false + } + } + + return true +} + const literalQuote = '\'' func (enc *Encoder) encodeString(b []byte, v string, options valueOptions) []byte { @@ -383,7 +439,7 @@ func (enc *Encoder) encodeString(b []byte, v string, options valueOptions) []byt func needsQuoting(v string) bool { // TODO: vectorize for _, b := range []byte(v) { - if b == '\'' || b == '\r' || b == '\n' || invalidAscii(b) { + if b == '\'' || b == '\r' || b == '\n' || characters.InvalidAscii(b) { return true } } @@ -399,7 +455,6 @@ func (enc *Encoder) encodeLiteralString(b []byte, v string) []byte { return b } -//nolint:cyclop func (enc *Encoder) encodeQuotedString(multiline bool, b []byte, v string) []byte { stringQuote := `"` @@ -746,7 +801,13 @@ func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, erro } ctx.skipTableHeader = false + hasNonEmptyKV := false for _, kv := range t.kvs { + if shouldOmitEmpty(kv.Options, kv.Value) { + continue + } + hasNonEmptyKV = true + ctx.setKey(kv.Key) b, err = enc.encodeKv(b, ctx, kv.Options, kv.Value) @@ -757,7 +818,20 @@ func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, erro b = append(b, '\n') } + first := true for _, table := range t.tables { + if shouldOmitEmpty(table.Options, table.Value) { + continue + } + if first { + first = false + if hasNonEmptyKV { + b = append(b, '\n') + } + } else { + b = append(b, "\n"...) + } + ctx.setKey(table.Key) ctx.options = table.Options @@ -766,8 +840,6 @@ func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, erro if err != nil { return nil, err } - - b = append(b, '\n') } return b, nil @@ -780,6 +852,10 @@ func (enc *Encoder) encodeTableInline(b []byte, ctx encoderCtx, t table) ([]byte first := true for _, kv := range t.kvs { + if shouldOmitEmpty(kv.Options, kv.Value) { + continue + } + if first { first = false } else { @@ -795,7 +871,7 @@ func (enc *Encoder) encodeTableInline(b []byte, ctx encoderCtx, t table) ([]byte } if len(t.tables) > 0 { - panic("inline table cannot contain nested tables, online key-values") + panic("inline table cannot contain nested tables, only key-values") } b = append(b, "}"...) @@ -894,6 +970,10 @@ func (enc *Encoder) encodeSliceAsArrayTable(b []byte, ctx encoderCtx, v reflect. b = enc.encodeComment(ctx.indent, ctx.options.comment, b) for i := 0; i < v.Len(); i++ { + if i != 0 { + b = append(b, "\n"...) + } + b = append(b, scratch...) var err error diff --git a/vendor/github.com/pelletier/go-toml/v2/strict.go b/vendor/github.com/pelletier/go-toml/v2/strict.go index b7830d13..802e7e4d 100644 --- a/vendor/github.com/pelletier/go-toml/v2/strict.go +++ b/vendor/github.com/pelletier/go-toml/v2/strict.go @@ -1,9 +1,9 @@ package toml import ( - "github.com/pelletier/go-toml/v2/internal/ast" "github.com/pelletier/go-toml/v2/internal/danger" "github.com/pelletier/go-toml/v2/internal/tracker" + "github.com/pelletier/go-toml/v2/unstable" ) type strict struct { @@ -12,10 +12,10 @@ type strict struct { // Tracks the current key being processed. key tracker.KeyTracker - missing []decodeError + missing []unstable.ParserError } -func (s *strict) EnterTable(node *ast.Node) { +func (s *strict) EnterTable(node *unstable.Node) { if !s.Enabled { return } @@ -23,7 +23,7 @@ func (s *strict) EnterTable(node *ast.Node) { s.key.UpdateTable(node) } -func (s *strict) EnterArrayTable(node *ast.Node) { +func (s *strict) EnterArrayTable(node *unstable.Node) { if !s.Enabled { return } @@ -31,7 +31,7 @@ func (s *strict) EnterArrayTable(node *ast.Node) { s.key.UpdateArrayTable(node) } -func (s *strict) EnterKeyValue(node *ast.Node) { +func (s *strict) EnterKeyValue(node *unstable.Node) { if !s.Enabled { return } @@ -39,7 +39,7 @@ func (s *strict) EnterKeyValue(node *ast.Node) { s.key.Push(node) } -func (s *strict) ExitKeyValue(node *ast.Node) { +func (s *strict) ExitKeyValue(node *unstable.Node) { if !s.Enabled { return } @@ -47,27 +47,27 @@ func (s *strict) ExitKeyValue(node *ast.Node) { s.key.Pop(node) } -func (s *strict) MissingTable(node *ast.Node) { +func (s *strict) MissingTable(node *unstable.Node) { if !s.Enabled { return } - s.missing = append(s.missing, decodeError{ - highlight: keyLocation(node), - message: "missing table", - key: s.key.Key(), + s.missing = append(s.missing, unstable.ParserError{ + Highlight: keyLocation(node), + Message: "missing table", + Key: s.key.Key(), }) } -func (s *strict) MissingField(node *ast.Node) { +func (s *strict) MissingField(node *unstable.Node) { if !s.Enabled { return } - s.missing = append(s.missing, decodeError{ - highlight: keyLocation(node), - message: "missing field", - key: s.key.Key(), + s.missing = append(s.missing, unstable.ParserError{ + Highlight: keyLocation(node), + Message: "missing field", + Key: s.key.Key(), }) } @@ -88,7 +88,7 @@ func (s *strict) Error(doc []byte) error { return err } -func keyLocation(node *ast.Node) []byte { +func keyLocation(node *unstable.Node) []byte { k := node.Key() hasOne := k.Next() diff --git a/vendor/github.com/pelletier/go-toml/v2/types.go b/vendor/github.com/pelletier/go-toml/v2/types.go index 630a4546..3c6b8fe5 100644 --- a/vendor/github.com/pelletier/go-toml/v2/types.go +++ b/vendor/github.com/pelletier/go-toml/v2/types.go @@ -6,9 +6,9 @@ import ( "time" ) -var timeType = reflect.TypeOf(time.Time{}) -var textMarshalerType = reflect.TypeOf(new(encoding.TextMarshaler)).Elem() -var textUnmarshalerType = reflect.TypeOf(new(encoding.TextUnmarshaler)).Elem() -var mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{}) -var sliceInterfaceType = reflect.TypeOf([]interface{}{}) +var timeType = reflect.TypeOf((*time.Time)(nil)).Elem() +var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() +var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() +var mapStringInterfaceType = reflect.TypeOf(map[string]interface{}(nil)) +var sliceInterfaceType = reflect.TypeOf([]interface{}(nil)) var stringType = reflect.TypeOf("") diff --git a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go index b3596f6d..70f6ec57 100644 --- a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go +++ b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go @@ -12,16 +12,16 @@ import ( "sync/atomic" "time" - "github.com/pelletier/go-toml/v2/internal/ast" "github.com/pelletier/go-toml/v2/internal/danger" "github.com/pelletier/go-toml/v2/internal/tracker" + "github.com/pelletier/go-toml/v2/unstable" ) // Unmarshal deserializes a TOML document into a Go value. // // It is a shortcut for Decoder.Decode() with the default options. func Unmarshal(data []byte, v interface{}) error { - p := parser{} + p := unstable.Parser{} p.Reset(data) d := decoder{p: &p} @@ -79,29 +79,29 @@ func (d *Decoder) DisallowUnknownFields() *Decoder { // strict mode and a field is missing, a `toml.StrictMissingError` is // returned. In any other case, this function returns a standard Go error. // -// Type mapping +// # Type mapping // // List of supported TOML types and their associated accepted Go types: // -// String -> string -// Integer -> uint*, int*, depending on size -// Float -> float*, depending on size -// Boolean -> bool -// Offset Date-Time -> time.Time -// Local Date-time -> LocalDateTime, time.Time -// Local Date -> LocalDate, time.Time -// Local Time -> LocalTime, time.Time -// Array -> slice and array, depending on elements types -// Table -> map and struct -// Inline Table -> same as Table -// Array of Tables -> same as Array and Table +// String -> string +// Integer -> uint*, int*, depending on size +// Float -> float*, depending on size +// Boolean -> bool +// Offset Date-Time -> time.Time +// Local Date-time -> LocalDateTime, time.Time +// Local Date -> LocalDate, time.Time +// Local Time -> LocalTime, time.Time +// Array -> slice and array, depending on elements types +// Table -> map and struct +// Inline Table -> same as Table +// Array of Tables -> same as Array and Table func (d *Decoder) Decode(v interface{}) error { b, err := ioutil.ReadAll(d.r) if err != nil { return fmt.Errorf("toml: %w", err) } - p := parser{} + p := unstable.Parser{} p.Reset(b) dec := decoder{ p: &p, @@ -115,7 +115,7 @@ func (d *Decoder) Decode(v interface{}) error { type decoder struct { // Which parser instance in use for this decoding session. - p *parser + p *unstable.Parser // Flag indicating that the current expression is stashed. // If set to true, calling nextExpr will not actually pull a new expression @@ -123,7 +123,7 @@ type decoder struct { stashedExpr bool // Skip expressions until a table is found. This is set to true when a - // table could not be create (missing field in map), so all KV expressions + // table could not be created (missing field in map), so all KV expressions // need to be skipped. skipUntilTable bool @@ -157,7 +157,7 @@ func (d *decoder) typeMismatchError(toml string, target reflect.Type) error { return fmt.Errorf("toml: cannot decode TOML %s into a Go value of type %s", toml, target) } -func (d *decoder) expr() *ast.Node { +func (d *decoder) expr() *unstable.Node { return d.p.Expression() } @@ -208,12 +208,12 @@ func (d *decoder) FromParser(v interface{}) error { err := d.fromParser(r) if err == nil { - return d.strict.Error(d.p.data) + return d.strict.Error(d.p.Data()) } - var e *decodeError + var e *unstable.ParserError if errors.As(err, &e) { - return wrapDecodeError(d.p.data, e) + return wrapDecodeError(d.p.Data(), e) } return err @@ -234,16 +234,16 @@ func (d *decoder) fromParser(root reflect.Value) error { Rules for the unmarshal code: - The stack is used to keep track of which values need to be set where. -- handle* functions <=> switch on a given ast.Kind. +- handle* functions <=> switch on a given unstable.Kind. - unmarshalX* functions need to unmarshal a node of kind X. - An "object" is either a struct or a map. */ -func (d *decoder) handleRootExpression(expr *ast.Node, v reflect.Value) error { +func (d *decoder) handleRootExpression(expr *unstable.Node, v reflect.Value) error { var x reflect.Value var err error - if !(d.skipUntilTable && expr.Kind == ast.KeyValue) { + if !(d.skipUntilTable && expr.Kind == unstable.KeyValue) { err = d.seen.CheckExpression(expr) if err != nil { return err @@ -251,16 +251,16 @@ func (d *decoder) handleRootExpression(expr *ast.Node, v reflect.Value) error { } switch expr.Kind { - case ast.KeyValue: + case unstable.KeyValue: if d.skipUntilTable { return nil } x, err = d.handleKeyValue(expr, v) - case ast.Table: + case unstable.Table: d.skipUntilTable = false d.strict.EnterTable(expr) x, err = d.handleTable(expr.Key(), v) - case ast.ArrayTable: + case unstable.ArrayTable: d.skipUntilTable = false d.strict.EnterArrayTable(expr) x, err = d.handleArrayTable(expr.Key(), v) @@ -269,7 +269,7 @@ func (d *decoder) handleRootExpression(expr *ast.Node, v reflect.Value) error { } if d.skipUntilTable { - if expr.Kind == ast.Table || expr.Kind == ast.ArrayTable { + if expr.Kind == unstable.Table || expr.Kind == unstable.ArrayTable { d.strict.MissingTable(expr) } } else if err == nil && x.IsValid() { @@ -279,14 +279,14 @@ func (d *decoder) handleRootExpression(expr *ast.Node, v reflect.Value) error { return err } -func (d *decoder) handleArrayTable(key ast.Iterator, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleArrayTable(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { if key.Next() { return d.handleArrayTablePart(key, v) } return d.handleKeyValues(v) } -func (d *decoder) handleArrayTableCollectionLast(key ast.Iterator, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleArrayTableCollectionLast(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { switch v.Kind() { case reflect.Interface: elem := v.Elem() @@ -339,21 +339,21 @@ func (d *decoder) handleArrayTableCollectionLast(key ast.Iterator, v reflect.Val case reflect.Array: idx := d.arrayIndex(true, v) if idx >= v.Len() { - return v, fmt.Errorf("toml: cannot decode array table into %s at position %d", v.Type(), idx) + return v, fmt.Errorf("%s at position %d", d.typeMismatchError("array table", v.Type()), idx) } elem := v.Index(idx) _, err := d.handleArrayTable(key, elem) return v, err + default: + return reflect.Value{}, d.typeMismatchError("array table", v.Type()) } - - return d.handleArrayTable(key, v) } // When parsing an array table expression, each part of the key needs to be // evaluated like a normal key, but if it returns a collection, it also needs to // point to the last element of the collection. Unless it is the last part of // the key, then it needs to create a new element at the end. -func (d *decoder) handleArrayTableCollection(key ast.Iterator, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleArrayTableCollection(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { if key.IsLast() { return d.handleArrayTableCollectionLast(key, v) } @@ -390,7 +390,7 @@ func (d *decoder) handleArrayTableCollection(key ast.Iterator, v reflect.Value) case reflect.Array: idx := d.arrayIndex(false, v) if idx >= v.Len() { - return v, fmt.Errorf("toml: cannot decode array table into %s at position %d", v.Type(), idx) + return v, fmt.Errorf("%s at position %d", d.typeMismatchError("array table", v.Type()), idx) } elem := v.Index(idx) _, err := d.handleArrayTable(key, elem) @@ -400,7 +400,7 @@ func (d *decoder) handleArrayTableCollection(key ast.Iterator, v reflect.Value) return d.handleArrayTable(key, v) } -func (d *decoder) handleKeyPart(key ast.Iterator, v reflect.Value, nextFn handlerFn, makeFn valueMakerFn) (reflect.Value, error) { +func (d *decoder) handleKeyPart(key unstable.Iterator, v reflect.Value, nextFn handlerFn, makeFn valueMakerFn) (reflect.Value, error) { var rv reflect.Value // First, dispatch over v to make sure it is a valid object. @@ -483,7 +483,7 @@ func (d *decoder) handleKeyPart(key ast.Iterator, v reflect.Value, nextFn handle d.errorContext.Struct = t d.errorContext.Field = path - f := v.FieldByIndex(path) + f := fieldByIndex(v, path) x, err := nextFn(key, f) if err != nil || d.skipUntilTable { return reflect.Value{}, err @@ -518,7 +518,7 @@ func (d *decoder) handleKeyPart(key ast.Iterator, v reflect.Value, nextFn handle // HandleArrayTablePart navigates the Go structure v using the key v. It is // only used for the prefix (non-last) parts of an array-table. When // encountering a collection, it should go to the last element. -func (d *decoder) handleArrayTablePart(key ast.Iterator, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleArrayTablePart(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { var makeFn valueMakerFn if key.IsLast() { makeFn = makeSliceInterface @@ -530,10 +530,10 @@ func (d *decoder) handleArrayTablePart(key ast.Iterator, v reflect.Value) (refle // HandleTable returns a reference when it has checked the next expression but // cannot handle it. -func (d *decoder) handleTable(key ast.Iterator, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleTable(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { if v.Kind() == reflect.Slice { if v.Len() == 0 { - return reflect.Value{}, newDecodeError(key.Node().Data, "cannot store a table in a slice") + return reflect.Value{}, unstable.NewParserError(key.Node().Data, "cannot store a table in a slice") } elem := v.Index(v.Len() - 1) x, err := d.handleTable(key, elem) @@ -560,7 +560,7 @@ func (d *decoder) handleKeyValues(v reflect.Value) (reflect.Value, error) { var rv reflect.Value for d.nextExpr() { expr := d.expr() - if expr.Kind != ast.KeyValue { + if expr.Kind != unstable.KeyValue { // Stash the expression so that fromParser can just loop and use // the right handler. // We could just recurse ourselves here, but at least this gives a @@ -587,7 +587,7 @@ func (d *decoder) handleKeyValues(v reflect.Value) (reflect.Value, error) { } type ( - handlerFn func(key ast.Iterator, v reflect.Value) (reflect.Value, error) + handlerFn func(key unstable.Iterator, v reflect.Value) (reflect.Value, error) valueMakerFn func() reflect.Value ) @@ -599,11 +599,11 @@ func makeSliceInterface() reflect.Value { return reflect.MakeSlice(sliceInterfaceType, 0, 16) } -func (d *decoder) handleTablePart(key ast.Iterator, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleTablePart(key unstable.Iterator, v reflect.Value) (reflect.Value, error) { return d.handleKeyPart(key, v, d.handleTable, makeMapStringInterface) } -func (d *decoder) tryTextUnmarshaler(node *ast.Node, v reflect.Value) (bool, error) { +func (d *decoder) tryTextUnmarshaler(node *unstable.Node, v reflect.Value) (bool, error) { // Special case for time, because we allow to unmarshal to it from // different kind of AST nodes. if v.Type() == timeType { @@ -613,7 +613,7 @@ func (d *decoder) tryTextUnmarshaler(node *ast.Node, v reflect.Value) (bool, err if v.CanAddr() && v.Addr().Type().Implements(textUnmarshalerType) { err := v.Addr().Interface().(encoding.TextUnmarshaler).UnmarshalText(node.Data) if err != nil { - return false, newDecodeError(d.p.Raw(node.Raw), "%w", err) + return false, unstable.NewParserError(d.p.Raw(node.Raw), "%w", err) } return true, nil @@ -622,7 +622,7 @@ func (d *decoder) tryTextUnmarshaler(node *ast.Node, v reflect.Value) (bool, err return false, nil } -func (d *decoder) handleValue(value *ast.Node, v reflect.Value) error { +func (d *decoder) handleValue(value *unstable.Node, v reflect.Value) error { for v.Kind() == reflect.Ptr { v = initAndDereferencePointer(v) } @@ -633,32 +633,32 @@ func (d *decoder) handleValue(value *ast.Node, v reflect.Value) error { } switch value.Kind { - case ast.String: + case unstable.String: return d.unmarshalString(value, v) - case ast.Integer: + case unstable.Integer: return d.unmarshalInteger(value, v) - case ast.Float: + case unstable.Float: return d.unmarshalFloat(value, v) - case ast.Bool: + case unstable.Bool: return d.unmarshalBool(value, v) - case ast.DateTime: + case unstable.DateTime: return d.unmarshalDateTime(value, v) - case ast.LocalDate: + case unstable.LocalDate: return d.unmarshalLocalDate(value, v) - case ast.LocalTime: + case unstable.LocalTime: return d.unmarshalLocalTime(value, v) - case ast.LocalDateTime: + case unstable.LocalDateTime: return d.unmarshalLocalDateTime(value, v) - case ast.InlineTable: + case unstable.InlineTable: return d.unmarshalInlineTable(value, v) - case ast.Array: + case unstable.Array: return d.unmarshalArray(value, v) default: panic(fmt.Errorf("handleValue not implemented for %s", value.Kind)) } } -func (d *decoder) unmarshalArray(array *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalArray(array *unstable.Node, v reflect.Value) error { switch v.Kind() { case reflect.Slice: if v.IsNil() { @@ -729,7 +729,7 @@ func (d *decoder) unmarshalArray(array *ast.Node, v reflect.Value) error { return nil } -func (d *decoder) unmarshalInlineTable(itable *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalInlineTable(itable *unstable.Node, v reflect.Value) error { // Make sure v is an initialized object. switch v.Kind() { case reflect.Map: @@ -746,7 +746,7 @@ func (d *decoder) unmarshalInlineTable(itable *ast.Node, v reflect.Value) error } return d.unmarshalInlineTable(itable, elem) default: - return newDecodeError(itable.Data, "cannot store inline table in Go type %s", v.Kind()) + return unstable.NewParserError(itable.Data, "cannot store inline table in Go type %s", v.Kind()) } it := itable.Children() @@ -765,7 +765,7 @@ func (d *decoder) unmarshalInlineTable(itable *ast.Node, v reflect.Value) error return nil } -func (d *decoder) unmarshalDateTime(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalDateTime(value *unstable.Node, v reflect.Value) error { dt, err := parseDateTime(value.Data) if err != nil { return err @@ -775,7 +775,7 @@ func (d *decoder) unmarshalDateTime(value *ast.Node, v reflect.Value) error { return nil } -func (d *decoder) unmarshalLocalDate(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalLocalDate(value *unstable.Node, v reflect.Value) error { ld, err := parseLocalDate(value.Data) if err != nil { return err @@ -792,28 +792,28 @@ func (d *decoder) unmarshalLocalDate(value *ast.Node, v reflect.Value) error { return nil } -func (d *decoder) unmarshalLocalTime(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalLocalTime(value *unstable.Node, v reflect.Value) error { lt, rest, err := parseLocalTime(value.Data) if err != nil { return err } if len(rest) > 0 { - return newDecodeError(rest, "extra characters at the end of a local time") + return unstable.NewParserError(rest, "extra characters at the end of a local time") } v.Set(reflect.ValueOf(lt)) return nil } -func (d *decoder) unmarshalLocalDateTime(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalLocalDateTime(value *unstable.Node, v reflect.Value) error { ldt, rest, err := parseLocalDateTime(value.Data) if err != nil { return err } if len(rest) > 0 { - return newDecodeError(rest, "extra characters at the end of a local date time") + return unstable.NewParserError(rest, "extra characters at the end of a local date time") } if v.Type() == timeType { @@ -828,7 +828,7 @@ func (d *decoder) unmarshalLocalDateTime(value *ast.Node, v reflect.Value) error return nil } -func (d *decoder) unmarshalBool(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalBool(value *unstable.Node, v reflect.Value) error { b := value.Data[0] == 't' switch v.Kind() { @@ -837,13 +837,13 @@ func (d *decoder) unmarshalBool(value *ast.Node, v reflect.Value) error { case reflect.Interface: v.Set(reflect.ValueOf(b)) default: - return newDecodeError(value.Data, "cannot assign boolean to a %t", b) + return unstable.NewParserError(value.Data, "cannot assign boolean to a %t", b) } return nil } -func (d *decoder) unmarshalFloat(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalFloat(value *unstable.Node, v reflect.Value) error { f, err := parseFloat(value.Data) if err != nil { return err @@ -854,13 +854,13 @@ func (d *decoder) unmarshalFloat(value *ast.Node, v reflect.Value) error { v.SetFloat(f) case reflect.Float32: if f > math.MaxFloat32 { - return newDecodeError(value.Data, "number %f does not fit in a float32", f) + return unstable.NewParserError(value.Data, "number %f does not fit in a float32", f) } v.SetFloat(f) case reflect.Interface: v.Set(reflect.ValueOf(f)) default: - return newDecodeError(value.Data, "float cannot be assigned to %s", v.Kind()) + return unstable.NewParserError(value.Data, "float cannot be assigned to %s", v.Kind()) } return nil @@ -886,7 +886,7 @@ func init() { } } -func (d *decoder) unmarshalInteger(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalInteger(value *unstable.Node, v reflect.Value) error { i, err := parseInteger(value.Data) if err != nil { return err @@ -967,20 +967,20 @@ func (d *decoder) unmarshalInteger(value *ast.Node, v reflect.Value) error { return nil } -func (d *decoder) unmarshalString(value *ast.Node, v reflect.Value) error { +func (d *decoder) unmarshalString(value *unstable.Node, v reflect.Value) error { switch v.Kind() { case reflect.String: v.SetString(string(value.Data)) case reflect.Interface: v.Set(reflect.ValueOf(string(value.Data))) default: - return newDecodeError(d.p.Raw(value.Raw), "cannot store TOML string into a Go %s", v.Kind()) + return unstable.NewParserError(d.p.Raw(value.Raw), "cannot store TOML string into a Go %s", v.Kind()) } return nil } -func (d *decoder) handleKeyValue(expr *ast.Node, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleKeyValue(expr *unstable.Node, v reflect.Value) (reflect.Value, error) { d.strict.EnterKeyValue(expr) v, err := d.handleKeyValueInner(expr.Key(), expr.Value(), v) @@ -994,7 +994,7 @@ func (d *decoder) handleKeyValue(expr *ast.Node, v reflect.Value) (reflect.Value return v, err } -func (d *decoder) handleKeyValueInner(key ast.Iterator, value *ast.Node, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleKeyValueInner(key unstable.Iterator, value *unstable.Node, v reflect.Value) (reflect.Value, error) { if key.Next() { // Still scoping the key return d.handleKeyValuePart(key, value, v) @@ -1004,7 +1004,7 @@ func (d *decoder) handleKeyValueInner(key ast.Iterator, value *ast.Node, v refle return reflect.Value{}, d.handleValue(value, v) } -func (d *decoder) handleKeyValuePart(key ast.Iterator, value *ast.Node, v reflect.Value) (reflect.Value, error) { +func (d *decoder) handleKeyValuePart(key unstable.Iterator, value *unstable.Node, v reflect.Value) (reflect.Value, error) { // contains the replacement for v var rv reflect.Value @@ -1071,7 +1071,7 @@ func (d *decoder) handleKeyValuePart(key ast.Iterator, value *ast.Node, v reflec d.errorContext.Struct = t d.errorContext.Field = path - f := v.FieldByIndex(path) + f := fieldByIndex(v, path) x, err := d.handleKeyValueInner(key, value, f) if err != nil { return reflect.Value{}, err @@ -1135,6 +1135,21 @@ func initAndDereferencePointer(v reflect.Value) reflect.Value { return elem } +// Same as reflect.Value.FieldByIndex, but creates pointers if needed. +func fieldByIndex(v reflect.Value, path []int) reflect.Value { + for i, x := range path { + v = v.Field(x) + + if i < len(path)-1 && v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + } + } + return v +} + type fieldPathsMap = map[string][]int var globalFieldPathsCache atomic.Value // map[danger.TypeID]fieldPathsMap @@ -1192,7 +1207,14 @@ func forEachField(t reflect.Type, path []int, do func(name string, path []int)) } if f.Anonymous && name == "" { - forEachField(f.Type, fieldPath, do) + t2 := f.Type + if t2.Kind() == reflect.Ptr { + t2 = t2.Elem() + } + + if t2.Kind() == reflect.Struct { + forEachField(t2, fieldPath, do) + } continue } diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/ast/ast.go b/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go similarity index 59% rename from vendor/github.com/pelletier/go-toml/v2/internal/ast/ast.go rename to vendor/github.com/pelletier/go-toml/v2/unstable/ast.go index 33c7f915..b60d9bfd 100644 --- a/vendor/github.com/pelletier/go-toml/v2/internal/ast/ast.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go @@ -1,4 +1,4 @@ -package ast +package unstable import ( "fmt" @@ -7,14 +7,17 @@ import ( "github.com/pelletier/go-toml/v2/internal/danger" ) -// Iterator starts uninitialized, you need to call Next() first. +// Iterator over a sequence of nodes. +// +// Starts uninitialized, you need to call Next() first. // // For example: // -// it := n.Children() -// for it.Next() { -// it.Node() -// } +// it := n.Children() +// for it.Next() { +// n := it.Node() +// // do something with n +// } type Iterator struct { started bool node *Node @@ -32,42 +35,31 @@ func (c *Iterator) Next() bool { } // IsLast returns true if the current node of the iterator is the last -// one. Subsequent call to Next() will return false. +// one. Subsequent calls to Next() will return false. func (c *Iterator) IsLast() bool { return c.node.next == 0 } -// Node returns a copy of the node pointed at by the iterator. +// Node returns a pointer to the node pointed at by the iterator. func (c *Iterator) Node() *Node { return c.node } -// Root contains a full AST. +// Node in a TOML expression AST. // -// It is immutable once constructed with Builder. -type Root struct { - nodes []Node -} - -// Iterator over the top level nodes. -func (r *Root) Iterator() Iterator { - it := Iterator{} - if len(r.nodes) > 0 { - it.node = &r.nodes[0] - } - return it -} - -func (r *Root) at(idx Reference) *Node { - return &r.nodes[idx] -} - -// Arrays have one child per element in the array. InlineTables have -// one child per key-value pair in the table. KeyValues have at least -// two children. The first one is the value. The rest make a -// potentially dotted key. Table and Array table have one child per -// element of the key they represent (same as KeyValue, but without -// the last node being the value). +// Depending on Kind, its sequence of children should be interpreted +// differently. +// +// - Array have one child per element in the array. +// - InlineTable have one child per key-value in the table (each of kind +// InlineTable). +// - KeyValue have at least two children. The first one is the value. The rest +// make a potentially dotted key. +// - Table and ArrayTable's children represent a dotted key (same as +// KeyValue, but without the first node being the value). +// +// When relevant, Raw describes the range of bytes this node is refering to in +// the input document. Use Parser.Raw() to retrieve the actual bytes. type Node struct { Kind Kind Raw Range // Raw bytes from the input. @@ -80,13 +72,13 @@ type Node struct { child int // 0 if no child } +// Range of bytes in the document. type Range struct { Offset uint32 Length uint32 } -// Next returns a copy of the next node, or an invalid Node if there -// is no next node. +// Next returns a pointer to the next node, or nil if there is no next node. func (n *Node) Next() *Node { if n.next == 0 { return nil @@ -96,9 +88,9 @@ func (n *Node) Next() *Node { return (*Node)(danger.Stride(ptr, size, n.next)) } -// Child returns a copy of the first child node of this node. Other -// children can be accessed calling Next on the first child. Returns -// an invalid Node if there is none. +// Child returns a pointer to the first child node of this node. Other children +// can be accessed calling Next on the first child. Returns an nil if this Node +// has no child. func (n *Node) Child() *Node { if n.child == 0 { return nil @@ -113,9 +105,9 @@ func (n *Node) Valid() bool { return n != nil } -// Key returns the child nodes making the Key on a supported -// node. Panics otherwise. They are guaranteed to be all be of the -// Kind Key. A simple key would return just one element. +// Key returns the children nodes making the Key on a supported node. Panics +// otherwise. They are guaranteed to be all be of the Kind Key. A simple key +// would return just one element. func (n *Node) Key() Iterator { switch n.Kind { case KeyValue: diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go b/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go new file mode 100644 index 00000000..9538e30d --- /dev/null +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go @@ -0,0 +1,71 @@ +package unstable + +// root contains a full AST. +// +// It is immutable once constructed with Builder. +type root struct { + nodes []Node +} + +// Iterator over the top level nodes. +func (r *root) Iterator() Iterator { + it := Iterator{} + if len(r.nodes) > 0 { + it.node = &r.nodes[0] + } + return it +} + +func (r *root) at(idx reference) *Node { + return &r.nodes[idx] +} + +type reference int + +const invalidReference reference = -1 + +func (r reference) Valid() bool { + return r != invalidReference +} + +type builder struct { + tree root + lastIdx int +} + +func (b *builder) Tree() *root { + return &b.tree +} + +func (b *builder) NodeAt(ref reference) *Node { + return b.tree.at(ref) +} + +func (b *builder) Reset() { + b.tree.nodes = b.tree.nodes[:0] + b.lastIdx = 0 +} + +func (b *builder) Push(n Node) reference { + b.lastIdx = len(b.tree.nodes) + b.tree.nodes = append(b.tree.nodes, n) + return reference(b.lastIdx) +} + +func (b *builder) PushAndChain(n Node) reference { + newIdx := len(b.tree.nodes) + b.tree.nodes = append(b.tree.nodes, n) + if b.lastIdx >= 0 { + b.tree.nodes[b.lastIdx].next = newIdx - b.lastIdx + } + b.lastIdx = newIdx + return reference(b.lastIdx) +} + +func (b *builder) AttachChild(parent reference, child reference) { + b.tree.nodes[parent].child = int(child) - int(parent) +} + +func (b *builder) Chain(from reference, to reference) { + b.tree.nodes[from].next = int(to) - int(from) +} diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/doc.go b/vendor/github.com/pelletier/go-toml/v2/unstable/doc.go new file mode 100644 index 00000000..7ff26c53 --- /dev/null +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/doc.go @@ -0,0 +1,3 @@ +// Package unstable provides APIs that do not meet the backward compatibility +// guarantees yet. +package unstable diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/ast/kind.go b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go similarity index 81% rename from vendor/github.com/pelletier/go-toml/v2/internal/ast/kind.go rename to vendor/github.com/pelletier/go-toml/v2/unstable/kind.go index 2b50c67f..ff9df1be 100644 --- a/vendor/github.com/pelletier/go-toml/v2/internal/ast/kind.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go @@ -1,25 +1,26 @@ -package ast +package unstable import "fmt" +// Kind represents the type of TOML structure contained in a given Node. type Kind int const ( - // meta + // Meta Invalid Kind = iota Comment Key - // top level structures + // Top level structures Table ArrayTable KeyValue - // containers values + // Containers values Array InlineTable - // values + // Values String Bool Float @@ -30,6 +31,7 @@ const ( DateTime ) +// String implementation of fmt.Stringer. func (k Kind) String() string { switch k { case Invalid: diff --git a/vendor/github.com/pelletier/go-toml/v2/parser.go b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go similarity index 70% rename from vendor/github.com/pelletier/go-toml/v2/parser.go rename to vendor/github.com/pelletier/go-toml/v2/unstable/parser.go index 9859a795..52db88e7 100644 --- a/vendor/github.com/pelletier/go-toml/v2/parser.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go @@ -1,50 +1,108 @@ -package toml +package unstable import ( "bytes" + "fmt" "unicode" - "github.com/pelletier/go-toml/v2/internal/ast" + "github.com/pelletier/go-toml/v2/internal/characters" "github.com/pelletier/go-toml/v2/internal/danger" ) -type parser struct { - builder ast.Builder - ref ast.Reference +// ParserError describes an error relative to the content of the document. +// +// It cannot outlive the instance of Parser it refers to, and may cause panics +// if the parser is reset. +type ParserError struct { + Highlight []byte + Message string + Key []string // optional +} + +// Error is the implementation of the error interface. +func (e *ParserError) Error() string { + return e.Message +} + +// NewParserError is a convenience function to create a ParserError +// +// Warning: Highlight needs to be a subslice of Parser.data, so only slices +// returned by Parser.Raw are valid candidates. +func NewParserError(highlight []byte, format string, args ...interface{}) error { + return &ParserError{ + Highlight: highlight, + Message: fmt.Errorf(format, args...).Error(), + } +} + +// Parser scans over a TOML-encoded document and generates an iterative AST. +// +// To prime the Parser, first reset it with the contents of a TOML document. +// Then, process all top-level expressions sequentially. See Example. +// +// Don't forget to check Error() after you're done parsing. +// +// Each top-level expression needs to be fully processed before calling +// NextExpression() again. Otherwise, calls to various Node methods may panic if +// the parser has moved on the next expression. +// +// For performance reasons, go-toml doesn't make a copy of the input bytes to +// the parser. Make sure to copy all the bytes you need to outlive the slice +// given to the parser. +// +// The parser doesn't provide nodes for comments yet, nor for whitespace. +type Parser struct { data []byte + builder builder + ref reference left []byte err error first bool } -func (p *parser) Range(b []byte) ast.Range { - return ast.Range{ +// Data returns the slice provided to the last call to Reset. +func (p *Parser) Data() []byte { + return p.data +} + +// Range returns a range description that corresponds to a given slice of the +// input. If the argument is not a subslice of the parser input, this function +// panics. +func (p *Parser) Range(b []byte) Range { + return Range{ Offset: uint32(danger.SubsliceOffset(p.data, b)), Length: uint32(len(b)), } } -func (p *parser) Raw(raw ast.Range) []byte { +// Raw returns the slice corresponding to the bytes in the given range. +func (p *Parser) Raw(raw Range) []byte { return p.data[raw.Offset : raw.Offset+raw.Length] } -func (p *parser) Reset(b []byte) { +// Reset brings the parser to its initial state for a given input. It wipes an +// reuses internal storage to reduce allocation. +func (p *Parser) Reset(b []byte) { p.builder.Reset() - p.ref = ast.InvalidReference + p.ref = invalidReference p.data = b p.left = b p.err = nil p.first = true } -//nolint:cyclop -func (p *parser) NextExpression() bool { +// NextExpression parses the next top-level expression. If an expression was +// successfully parsed, it returns true. If the parser is at the end of the +// document or an error occurred, it returns false. +// +// Retrieve the parsed expression with Expression(). +func (p *Parser) NextExpression() bool { if len(p.left) == 0 || p.err != nil { return false } p.builder.Reset() - p.ref = ast.InvalidReference + p.ref = invalidReference for { if len(p.left) == 0 || p.err != nil { @@ -73,15 +131,18 @@ func (p *parser) NextExpression() bool { } } -func (p *parser) Expression() *ast.Node { +// Expression returns a pointer to the node representing the last successfully +// parsed expresion. +func (p *Parser) Expression() *Node { return p.builder.NodeAt(p.ref) } -func (p *parser) Error() error { +// Error returns any error that has occured during parsing. +func (p *Parser) Error() error { return p.err } -func (p *parser) parseNewline(b []byte) ([]byte, error) { +func (p *Parser) parseNewline(b []byte) ([]byte, error) { if b[0] == '\n' { return b[1:], nil } @@ -91,14 +152,14 @@ func (p *parser) parseNewline(b []byte) ([]byte, error) { return rest, err } - return nil, newDecodeError(b[0:1], "expected newline but got %#U", b[0]) + return nil, NewParserError(b[0:1], "expected newline but got %#U", b[0]) } -func (p *parser) parseExpression(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseExpression(b []byte) (reference, []byte, error) { // expression = ws [ comment ] // expression =/ ws keyval ws [ comment ] // expression =/ ws table ws [ comment ] - ref := ast.InvalidReference + ref := invalidReference b = p.parseWhitespace(b) @@ -136,7 +197,7 @@ func (p *parser) parseExpression(b []byte) (ast.Reference, []byte, error) { return ref, b, nil } -func (p *parser) parseTable(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseTable(b []byte) (reference, []byte, error) { // table = std-table / array-table if len(b) > 1 && b[1] == '[' { return p.parseArrayTable(b) @@ -145,12 +206,12 @@ func (p *parser) parseTable(b []byte) (ast.Reference, []byte, error) { return p.parseStdTable(b) } -func (p *parser) parseArrayTable(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseArrayTable(b []byte) (reference, []byte, error) { // array-table = array-table-open key array-table-close // array-table-open = %x5B.5B ws ; [[ Double left square bracket // array-table-close = ws %x5D.5D ; ]] Double right square bracket - ref := p.builder.Push(ast.Node{ - Kind: ast.ArrayTable, + ref := p.builder.Push(Node{ + Kind: ArrayTable, }) b = b[2:] @@ -174,12 +235,12 @@ func (p *parser) parseArrayTable(b []byte) (ast.Reference, []byte, error) { return ref, b, err } -func (p *parser) parseStdTable(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseStdTable(b []byte) (reference, []byte, error) { // std-table = std-table-open key std-table-close // std-table-open = %x5B ws ; [ Left square bracket // std-table-close = ws %x5D ; ] Right square bracket - ref := p.builder.Push(ast.Node{ - Kind: ast.Table, + ref := p.builder.Push(Node{ + Kind: Table, }) b = b[1:] @@ -199,15 +260,15 @@ func (p *parser) parseStdTable(b []byte) (ast.Reference, []byte, error) { return ref, b, err } -func (p *parser) parseKeyval(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseKeyval(b []byte) (reference, []byte, error) { // keyval = key keyval-sep val - ref := p.builder.Push(ast.Node{ - Kind: ast.KeyValue, + ref := p.builder.Push(Node{ + Kind: KeyValue, }) key, b, err := p.parseKey(b) if err != nil { - return ast.InvalidReference, nil, err + return invalidReference, nil, err } // keyval-sep = ws %x3D ws ; = @@ -215,12 +276,12 @@ func (p *parser) parseKeyval(b []byte) (ast.Reference, []byte, error) { b = p.parseWhitespace(b) if len(b) == 0 { - return ast.InvalidReference, nil, newDecodeError(b, "expected = after a key, but the document ends there") + return invalidReference, nil, NewParserError(b, "expected = after a key, but the document ends there") } b, err = expect('=', b) if err != nil { - return ast.InvalidReference, nil, err + return invalidReference, nil, err } b = p.parseWhitespace(b) @@ -237,12 +298,12 @@ func (p *parser) parseKeyval(b []byte) (ast.Reference, []byte, error) { } //nolint:cyclop,funlen -func (p *parser) parseVal(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseVal(b []byte) (reference, []byte, error) { // val = string / boolean / array / inline-table / date-time / float / integer - ref := ast.InvalidReference + ref := invalidReference if len(b) == 0 { - return ref, nil, newDecodeError(b, "expected value, not eof") + return ref, nil, NewParserError(b, "expected value, not eof") } var err error @@ -259,8 +320,8 @@ func (p *parser) parseVal(b []byte) (ast.Reference, []byte, error) { } if err == nil { - ref = p.builder.Push(ast.Node{ - Kind: ast.String, + ref = p.builder.Push(Node{ + Kind: String, Raw: p.Range(raw), Data: v, }) @@ -277,8 +338,8 @@ func (p *parser) parseVal(b []byte) (ast.Reference, []byte, error) { } if err == nil { - ref = p.builder.Push(ast.Node{ - Kind: ast.String, + ref = p.builder.Push(Node{ + Kind: String, Raw: p.Range(raw), Data: v, }) @@ -287,22 +348,22 @@ func (p *parser) parseVal(b []byte) (ast.Reference, []byte, error) { return ref, b, err case 't': if !scanFollowsTrue(b) { - return ref, nil, newDecodeError(atmost(b, 4), "expected 'true'") + return ref, nil, NewParserError(atmost(b, 4), "expected 'true'") } - ref = p.builder.Push(ast.Node{ - Kind: ast.Bool, + ref = p.builder.Push(Node{ + Kind: Bool, Data: b[:4], }) return ref, b[4:], nil case 'f': if !scanFollowsFalse(b) { - return ref, nil, newDecodeError(atmost(b, 5), "expected 'false'") + return ref, nil, NewParserError(atmost(b, 5), "expected 'false'") } - ref = p.builder.Push(ast.Node{ - Kind: ast.Bool, + ref = p.builder.Push(Node{ + Kind: Bool, Data: b[:5], }) @@ -324,7 +385,7 @@ func atmost(b []byte, n int) []byte { return b[:n] } -func (p *parser) parseLiteralString(b []byte) ([]byte, []byte, []byte, error) { +func (p *Parser) parseLiteralString(b []byte) ([]byte, []byte, []byte, error) { v, rest, err := scanLiteralString(b) if err != nil { return nil, nil, nil, err @@ -333,19 +394,19 @@ func (p *parser) parseLiteralString(b []byte) ([]byte, []byte, []byte, error) { return v, v[1 : len(v)-1], rest, nil } -func (p *parser) parseInlineTable(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseInlineTable(b []byte) (reference, []byte, error) { // inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close // inline-table-open = %x7B ws ; { // inline-table-close = ws %x7D ; } // inline-table-sep = ws %x2C ws ; , Comma // inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ] - parent := p.builder.Push(ast.Node{ - Kind: ast.InlineTable, + parent := p.builder.Push(Node{ + Kind: InlineTable, }) first := true - var child ast.Reference + var child reference b = b[1:] @@ -356,7 +417,7 @@ func (p *parser) parseInlineTable(b []byte) (ast.Reference, []byte, error) { b = p.parseWhitespace(b) if len(b) == 0 { - return parent, nil, newDecodeError(previousB[:1], "inline table is incomplete") + return parent, nil, NewParserError(previousB[:1], "inline table is incomplete") } if b[0] == '}' { @@ -371,7 +432,7 @@ func (p *parser) parseInlineTable(b []byte) (ast.Reference, []byte, error) { b = p.parseWhitespace(b) } - var kv ast.Reference + var kv reference kv, b, err = p.parseKeyval(b) if err != nil { @@ -394,7 +455,7 @@ func (p *parser) parseInlineTable(b []byte) (ast.Reference, []byte, error) { } //nolint:funlen,cyclop -func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseValArray(b []byte) (reference, []byte, error) { // array = array-open [ array-values ] ws-comment-newline array-close // array-open = %x5B ; [ // array-close = %x5D ; ] @@ -405,13 +466,13 @@ func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { arrayStart := b b = b[1:] - parent := p.builder.Push(ast.Node{ - Kind: ast.Array, + parent := p.builder.Push(Node{ + Kind: Array, }) first := true - var lastChild ast.Reference + var lastChild reference var err error for len(b) > 0 { @@ -421,7 +482,7 @@ func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { } if len(b) == 0 { - return parent, nil, newDecodeError(arrayStart[:1], "array is incomplete") + return parent, nil, NewParserError(arrayStart[:1], "array is incomplete") } if b[0] == ']' { @@ -430,7 +491,7 @@ func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { if b[0] == ',' { if first { - return parent, nil, newDecodeError(b[0:1], "array cannot start with comma") + return parent, nil, NewParserError(b[0:1], "array cannot start with comma") } b = b[1:] @@ -439,7 +500,7 @@ func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { return parent, nil, err } } else if !first { - return parent, nil, newDecodeError(b[0:1], "array elements must be separated by commas") + return parent, nil, NewParserError(b[0:1], "array elements must be separated by commas") } // TOML allows trailing commas in arrays. @@ -447,7 +508,7 @@ func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { break } - var valueRef ast.Reference + var valueRef reference valueRef, b, err = p.parseVal(b) if err != nil { return parent, nil, err @@ -472,7 +533,7 @@ func (p *parser) parseValArray(b []byte) (ast.Reference, []byte, error) { return parent, rest, err } -func (p *parser) parseOptionalWhitespaceCommentNewline(b []byte) ([]byte, error) { +func (p *Parser) parseOptionalWhitespaceCommentNewline(b []byte) ([]byte, error) { for len(b) > 0 { var err error b = p.parseWhitespace(b) @@ -501,7 +562,7 @@ func (p *parser) parseOptionalWhitespaceCommentNewline(b []byte) ([]byte, error) return b, nil } -func (p *parser) parseMultilineLiteralString(b []byte) ([]byte, []byte, []byte, error) { +func (p *Parser) parseMultilineLiteralString(b []byte) ([]byte, []byte, []byte, error) { token, rest, err := scanMultilineLiteralString(b) if err != nil { return nil, nil, nil, err @@ -520,7 +581,7 @@ func (p *parser) parseMultilineLiteralString(b []byte) ([]byte, []byte, []byte, } //nolint:funlen,gocognit,cyclop -func (p *parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, error) { +func (p *Parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, error) { // ml-basic-string = ml-basic-string-delim [ newline ] ml-basic-body // ml-basic-string-delim // ml-basic-string-delim = 3quotation-mark @@ -551,11 +612,11 @@ func (p *parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, er if !escaped { str := token[startIdx:endIdx] - verr := utf8TomlValidAlreadyEscaped(str) + verr := characters.Utf8TomlValidAlreadyEscaped(str) if verr.Zero() { return token, str, rest, nil } - return nil, nil, nil, newDecodeError(str[verr.Index:verr.Index+verr.Size], "invalid UTF-8") + return nil, nil, nil, NewParserError(str[verr.Index:verr.Index+verr.Size], "invalid UTF-8") } var builder bytes.Buffer @@ -635,13 +696,13 @@ func (p *parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, er builder.WriteRune(x) i += 8 default: - return nil, nil, nil, newDecodeError(token[i:i+1], "invalid escaped character %#U", c) + return nil, nil, nil, NewParserError(token[i:i+1], "invalid escaped character %#U", c) } i++ } else { - size := utf8ValidNext(token[i:]) + size := characters.Utf8ValidNext(token[i:]) if size == 0 { - return nil, nil, nil, newDecodeError(token[i:i+1], "invalid character %#U", c) + return nil, nil, nil, NewParserError(token[i:i+1], "invalid character %#U", c) } builder.Write(token[i : i+size]) i += size @@ -651,7 +712,7 @@ func (p *parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, er return token, builder.Bytes(), rest, nil } -func (p *parser) parseKey(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseKey(b []byte) (reference, []byte, error) { // key = simple-key / dotted-key // simple-key = quoted-key / unquoted-key // @@ -662,11 +723,11 @@ func (p *parser) parseKey(b []byte) (ast.Reference, []byte, error) { // dot-sep = ws %x2E ws ; . Period raw, key, b, err := p.parseSimpleKey(b) if err != nil { - return ast.InvalidReference, nil, err + return invalidReference, nil, err } - ref := p.builder.Push(ast.Node{ - Kind: ast.Key, + ref := p.builder.Push(Node{ + Kind: Key, Raw: p.Range(raw), Data: key, }) @@ -681,8 +742,8 @@ func (p *parser) parseKey(b []byte) (ast.Reference, []byte, error) { return ref, nil, err } - p.builder.PushAndChain(ast.Node{ - Kind: ast.Key, + p.builder.PushAndChain(Node{ + Kind: Key, Raw: p.Range(raw), Data: key, }) @@ -694,9 +755,9 @@ func (p *parser) parseKey(b []byte) (ast.Reference, []byte, error) { return ref, b, nil } -func (p *parser) parseSimpleKey(b []byte) (raw, key, rest []byte, err error) { +func (p *Parser) parseSimpleKey(b []byte) (raw, key, rest []byte, err error) { if len(b) == 0 { - return nil, nil, nil, newDecodeError(b, "expected key but found none") + return nil, nil, nil, NewParserError(b, "expected key but found none") } // simple-key = quoted-key / unquoted-key @@ -711,12 +772,12 @@ func (p *parser) parseSimpleKey(b []byte) (raw, key, rest []byte, err error) { key, rest = scanUnquotedKey(b) return key, key, rest, nil default: - return nil, nil, nil, newDecodeError(b[0:1], "invalid character at start of key: %c", b[0]) + return nil, nil, nil, NewParserError(b[0:1], "invalid character at start of key: %c", b[0]) } } //nolint:funlen,cyclop -func (p *parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) { +func (p *Parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) { // basic-string = quotation-mark *basic-char quotation-mark // quotation-mark = %x22 ; " // basic-char = basic-unescaped / escaped @@ -744,11 +805,11 @@ func (p *parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) { // validate the string and return a direct reference to the buffer. if !escaped { str := token[startIdx:endIdx] - verr := utf8TomlValidAlreadyEscaped(str) + verr := characters.Utf8TomlValidAlreadyEscaped(str) if verr.Zero() { return token, str, rest, nil } - return nil, nil, nil, newDecodeError(str[verr.Index:verr.Index+verr.Size], "invalid UTF-8") + return nil, nil, nil, NewParserError(str[verr.Index:verr.Index+verr.Size], "invalid UTF-8") } i := startIdx @@ -795,13 +856,13 @@ func (p *parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) { builder.WriteRune(x) i += 8 default: - return nil, nil, nil, newDecodeError(token[i:i+1], "invalid escaped character %#U", c) + return nil, nil, nil, NewParserError(token[i:i+1], "invalid escaped character %#U", c) } i++ } else { - size := utf8ValidNext(token[i:]) + size := characters.Utf8ValidNext(token[i:]) if size == 0 { - return nil, nil, nil, newDecodeError(token[i:i+1], "invalid character %#U", c) + return nil, nil, nil, NewParserError(token[i:i+1], "invalid character %#U", c) } builder.Write(token[i : i+size]) i += size @@ -813,7 +874,7 @@ func (p *parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) { func hexToRune(b []byte, length int) (rune, error) { if len(b) < length { - return -1, newDecodeError(b, "unicode point needs %d character, not %d", length, len(b)) + return -1, NewParserError(b, "unicode point needs %d character, not %d", length, len(b)) } b = b[:length] @@ -828,19 +889,19 @@ func hexToRune(b []byte, length int) (rune, error) { case 'A' <= c && c <= 'F': d = uint32(c - 'A' + 10) default: - return -1, newDecodeError(b[i:i+1], "non-hex character") + return -1, NewParserError(b[i:i+1], "non-hex character") } r = r*16 + d } if r > unicode.MaxRune || 0xD800 <= r && r < 0xE000 { - return -1, newDecodeError(b, "escape sequence is invalid Unicode code point") + return -1, NewParserError(b, "escape sequence is invalid Unicode code point") } return rune(r), nil } -func (p *parser) parseWhitespace(b []byte) []byte { +func (p *Parser) parseWhitespace(b []byte) []byte { // ws = *wschar // wschar = %x20 ; Space // wschar =/ %x09 ; Horizontal tab @@ -850,24 +911,24 @@ func (p *parser) parseWhitespace(b []byte) []byte { } //nolint:cyclop -func (p *parser) parseIntOrFloatOrDateTime(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) parseIntOrFloatOrDateTime(b []byte) (reference, []byte, error) { switch b[0] { case 'i': if !scanFollowsInf(b) { - return ast.InvalidReference, nil, newDecodeError(atmost(b, 3), "expected 'inf'") + return invalidReference, nil, NewParserError(atmost(b, 3), "expected 'inf'") } - return p.builder.Push(ast.Node{ - Kind: ast.Float, + return p.builder.Push(Node{ + Kind: Float, Data: b[:3], }), b[3:], nil case 'n': if !scanFollowsNan(b) { - return ast.InvalidReference, nil, newDecodeError(atmost(b, 3), "expected 'nan'") + return invalidReference, nil, NewParserError(atmost(b, 3), "expected 'nan'") } - return p.builder.Push(ast.Node{ - Kind: ast.Float, + return p.builder.Push(Node{ + Kind: Float, Data: b[:3], }), b[3:], nil case '+', '-': @@ -898,7 +959,7 @@ func (p *parser) parseIntOrFloatOrDateTime(b []byte) (ast.Reference, []byte, err return p.scanIntOrFloat(b) } -func (p *parser) scanDateTime(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) scanDateTime(b []byte) (reference, []byte, error) { // scans for contiguous characters in [0-9T:Z.+-], and up to one space if // followed by a digit. hasDate := false @@ -941,30 +1002,30 @@ byteLoop: } } - var kind ast.Kind + var kind Kind if hasTime { if hasDate { if hasTz { - kind = ast.DateTime + kind = DateTime } else { - kind = ast.LocalDateTime + kind = LocalDateTime } } else { - kind = ast.LocalTime + kind = LocalTime } } else { - kind = ast.LocalDate + kind = LocalDate } - return p.builder.Push(ast.Node{ + return p.builder.Push(Node{ Kind: kind, Data: b[:i], }), b[i:], nil } //nolint:funlen,gocognit,cyclop -func (p *parser) scanIntOrFloat(b []byte) (ast.Reference, []byte, error) { +func (p *Parser) scanIntOrFloat(b []byte) (reference, []byte, error) { i := 0 if len(b) > 2 && b[0] == '0' && b[1] != '.' && b[1] != 'e' && b[1] != 'E' { @@ -990,8 +1051,8 @@ func (p *parser) scanIntOrFloat(b []byte) (ast.Reference, []byte, error) { } } - return p.builder.Push(ast.Node{ - Kind: ast.Integer, + return p.builder.Push(Node{ + Kind: Integer, Data: b[:i], }), b[i:], nil } @@ -1013,40 +1074,40 @@ func (p *parser) scanIntOrFloat(b []byte) (ast.Reference, []byte, error) { if c == 'i' { if scanFollowsInf(b[i:]) { - return p.builder.Push(ast.Node{ - Kind: ast.Float, + return p.builder.Push(Node{ + Kind: Float, Data: b[:i+3], }), b[i+3:], nil } - return ast.InvalidReference, nil, newDecodeError(b[i:i+1], "unexpected character 'i' while scanning for a number") + return invalidReference, nil, NewParserError(b[i:i+1], "unexpected character 'i' while scanning for a number") } if c == 'n' { if scanFollowsNan(b[i:]) { - return p.builder.Push(ast.Node{ - Kind: ast.Float, + return p.builder.Push(Node{ + Kind: Float, Data: b[:i+3], }), b[i+3:], nil } - return ast.InvalidReference, nil, newDecodeError(b[i:i+1], "unexpected character 'n' while scanning for a number") + return invalidReference, nil, NewParserError(b[i:i+1], "unexpected character 'n' while scanning for a number") } break } if i == 0 { - return ast.InvalidReference, b, newDecodeError(b, "incomplete number") + return invalidReference, b, NewParserError(b, "incomplete number") } - kind := ast.Integer + kind := Integer if isFloat { - kind = ast.Float + kind = Float } - return p.builder.Push(ast.Node{ + return p.builder.Push(Node{ Kind: kind, Data: b[:i], }), b[i:], nil @@ -1075,11 +1136,11 @@ func isValidBinaryRune(r byte) bool { func expect(x byte, b []byte) ([]byte, error) { if len(b) == 0 { - return nil, newDecodeError(b, "expected character %c but the document ended here", x) + return nil, NewParserError(b, "expected character %c but the document ended here", x) } if b[0] != x { - return nil, newDecodeError(b[0:1], "expected character %c", x) + return nil, NewParserError(b[0:1], "expected character %c", x) } return b[1:], nil diff --git a/vendor/github.com/pelletier/go-toml/v2/scanner.go b/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go similarity index 79% rename from vendor/github.com/pelletier/go-toml/v2/scanner.go rename to vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go index bb445fab..af22ebbe 100644 --- a/vendor/github.com/pelletier/go-toml/v2/scanner.go +++ b/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go @@ -1,4 +1,6 @@ -package toml +package unstable + +import "github.com/pelletier/go-toml/v2/internal/characters" func scanFollows(b []byte, pattern string) bool { n := len(pattern) @@ -54,16 +56,16 @@ func scanLiteralString(b []byte) ([]byte, []byte, error) { case '\'': return b[:i+1], b[i+1:], nil case '\n', '\r': - return nil, nil, newDecodeError(b[i:i+1], "literal strings cannot have new lines") + return nil, nil, NewParserError(b[i:i+1], "literal strings cannot have new lines") } - size := utf8ValidNext(b[i:]) + size := characters.Utf8ValidNext(b[i:]) if size == 0 { - return nil, nil, newDecodeError(b[i:i+1], "invalid character") + return nil, nil, NewParserError(b[i:i+1], "invalid character") } i += size } - return nil, nil, newDecodeError(b[len(b):], "unterminated literal string") + return nil, nil, NewParserError(b[len(b):], "unterminated literal string") } func scanMultilineLiteralString(b []byte) ([]byte, []byte, error) { @@ -98,39 +100,39 @@ func scanMultilineLiteralString(b []byte) ([]byte, []byte, error) { i++ if i < len(b) && b[i] == '\'' { - return nil, nil, newDecodeError(b[i-3:i+1], "''' not allowed in multiline literal string") + return nil, nil, NewParserError(b[i-3:i+1], "''' not allowed in multiline literal string") } return b[:i], b[i:], nil } case '\r': if len(b) < i+2 { - return nil, nil, newDecodeError(b[len(b):], `need a \n after \r`) + return nil, nil, NewParserError(b[len(b):], `need a \n after \r`) } if b[i+1] != '\n' { - return nil, nil, newDecodeError(b[i:i+2], `need a \n after \r`) + return nil, nil, NewParserError(b[i:i+2], `need a \n after \r`) } i += 2 // skip the \n continue } - size := utf8ValidNext(b[i:]) + size := characters.Utf8ValidNext(b[i:]) if size == 0 { - return nil, nil, newDecodeError(b[i:i+1], "invalid character") + return nil, nil, NewParserError(b[i:i+1], "invalid character") } i += size } - return nil, nil, newDecodeError(b[len(b):], `multiline literal string not terminated by '''`) + return nil, nil, NewParserError(b[len(b):], `multiline literal string not terminated by '''`) } func scanWindowsNewline(b []byte) ([]byte, []byte, error) { const lenCRLF = 2 if len(b) < lenCRLF { - return nil, nil, newDecodeError(b, "windows new line expected") + return nil, nil, NewParserError(b, "windows new line expected") } if b[1] != '\n' { - return nil, nil, newDecodeError(b, `windows new line should be \r\n`) + return nil, nil, NewParserError(b, `windows new line should be \r\n`) } return b[:lenCRLF], b[lenCRLF:], nil @@ -165,11 +167,11 @@ func scanComment(b []byte) ([]byte, []byte, error) { if i+1 < len(b) && b[i+1] == '\n' { return b[:i+1], b[i+1:], nil } - return nil, nil, newDecodeError(b[i:i+1], "invalid character in comment") + return nil, nil, NewParserError(b[i:i+1], "invalid character in comment") } - size := utf8ValidNext(b[i:]) + size := characters.Utf8ValidNext(b[i:]) if size == 0 { - return nil, nil, newDecodeError(b[i:i+1], "invalid character in comment") + return nil, nil, NewParserError(b[i:i+1], "invalid character in comment") } i += size @@ -192,17 +194,17 @@ func scanBasicString(b []byte) ([]byte, bool, []byte, error) { case '"': return b[:i+1], escaped, b[i+1:], nil case '\n', '\r': - return nil, escaped, nil, newDecodeError(b[i:i+1], "basic strings cannot have new lines") + return nil, escaped, nil, NewParserError(b[i:i+1], "basic strings cannot have new lines") case '\\': if len(b) < i+2 { - return nil, escaped, nil, newDecodeError(b[i:i+1], "need a character after \\") + return nil, escaped, nil, NewParserError(b[i:i+1], "need a character after \\") } escaped = true i++ // skip the next character } } - return nil, escaped, nil, newDecodeError(b[len(b):], `basic string not terminated by "`) + return nil, escaped, nil, NewParserError(b[len(b):], `basic string not terminated by "`) } func scanMultilineBasicString(b []byte) ([]byte, bool, []byte, error) { @@ -243,27 +245,27 @@ func scanMultilineBasicString(b []byte) ([]byte, bool, []byte, error) { i++ if i < len(b) && b[i] == '"' { - return nil, escaped, nil, newDecodeError(b[i-3:i+1], `""" not allowed in multiline basic string`) + return nil, escaped, nil, NewParserError(b[i-3:i+1], `""" not allowed in multiline basic string`) } return b[:i], escaped, b[i:], nil } case '\\': if len(b) < i+2 { - return nil, escaped, nil, newDecodeError(b[len(b):], "need a character after \\") + return nil, escaped, nil, NewParserError(b[len(b):], "need a character after \\") } escaped = true i++ // skip the next character case '\r': if len(b) < i+2 { - return nil, escaped, nil, newDecodeError(b[len(b):], `need a \n after \r`) + return nil, escaped, nil, NewParserError(b[len(b):], `need a \n after \r`) } if b[i+1] != '\n' { - return nil, escaped, nil, newDecodeError(b[i:i+2], `need a \n after \r`) + return nil, escaped, nil, NewParserError(b[i:i+2], `need a \n after \r`) } i++ // skip the \n } } - return nil, escaped, nil, newDecodeError(b[len(b):], `multiline basic string not terminated by """`) + return nil, escaped, nil, NewParserError(b[len(b):], `multiline basic string not terminated by """`) } diff --git a/vendor/github.com/saintfish/chardet/README.md b/vendor/github.com/saintfish/chardet/README.md index 4281eecc..41f58ee0 100644 --- a/vendor/github.com/saintfish/chardet/README.md +++ b/vendor/github.com/saintfish/chardet/README.md @@ -7,4 +7,4 @@ in [ICU](http://icu-project.org/)'s implementation. ## Documentation and Usage -See [pkgdoc](http://go.pkgdoc.org/github.com/saintfish/chardet) +See [pkgdoc](https://pkg.go.dev/github.com/saintfish/chardet) diff --git a/vendor/github.com/slack-go/slack/auth.go b/vendor/github.com/slack-go/slack/auth.go index f4f7f003..bf6e80d3 100644 --- a/vendor/github.com/slack-go/slack/auth.go +++ b/vendor/github.com/slack-go/slack/auth.go @@ -38,3 +38,37 @@ func (api *Client) SendAuthRevokeContext(ctx context.Context, token string) (*Au return api.authRequest(ctx, "auth.revoke", values) } + +type listTeamsResponse struct { + Teams []Team `json:"teams"` + SlackResponse +} + +type ListTeamsParameters struct { + Limit int + Cursor string +} + +// ListTeams returns all workspaces a token can access. +// More info: https://api.slack.com/methods/admin.teams.list +func (api *Client) ListTeams(params ListTeamsParameters) ([]Team, string, error) { + return api.ListTeamsContext(context.Background(), params) +} + +// ListTeams returns all workspaces a token can access with a custom context. +func (api *Client) ListTeamsContext(ctx context.Context, params ListTeamsParameters) ([]Team, string, error) { + values := url.Values{ + "token": {api.token}, + } + if params.Cursor != "" { + values.Add("cursor", params.Cursor) + } + + response := &listTeamsResponse{} + err := api.postMethod(ctx, "auth.teams.list", values, response) + if err != nil { + return nil, "", err + } + + return response.Teams, response.ResponseMetadata.Cursor, response.Err() +} diff --git a/vendor/github.com/slack-go/slack/block_conv.go b/vendor/github.com/slack-go/slack/block_conv.go index 1a2c57e9..555e4811 100644 --- a/vendor/github.com/slack-go/slack/block_conv.go +++ b/vendor/github.com/slack-go/slack/block_conv.go @@ -112,6 +112,10 @@ func (b *InputBlock) UnmarshalJSON(data []byte) error { e = &TimePickerBlockElement{} case "plain_text_input": e = &PlainTextInputBlockElement{} + case "email_text_input": + e = &EmailTextInputBlockElement{} + case "url_text_input": + e = &URLTextInputBlockElement{} case "static_select", "external_select", "users_select", "conversations_select", "channels_select": e = &SelectBlockElement{} case "multi_static_select", "multi_external_select", "multi_users_select", "multi_conversations_select", "multi_channels_select": @@ -122,6 +126,8 @@ func (b *InputBlock) UnmarshalJSON(data []byte) error { e = &OverflowBlockElement{} case "radio_buttons": e = &RadioButtonsBlockElement{} + case "number_input": + e = &NumberInputBlockElement{} default: return errors.New("unsupported block element type") } @@ -186,12 +192,18 @@ func (b *BlockElements) UnmarshalJSON(data []byte) error { blockElement = &TimePickerBlockElement{} case "plain_text_input": blockElement = &PlainTextInputBlockElement{} + case "email_text_input": + blockElement = &EmailTextInputBlockElement{} + case "url_text_input": + blockElement = &URLTextInputBlockElement{} case "checkboxes": blockElement = &CheckboxGroupsBlockElement{} case "radio_buttons": blockElement = &RadioButtonsBlockElement{} case "static_select", "external_select", "users_select", "conversations_select", "channels_select": blockElement = &SelectBlockElement{} + case "number_input": + blockElement = &NumberInputBlockElement{} default: return fmt.Errorf("unsupported block element type %v", blockElementType) } diff --git a/vendor/github.com/slack-go/slack/block_element.go b/vendor/github.com/slack-go/slack/block_element.go index 643529ff..aba29c6b 100644 --- a/vendor/github.com/slack-go/slack/block_element.go +++ b/vendor/github.com/slack-go/slack/block_element.go @@ -11,6 +11,9 @@ const ( METTimepicker MessageElementType = "timepicker" METPlainTextInput MessageElementType = "plain_text_input" METRadioButtons MessageElementType = "radio_buttons" + METEmailTextInput MessageElementType = "email_text_input" + METURLTextInput MessageElementType = "url_text_input" + METNumber MessageElementType = "number_input" MixedElementImage MixedElementType = "mixed_image" MixedElementText MixedElementType = "mixed_text" @@ -389,6 +392,64 @@ func NewTimePickerBlockElement(actionID string) *TimePickerBlockElement { } } +// EmailTextInputBlockElement creates a field where a user can enter email +// data. +// email-text-input elements are currently only available in modals. +// +// More Information: https://api.slack.com/reference/block-kit/block-elements#email +type EmailTextInputBlockElement struct { + Type MessageElementType `json:"type"` + ActionID string `json:"action_id,omitempty"` + Placeholder *TextBlockObject `json:"placeholder,omitempty"` + InitialValue string `json:"initial_value,omitempty"` + DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` + FocusOnLoad bool `json:"focus_on_load,omitempty"` +} + +// ElementType returns the type of the Element +func (s EmailTextInputBlockElement) ElementType() MessageElementType { + return s.Type +} + +// NewEmailTextInputBlockElement returns an instance of a plain-text input +// element +func NewEmailTextInputBlockElement(placeholder *TextBlockObject, actionID string) *EmailTextInputBlockElement { + return &EmailTextInputBlockElement{ + Type: METEmailTextInput, + ActionID: actionID, + Placeholder: placeholder, + } +} + +// URLTextInputBlockElement creates a field where a user can enter url data. +// +// url-text-input elements are currently only available in modals. +// +// More Information: https://api.slack.com/reference/block-kit/block-elements#url +type URLTextInputBlockElement struct { + Type MessageElementType `json:"type"` + ActionID string `json:"action_id,omitempty"` + Placeholder *TextBlockObject `json:"placeholder,omitempty"` + InitialValue string `json:"initial_value,omitempty"` + DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` + FocusOnLoad bool `json:"focus_on_load,omitempty"` +} + +// ElementType returns the type of the Element +func (s URLTextInputBlockElement) ElementType() MessageElementType { + return s.Type +} + +// NewURLTextInputBlockElement returns an instance of a plain-text input +// element +func NewURLTextInputBlockElement(placeholder *TextBlockObject, actionID string) *URLTextInputBlockElement { + return &URLTextInputBlockElement{ + Type: METURLTextInput, + ActionID: actionID, + Placeholder: placeholder, + } +} + // PlainTextInputBlockElement creates a field where a user can enter freeform // data. // Plain-text input elements are currently only available in modals. @@ -475,3 +536,34 @@ func NewRadioButtonsBlockElement(actionID string, options ...*OptionBlockObject) Options: options, } } + +// NumberInputBlockElement creates a field where a user can enter number +// data. +// Number input elements are currently only available in modals. +// +// More Information: https://api.slack.com/reference/block-kit/block-elements#number +type NumberInputBlockElement struct { + Type MessageElementType `json:"type"` + IsDecimalAllowed bool `json:"is_decimal_allowed"` + ActionID string `json:"action_id,omitempty"` + Placeholder *TextBlockObject `json:"placeholder,omitempty"` + InitialValue string `json:"initial_value,omitempty"` + MinValue string `json:"min_value,omitempty"` + MaxValue string `json:"max_value,omitempty"` + DispatchActionConfig *DispatchActionConfig `json:"dispatch_action_config,omitempty"` +} + +// ElementType returns the type of the Element +func (s NumberInputBlockElement) ElementType() MessageElementType { + return s.Type +} + +// NewNumberInputBlockElement returns an instance of a number input element +func NewNumberInputBlockElement(placeholder *TextBlockObject, actionID string, isDecimalAllowed bool) *NumberInputBlockElement { + return &NumberInputBlockElement{ + Type: METNumber, + ActionID: actionID, + Placeholder: placeholder, + IsDecimalAllowed: isDecimalAllowed, + } +} diff --git a/vendor/github.com/slack-go/slack/block_rich_text.go b/vendor/github.com/slack-go/slack/block_rich_text.go index 281db213..555a6198 100644 --- a/vendor/github.com/slack-go/slack/block_rich_text.go +++ b/vendor/github.com/slack-go/slack/block_rich_text.go @@ -327,17 +327,17 @@ func NewRichTextSectionUserGroupElement(usergroupID string) *RichTextSectionUser type RichTextSectionDateElement struct { Type RichTextSectionElementType `json:"type"` - Timestamp string `json:"timestamp"` + Timestamp JSONTime `json:"timestamp"` } func (r RichTextSectionDateElement) RichTextSectionElementType() RichTextSectionElementType { return r.Type } -func NewRichTextSectionDateElement(timestamp string) *RichTextSectionDateElement { +func NewRichTextSectionDateElement(timestamp int64) *RichTextSectionDateElement { return &RichTextSectionDateElement{ Type: RTSEDate, - Timestamp: timestamp, + Timestamp: JSONTime(timestamp), } } diff --git a/vendor/github.com/slack-go/slack/conversation.go b/vendor/github.com/slack-go/slack/conversation.go index e523716c..44f06ea9 100644 --- a/vendor/github.com/slack-go/slack/conversation.go +++ b/vendor/github.com/slack-go/slack/conversation.go @@ -2,6 +2,7 @@ package slack import ( "context" + "errors" "net/url" "strconv" "strings" @@ -71,6 +72,7 @@ type GetConversationsForUserParameters struct { Types []string Limit int ExcludeArchived bool + TeamID string } type responseMetaData struct { @@ -137,6 +139,10 @@ func (api *Client) GetConversationsForUserContext(ctx context.Context, params *G if params.ExcludeArchived { values.Add("exclude_archived", "true") } + if params.TeamID != "" { + values.Add("team_id", params.TeamID) + } + response := struct { Channels []Channel `json:"channels"` ResponseMetaData responseMetaData `json:"response_metadata"` @@ -337,17 +343,26 @@ func (api *Client) CloseConversationContext(ctx context.Context, channelID strin return response.NoOp, response.AlreadyClosed, response.Err() } +type CreateConversationParams struct { + ChannelName string + IsPrivate bool + TeamID string +} + // CreateConversation initiates a public or private channel-based conversation -func (api *Client) CreateConversation(channelName string, isPrivate bool) (*Channel, error) { - return api.CreateConversationContext(context.Background(), channelName, isPrivate) +func (api *Client) CreateConversation(params CreateConversationParams) (*Channel, error) { + return api.CreateConversationContext(context.Background(), params) } // CreateConversationContext initiates a public or private channel-based conversation with a custom context -func (api *Client) CreateConversationContext(ctx context.Context, channelName string, isPrivate bool) (*Channel, error) { +func (api *Client) CreateConversationContext(ctx context.Context, params CreateConversationParams) (*Channel, error) { values := url.Values{ "token": {api.token}, - "name": {channelName}, - "is_private": {strconv.FormatBool(isPrivate)}, + "name": {params.ChannelName}, + "is_private": {strconv.FormatBool(params.IsPrivate)}, + } + if params.TeamID != "" { + values.Set("team_id", params.TeamID) } response, err := api.channelRequest(ctx, "conversations.create", values) if err != nil { @@ -357,17 +372,33 @@ func (api *Client) CreateConversationContext(ctx context.Context, channelName st return &response.Channel, nil } +// GetConversationInfoInput Defines the parameters of a GetConversationInfo and GetConversationInfoContext function +type GetConversationInfoInput struct { + ChannelID string + IncludeLocale bool + IncludeNumMembers bool +} + // GetConversationInfo retrieves information about a conversation -func (api *Client) GetConversationInfo(channelID string, includeLocale bool) (*Channel, error) { - return api.GetConversationInfoContext(context.Background(), channelID, includeLocale) +func (api *Client) GetConversationInfo(input *GetConversationInfoInput) (*Channel, error) { + return api.GetConversationInfoContext(context.Background(), input) } // GetConversationInfoContext retrieves information about a conversation with a custom context -func (api *Client) GetConversationInfoContext(ctx context.Context, channelID string, includeLocale bool) (*Channel, error) { +func (api *Client) GetConversationInfoContext(ctx context.Context, input *GetConversationInfoInput) (*Channel, error) { + if input == nil { + return nil, errors.New("GetConversationInfoInput must not be nil") + } + + if input.ChannelID == "" { + return nil, errors.New("ChannelID must be defined") + } + values := url.Values{ - "token": {api.token}, - "channel": {channelID}, - "include_locale": {strconv.FormatBool(includeLocale)}, + "token": {api.token}, + "channel": {input.ChannelID}, + "include_locale": {strconv.FormatBool(input.IncludeLocale)}, + "include_num_members": {strconv.FormatBool(input.IncludeNumMembers)}, } response, err := api.channelRequest(ctx, "conversations.info", values) if err != nil { @@ -398,13 +429,14 @@ func (api *Client) LeaveConversationContext(ctx context.Context, channelID strin } type GetConversationRepliesParameters struct { - ChannelID string - Timestamp string - Cursor string - Inclusive bool - Latest string - Limit int - Oldest string + ChannelID string + Timestamp string + Cursor string + Inclusive bool + Latest string + Limit int + Oldest string + IncludeAllMetadata bool } // GetConversationReplies retrieves a thread of messages posted to a conversation @@ -436,6 +468,11 @@ func (api *Client) GetConversationRepliesContext(ctx context.Context, params *Ge } else { values.Add("inclusive", "0") } + if params.IncludeAllMetadata { + values.Add("include_all_metadata", "1") + } else { + values.Add("include_all_metadata", "0") + } response := struct { SlackResponse HasMore bool `json:"has_more"` diff --git a/vendor/github.com/slack-go/slack/files.go b/vendor/github.com/slack-go/slack/files.go index e7cfe1fe..35628442 100644 --- a/vendor/github.com/slack-go/slack/files.go +++ b/vendor/github.com/slack-go/slack/files.go @@ -2,6 +2,7 @@ package slack import ( "context" + "encoding/json" "fmt" "io" "net/url" @@ -145,6 +146,58 @@ type ListFilesParameters struct { Cursor string } +type UploadFileV2Parameters struct { + File string + FileSize int + Content string + Reader io.Reader + Filename string + Title string + InitialComment string + Channel string + ThreadTimestamp string + AltTxt string + SnippetText string +} + +type getUploadURLExternalParameters struct { + altText string + fileSize int + fileName string + snippetText string +} + +type getUploadURLExternalResponse struct { + UploadURL string `json:"upload_url"` + FileID string `json:"file_id"` + SlackResponse +} + +type uploadToURLParameters struct { + UploadURL string + Reader io.Reader + File string + Content string + Filename string +} + +type FileSummary struct { + ID string `json:"id"` + Title string `json:"title"` +} + +type completeUploadExternalParameters struct { + title string + channel string + initialComment string + threadTimestamp string +} + +type completeUploadExternalResponse struct { + SlackResponse + Files []FileSummary `json:"files"` +} + type fileResponseFull struct { File `json:"file"` Paging `json:"paging"` @@ -416,3 +469,129 @@ func (api *Client) ShareFilePublicURLContext(ctx context.Context, fileID string) } return &response.File, response.Comments, &response.Paging, nil } + +// getUploadURLExternal gets a URL and fileID from slack which can later be used to upload a file +func (api *Client) getUploadURLExternal(ctx context.Context, params getUploadURLExternalParameters) (*getUploadURLExternalResponse, error) { + values := url.Values{ + "token": {api.token}, + "filename": {params.fileName}, + "length": {strconv.Itoa(params.fileSize)}, + } + if params.altText != "" { + values.Add("initial_comment", params.altText) + } + if params.snippetText != "" { + values.Add("thread_ts", params.snippetText) + } + response := &getUploadURLExternalResponse{} + err := api.postMethod(ctx, "files.getUploadURLExternal", values, response) + if err != nil { + return nil, err + } + + return response, response.Err() +} + +// uploadToURL uploads the file to the provided URL using post method +func (api *Client) uploadToURL(ctx context.Context, params uploadToURLParameters) (err error) { + values := url.Values{} + if params.Content != "" { + values.Add("content", params.Content) + values.Add("token", api.token) + err = postForm(ctx, api.httpclient, params.UploadURL, values, nil, api) + } else if params.File != "" { + err = postLocalWithMultipartResponse(ctx, api.httpclient, params.UploadURL, params.File, "file", api.token, values, nil, api) + } else if params.Reader != nil { + err = postWithMultipartResponse(ctx, api.httpclient, params.UploadURL, params.Filename, "file", api.token, values, params.Reader, nil, api) + } + return err +} + +// completeUploadExternal once files are uploaded, this completes the upload and shares it to the specified channel +func (api *Client) completeUploadExternal(ctx context.Context, fileID string, params completeUploadExternalParameters) (file *completeUploadExternalResponse, err error) { + request := []FileSummary{{ID: fileID, Title: params.title}} + requestBytes, err := json.Marshal(request) + if err != nil { + return nil, err + } + values := url.Values{ + "token": {api.token}, + "files": {string(requestBytes)}, + "channel_id": {params.channel}, + } + + if params.initialComment != "" { + values.Add("initial_comment", params.initialComment) + } + if params.threadTimestamp != "" { + values.Add("thread_ts", params.threadTimestamp) + } + response := &completeUploadExternalResponse{} + err = api.postMethod(ctx, "files.completeUploadExternal", values, response) + if err != nil { + return nil, err + } + if response.Err() != nil { + return nil, response.Err() + } + return response, nil +} + +// UploadFileV2 uploads file to a given slack channel using 3 steps - +// 1. Get an upload URL using files.getUploadURLExternal API +// 2. Send the file as a post to the URL provided by slack +// 3. Complete the upload and share it to the specified channel using files.completeUploadExternal +func (api *Client) UploadFileV2(params UploadFileV2Parameters) (*FileSummary, error) { + return api.UploadFileV2Context(context.Background(), params) +} + +// UploadFileV2 uploads file to a given slack channel using 3 steps with a custom context - +// 1. Get an upload URL using files.getUploadURLExternal API +// 2. Send the file as a post to the URL provided by slack +// 3. Complete the upload and share it to the specified channel using files.completeUploadExternal +func (api *Client) UploadFileV2Context(ctx context.Context, params UploadFileV2Parameters) (file *FileSummary, err error) { + if params.Filename == "" { + return nil, fmt.Errorf("file.upload.v2: filename cannot be empty") + } + if params.FileSize == 0 { + return nil, fmt.Errorf("file.upload.v2: file size cannot be 0") + } + if params.Channel == "" { + return nil, fmt.Errorf("file.upload.v2: channel cannot be empty") + } + u, err := api.getUploadURLExternal(ctx, getUploadURLExternalParameters{ + altText: params.AltTxt, + fileName: params.Filename, + fileSize: params.FileSize, + snippetText: params.SnippetText, + }) + if err != nil { + return nil, err + } + + err = api.uploadToURL(ctx, uploadToURLParameters{ + UploadURL: u.UploadURL, + Reader: params.Reader, + File: params.File, + Content: params.Content, + Filename: params.Filename, + }) + if err != nil { + return nil, err + } + + c, err := api.completeUploadExternal(ctx, u.FileID, completeUploadExternalParameters{ + title: params.Title, + channel: params.Channel, + initialComment: params.InitialComment, + threadTimestamp: params.ThreadTimestamp, + }) + if err != nil { + return nil, err + } + if len(c.Files) != 1 { + return nil, fmt.Errorf("file.upload.v2: something went wrong; received %d files instead of 1", len(c.Files)) + } + + return &c.Files[0], nil +} diff --git a/vendor/github.com/slack-go/slack/misc.go b/vendor/github.com/slack-go/slack/misc.go index 9180116a..7e5a8d54 100644 --- a/vendor/github.com/slack-go/slack/misc.go +++ b/vendor/github.com/slack-go/slack/misc.go @@ -307,6 +307,9 @@ type responseParser func(*http.Response) error func newJSONParser(dst interface{}) responseParser { return func(resp *http.Response) error { + if dst == nil { + return nil + } return json.NewDecoder(resp.Body).Decode(dst) } } diff --git a/vendor/github.com/slack-go/slack/team.go b/vendor/github.com/slack-go/slack/team.go index 029e2b5b..d21a1b64 100644 --- a/vendor/github.com/slack-go/slack/team.go +++ b/vendor/github.com/slack-go/slack/team.go @@ -24,6 +24,26 @@ type TeamInfo struct { Icon map[string]interface{} `json:"icon"` } +type TeamProfileResponse struct { + Profile TeamProfile `json:"profile"` + SlackResponse +} + +type TeamProfile struct { + Fields []TeamProfileField `json:"fields"` +} + +type TeamProfileField struct { + ID string `json:"id"` + Ordering int `json:"ordering"` + Label string `json:"label"` + Hint string `json:"hint"` + Type string `json:"type"` + PossibleValues []string `json:"possible_values"` + IsHidden bool `json:"is_hidden"` + Options map[string]bool `json:"options"` +} + type LoginResponse struct { Logins []Login `json:"logins"` Paging `json:"paging"` @@ -95,11 +115,41 @@ func (api *Client) accessLogsRequest(ctx context.Context, path string, values ur return response, response.Err() } +func (api *Client) teamProfileRequest(ctx context.Context, client httpClient, path string, values url.Values) (*TeamProfileResponse, error) { + response := &TeamProfileResponse{} + err := api.postMethod(ctx, path, values, response) + if err != nil { + return nil, err + } + return response, response.Err() +} + // GetTeamInfo gets the Team Information of the user func (api *Client) GetTeamInfo() (*TeamInfo, error) { return api.GetTeamInfoContext(context.Background()) } +// GetOtherTeamInfoContext gets Team information for any team with a custom context +func (api *Client) GetOtherTeamInfoContext(ctx context.Context, team string) (*TeamInfo, error) { + if team == "" { + return api.GetTeamInfoContext(ctx) + } + values := url.Values{ + "token": {api.token}, + } + values.Add("team", team) + response, err := api.teamRequest(ctx, "team.info", values) + if err != nil { + return nil, err + } + return &response.Team, nil +} + +// GetOtherTeamInfo gets Team information for any team +func (api *Client) GetOtherTeamInfo(team string) (*TeamInfo, error) { + return api.GetOtherTeamInfoContext(context.Background(), team) +} + // GetTeamInfoContext gets the Team Information of the user with a custom context func (api *Client) GetTeamInfoContext(ctx context.Context) (*TeamInfo, error) { values := url.Values{ @@ -113,6 +163,25 @@ func (api *Client) GetTeamInfoContext(ctx context.Context) (*TeamInfo, error) { return &response.Team, nil } +// GetTeamProfile gets the Team Profile settings of the user +func (api *Client) GetTeamProfile() (*TeamProfile, error) { + return api.GetTeamProfileContext(context.Background()) +} + +// GetTeamProfileContext gets the Team Profile settings of the user with a custom context +func (api *Client) GetTeamProfileContext(ctx context.Context) (*TeamProfile, error) { + values := url.Values{ + "token": {api.token}, + } + + response, err := api.teamProfileRequest(ctx, api.httpclient, "team.profile.get", values) + if err != nil { + return nil, err + } + return &response.Profile, nil + +} + // GetAccessLogs retrieves a page of logins according to the parameters given func (api *Client) GetAccessLogs(params AccessLogParameters) ([]Login, *Paging, error) { return api.GetAccessLogsContext(context.Background(), params) diff --git a/vendor/github.com/slack-go/slack/users.go b/vendor/github.com/slack-go/slack/users.go index d22b44f8..55f42118 100644 --- a/vendor/github.com/slack-go/slack/users.go +++ b/vendor/github.com/slack-go/slack/users.go @@ -17,30 +17,38 @@ const ( // UserProfile contains all the information details of a given user type UserProfile struct { - FirstName string `json:"first_name"` - LastName string `json:"last_name"` - RealName string `json:"real_name"` - RealNameNormalized string `json:"real_name_normalized"` - DisplayName string `json:"display_name"` - DisplayNameNormalized string `json:"display_name_normalized"` - Email string `json:"email"` - Skype string `json:"skype"` - Phone string `json:"phone"` - Image24 string `json:"image_24"` - Image32 string `json:"image_32"` - Image48 string `json:"image_48"` - Image72 string `json:"image_72"` - Image192 string `json:"image_192"` - Image512 string `json:"image_512"` - ImageOriginal string `json:"image_original"` - Title string `json:"title"` - BotID string `json:"bot_id,omitempty"` - ApiAppID string `json:"api_app_id,omitempty"` - StatusText string `json:"status_text,omitempty"` - StatusEmoji string `json:"status_emoji,omitempty"` - StatusExpiration int `json:"status_expiration"` - Team string `json:"team"` - Fields UserProfileCustomFields `json:"fields"` + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + RealName string `json:"real_name"` + RealNameNormalized string `json:"real_name_normalized"` + DisplayName string `json:"display_name"` + DisplayNameNormalized string `json:"display_name_normalized"` + Email string `json:"email"` + Skype string `json:"skype"` + Phone string `json:"phone"` + Image24 string `json:"image_24"` + Image32 string `json:"image_32"` + Image48 string `json:"image_48"` + Image72 string `json:"image_72"` + Image192 string `json:"image_192"` + Image512 string `json:"image_512"` + ImageOriginal string `json:"image_original"` + Title string `json:"title"` + BotID string `json:"bot_id,omitempty"` + ApiAppID string `json:"api_app_id,omitempty"` + StatusText string `json:"status_text,omitempty"` + StatusEmoji string `json:"status_emoji,omitempty"` + StatusEmojiDisplayInfo []UserProfileStatusEmojiDisplayInfo `json:"status_emoji_display_info,omitempty"` + StatusExpiration int `json:"status_expiration"` + Team string `json:"team"` + Fields UserProfileCustomFields `json:"fields"` +} + +type UserProfileStatusEmojiDisplayInfo struct { + EmojiName string `json:"emoji_name"` + DisplayAlias string `json:"display_alias,omitempty"` + DisplayURL string `json:"display_url,omitempty"` + Unicode string `json:"unicode,omitempty"` } // UserProfileCustomFields represents user profile's custom fields. @@ -556,6 +564,55 @@ func (api *Client) SetUserRealNameContextWithUser(ctx context.Context, user, rea return response.Err() } +// SetUserCustomFields sets Custom Profile fields on the provided users account. Due to the non-repeating elements +// within the request, a map fields is required. The key in the map signifies the field that will be updated. +// +// Note: You may need to change the way the custom field is populated within the Profile section of the Admin Console from +// SCIM or User Entered to API. +// +// See GetTeamProfile for information to retrieve possible fields for your account. +func (api *Client) SetUserCustomFields(userID string, customFields map[string]UserProfileCustomField) error { + return api.SetUserCustomFieldsContext(context.Background(), userID, customFields) +} + +// SetUserCustomFieldsContext will set a users custom profile field with context. +// +// For more information see SetUserCustomFields +func (api *Client) SetUserCustomFieldsContext(ctx context.Context, userID string, customFields map[string]UserProfileCustomField) error { + + // Convert data to data type with custom marshall / unmarshall + // For more information, see UserProfileCustomFields definition. + updateFields := UserProfileCustomFields{} + updateFields.SetMap(customFields) + + // This anonymous struct is needed to set the fields level of the request data. The base struct for + // UserProfileCustomFields has an unexported variable named fields that does not contain a struct tag, + // which has resulted in this configuration. + profile, err := json.Marshal(&struct { + Fields UserProfileCustomFields `json:"fields"` + }{ + Fields: updateFields, + }) + + if err != nil { + return err + } + + values := url.Values{ + "token": {api.token}, + "user": {userID}, + "profile": {string(profile)}, + } + + response := &userResponseFull{} + if err := postForm(ctx, api.httpclient, APIURL+"users.profile.set", values, response, api); err != nil { + return err + } + + return response.Err() + +} + // SetUserCustomStatus will set a custom status and emoji for the currently // authenticated user. If statusEmoji is "" and statusText is not, the Slack API // will automatically set it to ":speech_balloon:". Otherwise, if both are "" diff --git a/vendor/github.com/slack-go/slack/webhooks.go b/vendor/github.com/slack-go/slack/webhooks.go index 2f8fb47f..e3233536 100644 --- a/vendor/github.com/slack-go/slack/webhooks.go +++ b/vendor/github.com/slack-go/slack/webhooks.go @@ -21,8 +21,8 @@ type WebhookMessage struct { Parse string `json:"parse,omitempty"` Blocks *Blocks `json:"blocks,omitempty"` ResponseType string `json:"response_type,omitempty"` - ReplaceOriginal bool `json:"replace_original,omitempty"` - DeleteOriginal bool `json:"delete_original,omitempty"` + ReplaceOriginal bool `json:"replace_original"` + DeleteOriginal bool `json:"delete_original"` ReplyBroadcast bool `json:"reply_broadcast,omitempty"` } diff --git a/vendor/github.com/slack-go/slack/websocket_reactions.go b/vendor/github.com/slack-go/slack/websocket_reactions.go index e4973878..6098a6ca 100644 --- a/vendor/github.com/slack-go/slack/websocket_reactions.go +++ b/vendor/github.com/slack-go/slack/websocket_reactions.go @@ -1,7 +1,7 @@ package slack -// reactionItem is a lighter-weight item than is returned by the reactions list. -type reactionItem struct { +// ReactionItem is a lighter-weight item than is returned by the reactions list. +type ReactionItem struct { Type string `json:"type"` Channel string `json:"channel,omitempty"` File string `json:"file,omitempty"` @@ -9,17 +9,17 @@ type reactionItem struct { Timestamp string `json:"ts,omitempty"` } -type reactionEvent struct { +type ReactionEvent struct { Type string `json:"type"` User string `json:"user"` ItemUser string `json:"item_user"` - Item reactionItem `json:"item"` + Item ReactionItem `json:"item"` Reaction string `json:"reaction"` EventTimestamp string `json:"event_ts"` } // ReactionAddedEvent represents the Reaction added event -type ReactionAddedEvent reactionEvent +type ReactionAddedEvent ReactionEvent // ReactionRemovedEvent represents the Reaction removed event -type ReactionRemovedEvent reactionEvent +type ReactionRemovedEvent ReactionEvent diff --git a/vendor/github.com/slack-go/slack/workflow_step_execute.go b/vendor/github.com/slack-go/slack/workflow_step_execute.go index 18516f23..32db9ba0 100644 --- a/vendor/github.com/slack-go/slack/workflow_step_execute.go +++ b/vendor/github.com/slack-go/slack/workflow_step_execute.go @@ -19,10 +19,10 @@ type ( } ) -type WorkflowStepCompletedRequestOption func(opt WorkflowStepCompletedRequest) error +type WorkflowStepCompletedRequestOption func(opt *WorkflowStepCompletedRequest) error func WorkflowStepCompletedRequestOptionOutput(outputs map[string]string) WorkflowStepCompletedRequestOption { - return func(opt WorkflowStepCompletedRequest) error { + return func(opt *WorkflowStepCompletedRequest) error { if len(outputs) > 0 { opt.Outputs = outputs } @@ -33,7 +33,7 @@ func WorkflowStepCompletedRequestOptionOutput(outputs map[string]string) Workflo // WorkflowStepCompleted indicates step is completed func (api *Client) WorkflowStepCompleted(workflowStepExecuteID string, options ...WorkflowStepCompletedRequestOption) error { // More information: https://api.slack.com/methods/workflows.stepCompleted - r := WorkflowStepCompletedRequest{ + r := &WorkflowStepCompletedRequest{ WorkflowStepExecuteID: workflowStepExecuteID, } for _, option := range options { diff --git a/vendor/github.com/spf13/afero/.travis.yml b/vendor/github.com/spf13/afero/.travis.yml deleted file mode 100644 index e944f594..00000000 --- a/vendor/github.com/spf13/afero/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -sudo: false -language: go -arch: - - amd64 - - ppc64e - -go: - - "1.14" - - "1.15" - - "1.16" - - tip - -os: - - linux - - osx - -matrix: - allow_failures: - - go: tip - fast_finish: true - -script: - - go build -v ./... - - go test -count=1 -cover -race -v ./... - - go vet ./... - - FILES=$(gofmt -s -l . zipfs sftpfs mem tarfs); if [[ -n "${FILES}" ]]; then echo "You have go format errors; gofmt your changes"; exit 1; fi diff --git a/vendor/github.com/spf13/afero/README.md b/vendor/github.com/spf13/afero/README.md index cab257f5..3bafbfdf 100644 --- a/vendor/github.com/spf13/afero/README.md +++ b/vendor/github.com/spf13/afero/README.md @@ -2,7 +2,7 @@ A FileSystem Abstraction System for Go -[![Build Status](https://travis-ci.org/spf13/afero.svg)](https://travis-ci.org/spf13/afero) [![Build status](https://ci.appveyor.com/api/projects/status/github/spf13/afero?branch=master&svg=true)](https://ci.appveyor.com/project/spf13/afero) [![GoDoc](https://godoc.org/github.com/spf13/afero?status.svg)](https://godoc.org/github.com/spf13/afero) [![Join the chat at https://gitter.im/spf13/afero](https://badges.gitter.im/Dev%20Chat.svg)](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Test](https://github.com/spf13/afero/actions/workflows/test.yml/badge.svg)](https://github.com/spf13/afero/actions/workflows/test.yml) [![GoDoc](https://godoc.org/github.com/spf13/afero?status.svg)](https://godoc.org/github.com/spf13/afero) [![Join the chat at https://gitter.im/spf13/afero](https://badges.gitter.im/Dev%20Chat.svg)](https://gitter.im/spf13/afero?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # Overview diff --git a/vendor/github.com/spf13/afero/afero.go b/vendor/github.com/spf13/afero/afero.go index 469ff7d2..199480cd 100644 --- a/vendor/github.com/spf13/afero/afero.go +++ b/vendor/github.com/spf13/afero/afero.go @@ -103,8 +103,8 @@ type Fs interface { var ( ErrFileClosed = errors.New("File is closed") - ErrOutOfRange = errors.New("Out of range") - ErrTooLarge = errors.New("Too large") + ErrOutOfRange = errors.New("out of range") + ErrTooLarge = errors.New("too large") ErrFileNotFound = os.ErrNotExist ErrFileExists = os.ErrExist ErrDestinationExists = os.ErrExist diff --git a/vendor/github.com/spf13/afero/appveyor.yml b/vendor/github.com/spf13/afero/appveyor.yml index 5d2f34bf..65e20e8c 100644 --- a/vendor/github.com/spf13/afero/appveyor.yml +++ b/vendor/github.com/spf13/afero/appveyor.yml @@ -1,3 +1,5 @@ +# This currently does nothing. We have moved to GitHub action, but this is kept +# until spf13 has disabled this project in AppVeyor. version: '{build}' clone_folder: C:\gopath\src\github.com\spf13\afero environment: @@ -6,10 +8,3 @@ build_script: - cmd: >- go version - go env - - go get -v github.com/spf13/afero/... - - go build -v github.com/spf13/afero/... -test_script: -- cmd: go test -count=1 -cover -race -v github.com/spf13/afero/... diff --git a/vendor/github.com/spf13/afero/basepath.go b/vendor/github.com/spf13/afero/basepath.go index 4f983282..70a1d916 100644 --- a/vendor/github.com/spf13/afero/basepath.go +++ b/vendor/github.com/spf13/afero/basepath.go @@ -1,6 +1,7 @@ package afero import ( + "io/fs" "os" "path/filepath" "runtime" @@ -8,7 +9,10 @@ import ( "time" ) -var _ Lstater = (*BasePathFs)(nil) +var ( + _ Lstater = (*BasePathFs)(nil) + _ fs.ReadDirFile = (*BasePathFile)(nil) +) // The BasePathFs restricts all operations to a given path within an Fs. // The given file name to the operations on this Fs will be prepended with @@ -33,6 +37,14 @@ func (f *BasePathFile) Name() string { return strings.TrimPrefix(sourcename, filepath.Clean(f.path)) } +func (f *BasePathFile) ReadDir(n int) ([]fs.DirEntry, error) { + if rdf, ok := f.File.(fs.ReadDirFile); ok { + return rdf.ReadDir(n) + + } + return readDirFile{f.File}.ReadDir(n) +} + func NewBasePathFs(source Fs, path string) Fs { return &BasePathFs{source: source, path: path} } diff --git a/vendor/github.com/spf13/afero/const_bsds.go b/vendor/github.com/spf13/afero/const_bsds.go index 18b45824..eed0f225 100644 --- a/vendor/github.com/spf13/afero/const_bsds.go +++ b/vendor/github.com/spf13/afero/const_bsds.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build aix || darwin || openbsd || freebsd || netbsd || dragonfly // +build aix darwin openbsd freebsd netbsd dragonfly package afero diff --git a/vendor/github.com/spf13/afero/const_win_unix.go b/vendor/github.com/spf13/afero/const_win_unix.go index 2b850e4d..004d57e2 100644 --- a/vendor/github.com/spf13/afero/const_win_unix.go +++ b/vendor/github.com/spf13/afero/const_win_unix.go @@ -10,12 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +build !darwin -// +build !openbsd -// +build !freebsd -// +build !dragonfly -// +build !netbsd -// +build !aix +//go:build !darwin && !openbsd && !freebsd && !dragonfly && !netbsd && !aix +// +build !darwin,!openbsd,!freebsd,!dragonfly,!netbsd,!aix package afero diff --git a/vendor/github.com/spf13/afero/httpFs.go b/vendor/github.com/spf13/afero/httpFs.go index 2b86e30d..ac0de6d5 100644 --- a/vendor/github.com/spf13/afero/httpFs.go +++ b/vendor/github.com/spf13/afero/httpFs.go @@ -29,7 +29,7 @@ type httpDir struct { } func (d httpDir) Open(name string) (http.File, error) { - if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 || + if filepath.Separator != '/' && strings.ContainsRune(name, filepath.Separator) || strings.Contains(name, "\x00") { return nil, errors.New("http: invalid character in file path") } diff --git a/vendor/github.com/spf13/afero/internal/common/adapters.go b/vendor/github.com/spf13/afero/internal/common/adapters.go new file mode 100644 index 00000000..60685caa --- /dev/null +++ b/vendor/github.com/spf13/afero/internal/common/adapters.go @@ -0,0 +1,27 @@ +// Copyright © 2022 Steve Francia . +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import "io/fs" + +// FileInfoDirEntry provides an adapter from os.FileInfo to fs.DirEntry +type FileInfoDirEntry struct { + fs.FileInfo +} + +var _ fs.DirEntry = FileInfoDirEntry{} + +func (d FileInfoDirEntry) Type() fs.FileMode { return d.FileInfo.Mode().Type() } + +func (d FileInfoDirEntry) Info() (fs.FileInfo, error) { return d.FileInfo, nil } diff --git a/vendor/github.com/spf13/afero/iofs.go b/vendor/github.com/spf13/afero/iofs.go index c8034553..938b9316 100644 --- a/vendor/github.com/spf13/afero/iofs.go +++ b/vendor/github.com/spf13/afero/iofs.go @@ -1,3 +1,4 @@ +//go:build go1.16 // +build go1.16 package afero @@ -7,7 +8,10 @@ import ( "io/fs" "os" "path" + "sort" "time" + + "github.com/spf13/afero/internal/common" ) // IOFS adopts afero.Fs to stdlib io/fs.FS @@ -66,14 +70,31 @@ func (iofs IOFS) Glob(pattern string) ([]string, error) { } func (iofs IOFS) ReadDir(name string) ([]fs.DirEntry, error) { - items, err := ReadDir(iofs.Fs, name) + f, err := iofs.Fs.Open(name) if err != nil { return nil, iofs.wrapError("readdir", name, err) } + defer f.Close() + + if rdf, ok := f.(fs.ReadDirFile); ok { + items, err := rdf.ReadDir(-1) + if err != nil { + return nil, iofs.wrapError("readdir", name, err) + } + sort.Slice(items, func(i, j int) bool { return items[i].Name() < items[j].Name() }) + return items, nil + } + + items, err := f.Readdir(-1) + if err != nil { + return nil, iofs.wrapError("readdir", name, err) + } + sort.Sort(byName(items)) + ret := make([]fs.DirEntry, len(items)) for i := range items { - ret[i] = dirEntry{items[i]} + ret[i] = common.FileInfoDirEntry{FileInfo: items[i]} } return ret, nil @@ -108,17 +129,6 @@ func (IOFS) wrapError(op, path string, err error) error { } } -// dirEntry provides adapter from os.FileInfo to fs.DirEntry -type dirEntry struct { - fs.FileInfo -} - -var _ fs.DirEntry = dirEntry{} - -func (d dirEntry) Type() fs.FileMode { return d.FileInfo.Mode().Type() } - -func (d dirEntry) Info() (fs.FileInfo, error) { return d.FileInfo, nil } - // readDirFile provides adapter from afero.File to fs.ReadDirFile needed for correct Open type readDirFile struct { File @@ -134,7 +144,7 @@ func (r readDirFile) ReadDir(n int) ([]fs.DirEntry, error) { ret := make([]fs.DirEntry, len(items)) for i := range items { - ret[i] = dirEntry{items[i]} + ret[i] = common.FileInfoDirEntry{FileInfo: items[i]} } return ret, nil diff --git a/vendor/github.com/spf13/afero/ioutil.go b/vendor/github.com/spf13/afero/ioutil.go index a403133e..386c9cdc 100644 --- a/vendor/github.com/spf13/afero/ioutil.go +++ b/vendor/github.com/spf13/afero/ioutil.go @@ -141,7 +141,7 @@ func WriteFile(fs Fs, filename string, data []byte, perm os.FileMode) error { // We generate random temporary file names so that there's a good // chance the file doesn't exist yet - keeps the number of tries in // TempFile to a minimum. -var rand uint32 +var randNum uint32 var randmu sync.Mutex func reseed() uint32 { @@ -150,12 +150,12 @@ func reseed() uint32 { func nextRandom() string { randmu.Lock() - r := rand + r := randNum if r == 0 { r = reseed() } r = r*1664525 + 1013904223 // constants from Numerical Recipes - rand = r + randNum = r randmu.Unlock() return strconv.Itoa(int(1e9 + r%1e9))[1:] } @@ -194,7 +194,7 @@ func TempFile(fs Fs, dir, pattern string) (f File, err error) { if os.IsExist(err) { if nconflict++; nconflict > 10 { randmu.Lock() - rand = reseed() + randNum = reseed() randmu.Unlock() } continue @@ -226,7 +226,7 @@ func TempDir(fs Fs, dir, prefix string) (name string, err error) { if os.IsExist(err) { if nconflict++; nconflict > 10 { randmu.Lock() - rand = reseed() + randNum = reseed() randmu.Unlock() } continue diff --git a/vendor/github.com/spf13/afero/mem/file.go b/vendor/github.com/spf13/afero/mem/file.go index 5ef8b6a3..3cf4693b 100644 --- a/vendor/github.com/spf13/afero/mem/file.go +++ b/vendor/github.com/spf13/afero/mem/file.go @@ -18,15 +18,20 @@ import ( "bytes" "errors" "io" + "io/fs" "os" "path/filepath" "sync" "sync/atomic" "time" + + "github.com/spf13/afero/internal/common" ) const FilePathSeparator = string(filepath.Separator) +var _ fs.ReadDirFile = &File{} + type File struct { // atomic requires 64-bit alignment for struct field access at int64 @@ -183,10 +188,23 @@ func (f *File) Readdirnames(n int) (names []string, err error) { return names, err } +// Implements fs.ReadDirFile +func (f *File) ReadDir(n int) ([]fs.DirEntry, error) { + fi, err := f.Readdir(n) + if err != nil { + return nil, err + } + di := make([]fs.DirEntry, len(fi)) + for i, f := range fi { + di[i] = common.FileInfoDirEntry{FileInfo: f} + } + return di, nil +} + func (f *File) Read(b []byte) (n int, err error) { f.fileData.Lock() defer f.fileData.Unlock() - if f.closed == true { + if f.closed { return 0, ErrFileClosed } if len(b) > 0 && int(f.at) == len(f.fileData.data) { @@ -214,7 +232,7 @@ func (f *File) ReadAt(b []byte, off int64) (n int, err error) { } func (f *File) Truncate(size int64) error { - if f.closed == true { + if f.closed { return ErrFileClosed } if f.readOnly { @@ -236,7 +254,7 @@ func (f *File) Truncate(size int64) error { } func (f *File) Seek(offset int64, whence int) (int64, error) { - if f.closed == true { + if f.closed { return 0, ErrFileClosed } switch whence { @@ -251,7 +269,7 @@ func (f *File) Seek(offset int64, whence int) (int64, error) { } func (f *File) Write(b []byte) (n int, err error) { - if f.closed == true { + if f.closed { return 0, ErrFileClosed } if f.readOnly { @@ -330,8 +348,8 @@ func (s *FileInfo) Size() int64 { var ( ErrFileClosed = errors.New("File is closed") - ErrOutOfRange = errors.New("Out of range") - ErrTooLarge = errors.New("Too large") + ErrOutOfRange = errors.New("out of range") + ErrTooLarge = errors.New("too large") ErrFileNotFound = os.ErrNotExist ErrFileExists = os.ErrExist ErrDestinationExists = os.ErrExist diff --git a/vendor/github.com/spf13/afero/memmap.go b/vendor/github.com/spf13/afero/memmap.go index ea0798d8..d06975e7 100644 --- a/vendor/github.com/spf13/afero/memmap.go +++ b/vendor/github.com/spf13/afero/memmap.go @@ -142,6 +142,11 @@ func (m *MemMapFs) Mkdir(name string, perm os.FileMode) error { } m.mu.Lock() + // Dobule check that it doesn't exist. + if _, ok := m.getData()[name]; ok { + m.mu.Unlock() + return &os.PathError{Op: "mkdir", Path: name, Err: ErrFileExists} + } item := mem.CreateDir(name) mem.SetMode(item, os.ModeDir|perm) m.getData()[name] = item diff --git a/vendor/github.com/spf13/afero/unionFile.go b/vendor/github.com/spf13/afero/unionFile.go index 34f99a40..333d367f 100644 --- a/vendor/github.com/spf13/afero/unionFile.go +++ b/vendor/github.com/spf13/afero/unionFile.go @@ -65,7 +65,7 @@ func (f *UnionFile) ReadAt(s []byte, o int64) (int, error) { if f.Layer != nil { n, err := f.Layer.ReadAt(s, o) if (err == nil || err == io.EOF) && f.Base != nil { - _, err = f.Base.Seek(o+int64(n), os.SEEK_SET) + _, err = f.Base.Seek(o+int64(n), io.SeekStart) } return n, err } diff --git a/vendor/github.com/spf13/afero/util.go b/vendor/github.com/spf13/afero/util.go index 4f253f48..cb7de23f 100644 --- a/vendor/github.com/spf13/afero/util.go +++ b/vendor/github.com/spf13/afero/util.go @@ -25,6 +25,7 @@ import ( "strings" "unicode" + "golang.org/x/text/runes" "golang.org/x/text/transform" "golang.org/x/text/unicode/norm" ) @@ -158,16 +159,12 @@ func UnicodeSanitize(s string) string { // Transform characters with accents into plain forms. func NeuterAccents(s string) string { - t := transform.Chain(norm.NFD, transform.RemoveFunc(isMn), norm.NFC) + t := transform.Chain(norm.NFD, runes.Remove(runes.In(unicode.Mn)), norm.NFC) result, _, _ := transform.String(t, string(s)) return result } -func isMn(r rune) bool { - return unicode.Is(unicode.Mn, r) // Mn: nonspacing marks -} - func (a Afero) FileContainsBytes(filename string, subslice []byte) (bool, error) { return FileContainsBytes(a.Fs, filename, subslice) } @@ -299,6 +296,9 @@ func IsEmpty(fs Fs, path string) (bool, error) { } defer f.Close() list, err := f.Readdir(-1) + if err != nil { + return false, err + } return len(list) == 0, nil } return fi.Size() == 0, nil diff --git a/vendor/github.com/spf13/viper/Makefile b/vendor/github.com/spf13/viper/Makefile index 02d3e371..3f4234d3 100644 --- a/vendor/github.com/spf13/viper/Makefile +++ b/vendor/github.com/spf13/viper/Makefile @@ -16,7 +16,7 @@ endif # Dependency versions GOTESTSUM_VERSION = 1.8.0 -GOLANGCI_VERSION = 1.45.2 +GOLANGCI_VERSION = 1.50.1 # Add the ability to override some variables # Use with care @@ -48,7 +48,7 @@ bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION} @ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint bin/golangci-lint-${GOLANGCI_VERSION}: @mkdir -p bin - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ./bin/ v${GOLANGCI_VERSION} + curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b ./bin/ v${GOLANGCI_VERSION} @mv bin/golangci-lint "$@" .PHONY: lint diff --git a/vendor/github.com/spf13/viper/README.md b/vendor/github.com/spf13/viper/README.md index c14e8927..cd392905 100644 --- a/vendor/github.com/spf13/viper/README.md +++ b/vendor/github.com/spf13/viper/README.md @@ -8,10 +8,10 @@ [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#configuration) [![run on repl.it](https://repl.it/badge/github/sagikazarmark/Viper-example)](https://repl.it/@sagikazarmark/Viper-example#main.go) -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/spf13/viper/CI?style=flat-square)](https://github.com/spf13/viper/actions?query=workflow%3ACI) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spf13/viper/ci.yaml?branch=master&style=flat-square)](https://github.com/spf13/viper/actions?query=workflow%3ACI) [![Join the chat at https://gitter.im/spf13/viper](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/spf13/viper?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Go Report Card](https://goreportcard.com/badge/github.com/spf13/viper?style=flat-square)](https://goreportcard.com/report/github.com/spf13/viper) -![Go Version](https://img.shields.io/badge/go%20version-%3E=1.15-61CFDD.svg?style=flat-square) +![Go Version](https://img.shields.io/badge/go%20version-%3E=1.16-61CFDD.svg?style=flat-square) [![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/spf13/viper)](https://pkg.go.dev/mod/github.com/spf13/viper) **Go configuration with fangs!** @@ -40,8 +40,8 @@ go get github.com/spf13/viper ## What is Viper? -Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed -to work within an application, and can handle all types of configuration needs +Viper is a complete configuration solution for Go applications including [12-Factor apps](https://12factor.net/#the_twelve_factors). +It is designed to work within an application, and can handle all types of configuration needs and formats. It supports: * setting defaults @@ -119,7 +119,7 @@ viper.AddConfigPath("$HOME/.appname") // call multiple times to add many search viper.AddConfigPath(".") // optionally look for config in the working directory err := viper.ReadInConfig() // Find and read the config file if err != nil { // Handle errors reading the config file - panic(fmt.Errorf("Fatal error config file: %w \n", err)) + panic(fmt.Errorf("fatal error config file: %w", err)) } ``` @@ -447,6 +447,13 @@ viper.SetConfigType("json") // because there is no file extension in a stream of err := viper.ReadRemoteConfig() ``` +#### etcd3 +```go +viper.AddRemoteProvider("etcd3", "http://127.0.0.1:4001","/config/hugo.json") +viper.SetConfigType("json") // because there is no file extension in a stream of bytes, supported extensions are "json", "toml", "yaml", "yml", "properties", "props", "prop", "env", "dotenv" +err := viper.ReadRemoteConfig() +``` + #### Consul You need to set a key to Consul key/value storage with JSON value containing your desired config. For example, create a Consul key/value store key `MY_CONSUL_KEY` with value: @@ -594,7 +601,7 @@ configuration level. Viper can access array indices by using numbers in the path. For example: -```json +```jsonc { "host": { "address": "localhost", @@ -622,7 +629,7 @@ GetInt("host.ports.1") // returns 6029 Lastly, if there exists a key that matches the delimited key path, its value will be returned instead. E.g. -```json +```jsonc { "datastore.metric.host": "0.0.0.0", "host": { diff --git a/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go b/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go index 45fddc8b..a993c599 100644 --- a/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go +++ b/vendor/github.com/spf13/viper/internal/encoding/toml/codec.go @@ -1,39 +1,16 @@ -//go:build viper_toml1 -// +build viper_toml1 - package toml import ( - "github.com/pelletier/go-toml" + "github.com/pelletier/go-toml/v2" ) // Codec implements the encoding.Encoder and encoding.Decoder interfaces for TOML encoding. type Codec struct{} func (Codec) Encode(v map[string]interface{}) ([]byte, error) { - t, err := toml.TreeFromMap(v) - if err != nil { - return nil, err - } - - s, err := t.ToTomlString() - if err != nil { - return nil, err - } - - return []byte(s), nil + return toml.Marshal(v) } func (Codec) Decode(b []byte, v map[string]interface{}) error { - tree, err := toml.LoadBytes(b) - if err != nil { - return err - } - - tmap := tree.ToMap() - for key, value := range tmap { - v[key] = value - } - - return nil + return toml.Unmarshal(b, &v) } diff --git a/vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go b/vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go deleted file mode 100644 index 112c6d37..00000000 --- a/vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build !viper_toml1 -// +build !viper_toml1 - -package toml - -import ( - "github.com/pelletier/go-toml/v2" -) - -// Codec implements the encoding.Encoder and encoding.Decoder interfaces for TOML encoding. -type Codec struct{} - -func (Codec) Encode(v map[string]interface{}) ([]byte, error) { - return toml.Marshal(v) -} - -func (Codec) Decode(b []byte, v map[string]interface{}) error { - return toml.Unmarshal(b, &v) -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go index 24cc19df..82dc136a 100644 --- a/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go +++ b/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go @@ -1,6 +1,6 @@ package yaml -// import "gopkg.in/yaml.v2" +import "gopkg.in/yaml.v3" // Codec implements the encoding.Encoder and encoding.Decoder interfaces for YAML encoding. type Codec struct{} diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go deleted file mode 100644 index 4c398c2f..00000000 --- a/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go +++ /dev/null @@ -1,14 +0,0 @@ -//go:build viper_yaml2 -// +build viper_yaml2 - -package yaml - -import yamlv2 "gopkg.in/yaml.v2" - -var yaml = struct { - Marshal func(in interface{}) (out []byte, err error) - Unmarshal func(in []byte, out interface{}) (err error) -}{ - Marshal: yamlv2.Marshal, - Unmarshal: yamlv2.Unmarshal, -} diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go deleted file mode 100644 index 3a4775ce..00000000 --- a/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go +++ /dev/null @@ -1,14 +0,0 @@ -//go:build !viper_yaml2 -// +build !viper_yaml2 - -package yaml - -import yamlv3 "gopkg.in/yaml.v3" - -var yaml = struct { - Marshal func(in interface{}) (out []byte, err error) - Unmarshal func(in []byte, out interface{}) (err error) -}{ - Marshal: yamlv3.Marshal, - Unmarshal: yamlv3.Unmarshal, -} diff --git a/vendor/github.com/spf13/viper/logger.go b/vendor/github.com/spf13/viper/logger.go index 0115067a..a64e1446 100644 --- a/vendor/github.com/spf13/viper/logger.go +++ b/vendor/github.com/spf13/viper/logger.go @@ -7,8 +7,8 @@ import ( ) // Logger is a unified interface for various logging use cases and practices, including: -// - leveled logging -// - structured logging +// - leveled logging +// - structured logging type Logger interface { // Trace logs a Trace event. // diff --git a/vendor/github.com/spf13/viper/util.go b/vendor/github.com/spf13/viper/util.go index ee7a86d9..64e65750 100644 --- a/vendor/github.com/spf13/viper/util.go +++ b/vendor/github.com/spf13/viper/util.go @@ -64,18 +64,25 @@ func copyAndInsensitiviseMap(m map[string]interface{}) map[string]interface{} { return nm } +func insensitiviseVal(val interface{}) interface{} { + switch val.(type) { + case map[interface{}]interface{}: + // nested map: cast and recursively insensitivise + val = cast.ToStringMap(val) + insensitiviseMap(val.(map[string]interface{})) + case map[string]interface{}: + // nested map: recursively insensitivise + insensitiviseMap(val.(map[string]interface{})) + case []interface{}: + // nested array: recursively insensitivise + insensitiveArray(val.([]interface{})) + } + return val +} + func insensitiviseMap(m map[string]interface{}) { for key, val := range m { - switch val.(type) { - case map[interface{}]interface{}: - // nested map: cast and recursively insensitivise - val = cast.ToStringMap(val) - insensitiviseMap(val.(map[string]interface{})) - case map[string]interface{}: - // nested map: recursively insensitivise - insensitiviseMap(val.(map[string]interface{})) - } - + val = insensitiviseVal(val) lower := strings.ToLower(key) if key != lower { // remove old key (not lower-cased) @@ -86,6 +93,12 @@ func insensitiviseMap(m map[string]interface{}) { } } +func insensitiveArray(a []interface{}) { + for i, val := range a { + a[i] = insensitiviseVal(val) + } +} + func absPathify(logger Logger, inPath string) string { logger.Info("trying to resolve absolute path", "path", inPath) diff --git a/vendor/github.com/spf13/viper/viper.go b/vendor/github.com/spf13/viper/viper.go index a3812e92..06610fc5 100644 --- a/vendor/github.com/spf13/viper/viper.go +++ b/vendor/github.com/spf13/viper/viper.go @@ -132,10 +132,10 @@ type DecoderConfigOption func(*mapstructure.DecoderConfig) // DecodeHook returns a DecoderConfigOption which overrides the default // DecoderConfig.DecodeHook value, the default is: // -// mapstructure.ComposeDecodeHookFunc( -// mapstructure.StringToTimeDurationHookFunc(), -// mapstructure.StringToSliceHookFunc(","), -// ) +// mapstructure.ComposeDecodeHookFunc( +// mapstructure.StringToTimeDurationHookFunc(), +// mapstructure.StringToSliceHookFunc(","), +// ) func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption { return func(c *mapstructure.DecoderConfig) { c.DecodeHook = hook @@ -156,18 +156,18 @@ func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption { // // For example, if values from the following sources were loaded: // -// Defaults : { -// "secret": "", -// "user": "default", -// "endpoint": "https://localhost" -// } -// Config : { -// "user": "root" -// "secret": "defaultsecret" -// } -// Env : { -// "secret": "somesecretkey" -// } +// Defaults : { +// "secret": "", +// "user": "default", +// "endpoint": "https://localhost" +// } +// Config : { +// "user": "root" +// "secret": "defaultsecret" +// } +// Env : { +// "secret": "somesecretkey" +// } // // The resulting config will have the following values: // @@ -300,7 +300,7 @@ func NewWithOptions(opts ...Option) *Viper { func Reset() { v = New() SupportedExts = []string{"json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini"} - SupportedRemoteProviders = []string{"etcd", "consul", "firestore"} + SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore"} } // TODO: make this lazy initialization instead @@ -419,15 +419,20 @@ type RemoteProvider interface { var SupportedExts = []string{"json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini"} // SupportedRemoteProviders are universally supported remote providers. -var SupportedRemoteProviders = []string{"etcd", "consul", "firestore"} +var SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore"} +// OnConfigChange sets the event handler that is called when a config file changes. func OnConfigChange(run func(in fsnotify.Event)) { v.OnConfigChange(run) } + +// OnConfigChange sets the event handler that is called when a config file changes. func (v *Viper) OnConfigChange(run func(in fsnotify.Event)) { v.onConfigChange = run } +// WatchConfig starts watching a config file for changes. func WatchConfig() { v.WatchConfig() } +// WatchConfig starts watching a config file for changes. func (v *Viper) WatchConfig() { initWG := sync.WaitGroup{} initWG.Add(1) @@ -463,9 +468,8 @@ func (v *Viper) WatchConfig() { // we only care about the config file with the following cases: // 1 - if the config file was modified or created // 2 - if the real path to the config file changed (eg: k8s ConfigMap replacement) - const writeOrCreateMask = fsnotify.Write | fsnotify.Create if (filepath.Clean(event.Name) == configFile && - event.Op&writeOrCreateMask != 0) || + (event.Has(fsnotify.Write) || event.Has(fsnotify.Create))) || (currentConfigFile != "" && currentConfigFile != realConfigFile) { realConfigFile = currentConfigFile err := v.ReadInConfig() @@ -475,8 +479,7 @@ func (v *Viper) WatchConfig() { if v.onConfigChange != nil { v.onConfigChange(event) } - } else if filepath.Clean(event.Name) == configFile && - event.Op&fsnotify.Remove != 0 { + } else if filepath.Clean(event.Name) == configFile && event.Has(fsnotify.Remove) { eventsWG.Done() return } @@ -573,7 +576,7 @@ func (v *Viper) AddConfigPath(in string) { // AddRemoteProvider adds a remote configuration source. // Remote Providers are searched in the order they are added. -// provider is a string value: "etcd", "consul" or "firestore" are currently supported. +// provider is a string value: "etcd", "etcd3", "consul" or "firestore" are currently supported. // endpoint is the url. etcd requires http://ip:port consul requires ip:port // path is the path in the k/v store to retrieve configuration // To retrieve a config file called myapp.json from /configs/myapp.json @@ -604,7 +607,7 @@ func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error { // AddSecureRemoteProvider adds a remote configuration source. // Secure Remote Providers are searched in the order they are added. -// provider is a string value: "etcd", "consul" or "firestore" are currently supported. +// provider is a string value: "etcd", "etcd3", "consul" or "firestore" are currently supported. // endpoint is the url. etcd requires http://ip:port consul requires ip:port // secretkeyring is the filepath to your openpgp secret keyring. e.g. /etc/secrets/myring.gpg // path is the path in the k/v store to retrieve configuration @@ -785,7 +788,8 @@ func (v *Viper) searchMapWithPathPrefixes( // isPathShadowedInDeepMap makes sure the given path is not shadowed somewhere // on its path in the map. // e.g., if "foo.bar" has a value in the given map, it “shadows” -// "foo.bar.baz" in a lower-priority map +// +// "foo.bar.baz" in a lower-priority map func (v *Viper) isPathShadowedInDeepMap(path []string, m map[string]interface{}) string { var parentVal interface{} for i := 1; i < len(path); i++ { @@ -810,7 +814,8 @@ func (v *Viper) isPathShadowedInDeepMap(path []string, m map[string]interface{}) // isPathShadowedInFlatMap makes sure the given path is not shadowed somewhere // in a sub-path of the map. // e.g., if "foo.bar" has a value in the given map, it “shadows” -// "foo.bar.baz" in a lower-priority map +// +// "foo.bar.baz" in a lower-priority map func (v *Viper) isPathShadowedInFlatMap(path []string, mi interface{}) string { // unify input map var m map[string]interface{} @@ -835,7 +840,8 @@ func (v *Viper) isPathShadowedInFlatMap(path []string, mi interface{}) string { // isPathShadowedInAutoEnv makes sure the given path is not shadowed somewhere // in the environment, when automatic env is on. // e.g., if "foo.bar" has a value in the environment, it “shadows” -// "foo.bar.baz" in a lower-priority map +// +// "foo.bar.baz" in a lower-priority map func (v *Viper) isPathShadowedInAutoEnv(path []string) string { var parentKey string for i := 1; i < len(path); i++ { @@ -856,11 +862,11 @@ func (v *Viper) isPathShadowedInAutoEnv(path []string) string { // would return a string slice for the key if the key's type is inferred by // the default value and the Get function would return: // -// []string {"a", "b", "c"} +// []string {"a", "b", "c"} // // Otherwise the Get function would return: // -// "a b c" +// "a b c" func SetTypeByDefaultValue(enable bool) { v.SetTypeByDefaultValue(enable) } func (v *Viper) SetTypeByDefaultValue(enable bool) { @@ -988,6 +994,13 @@ func (v *Viper) GetUint(key string) uint { return cast.ToUint(v.Get(key)) } +// GetUint16 returns the value associated with the key as an unsigned integer. +func GetUint16(key string) uint16 { return v.GetUint16(key) } + +func (v *Viper) GetUint16(key string) uint16 { + return cast.ToUint16(v.Get(key)) +} + // GetUint32 returns the value associated with the key as an unsigned integer. func GetUint32(key string) uint32 { return v.GetUint32(key) } @@ -1137,9 +1150,8 @@ func (v *Viper) BindPFlags(flags *pflag.FlagSet) error { // BindPFlag binds a specific key to a pflag (as used by cobra). // Example (where serverCmd is a Cobra instance): // -// serverCmd.Flags().Int("port", 1138, "Port to run Application server on") -// Viper.BindPFlag("port", serverCmd.Flags().Lookup("port")) -// +// serverCmd.Flags().Int("port", 1138, "Port to run Application server on") +// Viper.BindPFlag("port", serverCmd.Flags().Lookup("port")) func BindPFlag(key string, flag *pflag.Flag) error { return v.BindPFlag(key, flag) } func (v *Viper) BindPFlag(key string, flag *pflag.Flag) error { @@ -1870,6 +1882,10 @@ func (v *Viper) getKeyValueConfig() error { return RemoteConfigError("Enable the remote features by doing a blank import of the viper/remote package: '_ github.com/spf13/viper/remote'") } + if len(v.remoteProviders) == 0 { + return RemoteConfigError("No Remote Providers") + } + for _, rp := range v.remoteProviders { val, err := v.getRemoteConfig(rp) if err != nil { @@ -1896,6 +1912,10 @@ func (v *Viper) getRemoteConfig(provider RemoteProvider) (map[string]interface{} // Retrieve the first found remote configuration. func (v *Viper) watchKeyValueConfigOnChannel() error { + if len(v.remoteProviders) == 0 { + return RemoteConfigError("No Remote Providers") + } + for _, rp := range v.remoteProviders { respc, _ := RemoteConfig.WatchChannel(rp) // Todo: Add quit channel @@ -1913,9 +1933,15 @@ func (v *Viper) watchKeyValueConfigOnChannel() error { // Retrieve the first found remote configuration. func (v *Viper) watchKeyValueConfig() error { + if len(v.remoteProviders) == 0 { + return RemoteConfigError("No Remote Providers") + } + for _, rp := range v.remoteProviders { val, err := v.watchRemoteConfig(rp) if err != nil { + v.logger.Error(fmt.Errorf("watch remote config: %w", err).Error()) + continue } v.kvstore = val @@ -1958,9 +1984,10 @@ func (v *Viper) AllKeys() []string { // flattenAndMergeMap recursively flattens the given map into a map[string]bool // of key paths (used as a set, easier to manipulate than a []string): -// - each path is merged into a single key string, delimited with v.keyDelim -// - if a path is shadowed by an earlier value in the initial shadow map, -// it is skipped. +// - each path is merged into a single key string, delimited with v.keyDelim +// - if a path is shadowed by an earlier value in the initial shadow map, +// it is skipped. +// // The resulting set of paths is merged to the given shadow set at the same time. func (v *Viper) flattenAndMergeMap(shadow map[string]bool, m map[string]interface{}, prefix string) map[string]bool { if shadow != nil && prefix != "" && shadow[prefix] { @@ -2111,14 +2138,17 @@ func (v *Viper) getConfigFile() (string, error) { // Debug prints all configuration registries for debugging // purposes. -func Debug() { v.Debug() } +func Debug() { v.Debug() } +func DebugTo(w io.Writer) { v.DebugTo(w) } -func (v *Viper) Debug() { - fmt.Printf("Aliases:\n%#v\n", v.aliases) - fmt.Printf("Override:\n%#v\n", v.override) - fmt.Printf("PFlags:\n%#v\n", v.pflags) - fmt.Printf("Env:\n%#v\n", v.env) - fmt.Printf("Key/Value Store:\n%#v\n", v.kvstore) - fmt.Printf("Config:\n%#v\n", v.config) - fmt.Printf("Defaults:\n%#v\n", v.defaults) +func (v *Viper) Debug() { v.DebugTo(os.Stdout) } + +func (v *Viper) DebugTo(w io.Writer) { + fmt.Fprintf(w, "Aliases:\n%#v\n", v.aliases) + fmt.Fprintf(w, "Override:\n%#v\n", v.override) + fmt.Fprintf(w, "PFlags:\n%#v\n", v.pflags) + fmt.Fprintf(w, "Env:\n%#v\n", v.env) + fmt.Fprintf(w, "Key/Value Store:\n%#v\n", v.kvstore) + fmt.Fprintf(w, "Config:\n%#v\n", v.config) + fmt.Fprintf(w, "Defaults:\n%#v\n", v.defaults) } diff --git a/vendor/github.com/spf13/viper/watch.go b/vendor/github.com/spf13/viper/watch.go index b5523b8f..1ce84eaf 100644 --- a/vendor/github.com/spf13/viper/watch.go +++ b/vendor/github.com/spf13/viper/watch.go @@ -1,5 +1,5 @@ -//go:build !js -// +build !js +//go:build darwin || dragonfly || freebsd || openbsd || linux || netbsd || solaris || windows +// +build darwin dragonfly freebsd openbsd linux netbsd solaris windows package viper diff --git a/vendor/github.com/spf13/viper/watch_wasm.go b/vendor/github.com/spf13/viper/watch_unsupported.go similarity index 52% rename from vendor/github.com/spf13/viper/watch_wasm.go rename to vendor/github.com/spf13/viper/watch_unsupported.go index 8e47e6a9..7e271537 100644 --- a/vendor/github.com/spf13/viper/watch_wasm.go +++ b/vendor/github.com/spf13/viper/watch_unsupported.go @@ -1,13 +1,19 @@ -// +build js,wasm +//go:build appengine || (!darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows) +// +build appengine !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows package viper import ( - "errors" + "fmt" + "runtime" "github.com/fsnotify/fsnotify" ) +func newWatcher() (*watcher, error) { + return &watcher{}, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS) +} + type watcher struct { Events chan fsnotify.Event Errors chan error @@ -24,7 +30,3 @@ func (*watcher) Add(name string) error { func (*watcher) Remove(name string) error { return nil } - -func newWatcher() (*watcher, error) { - return &watcher{}, errors.New("fsnotify is not supported on WASM") -} diff --git a/vendor/github.com/subosito/gotenv/.gitignore b/vendor/github.com/subosito/gotenv/.gitignore index 2b8d4561..7db37c1d 100644 --- a/vendor/github.com/subosito/gotenv/.gitignore +++ b/vendor/github.com/subosito/gotenv/.gitignore @@ -1,3 +1,4 @@ *.test *.out annotate.json +profile.cov diff --git a/vendor/github.com/subosito/gotenv/.golangci.yaml b/vendor/github.com/subosito/gotenv/.golangci.yaml new file mode 100644 index 00000000..8c82a762 --- /dev/null +++ b/vendor/github.com/subosito/gotenv/.golangci.yaml @@ -0,0 +1,7 @@ +# Options for analysis running. +run: + timeout: 1m + +linters-settings: + gofmt: + simplify: true diff --git a/vendor/github.com/subosito/gotenv/CHANGELOG.md b/vendor/github.com/subosito/gotenv/CHANGELOG.md index 24b096b9..757caad2 100644 --- a/vendor/github.com/subosito/gotenv/CHANGELOG.md +++ b/vendor/github.com/subosito/gotenv/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.4.0] - 2022-06-02 + +### Added + +- Add `Marshal` and `Unmarshal` helpers + +### Changed + +- The CI will now run a linter and the tests on PRs. + ## [1.3.0] - 2022-05-23 ### Added @@ -41,7 +51,7 @@ ### Added - Supports carriage return in env -- Handle files with UTF-8 BOM +- Handle files with UTF-8 BOM ### Changed diff --git a/vendor/github.com/subosito/gotenv/README.md b/vendor/github.com/subosito/gotenv/README.md index 3ce9a410..fc9616e3 100644 --- a/vendor/github.com/subosito/gotenv/README.md +++ b/vendor/github.com/subosito/gotenv/README.md @@ -28,7 +28,7 @@ Once loaded you can use `os.Getenv()` to get the value of the variable. Let's say you have `.env` file: -``` +```sh APP_ID=1234567 APP_SECRET=abcdef ``` @@ -78,7 +78,6 @@ Besides above functions, `gotenv` also provides another functions that overrides - `gotenv.OverLoad` - `gotenv.OverApply` - Here's the example of this overrides behavior: ```go diff --git a/vendor/github.com/subosito/gotenv/gotenv.go b/vendor/github.com/subosito/gotenv/gotenv.go index c4c1e50e..dc013e1e 100644 --- a/vendor/github.com/subosito/gotenv/gotenv.go +++ b/vendor/github.com/subosito/gotenv/gotenv.go @@ -3,10 +3,14 @@ package gotenv import ( "bufio" + "bytes" "fmt" "io" "os" + "path/filepath" "regexp" + "sort" + "strconv" "strings" ) @@ -24,41 +28,31 @@ const ( // Env holds key/value pair of valid environment variable type Env map[string]string -/* -Load is a function to load a file or multiple files and then export the valid variables into environment variables if they do not exist. -When it's called with no argument, it will load `.env` file on the current path and set the environment variables. -Otherwise, it will loop over the filenames parameter and set the proper environment variables. -*/ +// Load is a function to load a file or multiple files and then export the valid variables into environment variables if they do not exist. +// When it's called with no argument, it will load `.env` file on the current path and set the environment variables. +// Otherwise, it will loop over the filenames parameter and set the proper environment variables. func Load(filenames ...string) error { return loadenv(false, filenames...) } -/* -OverLoad is a function to load a file or multiple files and then export and override the valid variables into environment variables. -*/ +// OverLoad is a function to load a file or multiple files and then export and override the valid variables into environment variables. func OverLoad(filenames ...string) error { return loadenv(true, filenames...) } -/* -Must is wrapper function that will panic when supplied function returns an error. -*/ +// Must is wrapper function that will panic when supplied function returns an error. func Must(fn func(filenames ...string) error, filenames ...string) { if err := fn(filenames...); err != nil { panic(err.Error()) } } -/* -Apply is a function to load an io Reader then export the valid variables into environment variables if they do not exist. -*/ +// Apply is a function to load an io Reader then export the valid variables into environment variables if they do not exist. func Apply(r io.Reader) error { return parset(r, false) } -/* -OverApply is a function to load an io Reader then export and override the valid variables into environment variables. -*/ +// OverApply is a function to load an io Reader then export and override the valid variables into environment variables. func OverApply(r io.Reader) error { return parset(r, true) } @@ -75,11 +69,10 @@ func loadenv(override bool, filenames ...string) error { } err = parset(f, override) + f.Close() if err != nil { return err } - - f.Close() } return nil @@ -124,9 +117,94 @@ func StrictParse(r io.Reader) (Env, error) { return strictParse(r, false) } +// Read is a function to parse a file line by line and returns the valid Env key/value pair of valid variables. +// It expands the value of a variable from the environment variable but does not set the value to the environment itself. +// This function is skipping any invalid lines and only processing the valid one. +func Read(filename string) (Env, error) { + f, err := os.Open(filename) + if err != nil { + return nil, err + } + defer f.Close() + return strictParse(f, false) +} + +// Unmarshal reads a string line by line and returns the valid Env key/value pair of valid variables. +// It expands the value of a variable from the environment variable but does not set the value to the environment itself. +// This function is returning an error if there are any invalid lines. +func Unmarshal(str string) (Env, error) { + return strictParse(strings.NewReader(str), false) +} + +// Marshal outputs the given environment as a env file. +// Variables will be sorted by name. +func Marshal(env Env) (string, error) { + lines := make([]string, 0, len(env)) + for k, v := range env { + if d, err := strconv.Atoi(v); err == nil { + lines = append(lines, fmt.Sprintf(`%s=%d`, k, d)) + } else { + lines = append(lines, fmt.Sprintf(`%s=%q`, k, v)) + } + } + sort.Strings(lines) + return strings.Join(lines, "\n"), nil +} + +// Write serializes the given environment and writes it to a file +func Write(env Env, filename string) error { + content, err := Marshal(env) + if err != nil { + return err + } + // ensure the path exists + if err := os.MkdirAll(filepath.Dir(filename), 0o775); err != nil { + return err + } + // create or truncate the file + file, err := os.Create(filename) + if err != nil { + return err + } + defer file.Close() + _, err = file.WriteString(content + "\n") + if err != nil { + return err + } + + return file.Sync() +} + +// splitLines is a valid SplitFunc for a bufio.Scanner. It will split lines on CR ('\r'), LF ('\n') or CRLF (any of the three sequences). +// If a CR is immediately followed by a LF, it is treated as a CRLF (one single line break). +func splitLines(data []byte, atEOF bool) (advance int, token []byte, err error) { + if atEOF && len(data) == 0 { + return 0, nil, bufio.ErrFinalToken + } + + idx := bytes.IndexAny(data, "\r\n") + switch { + case atEOF && idx < 0: + return len(data), data, bufio.ErrFinalToken + + case idx < 0: + return 0, nil, nil + } + + // consume CR or LF + eol := idx + 1 + // detect CRLF + if len(data) > eol && data[eol-1] == '\r' && data[eol] == '\n' { + eol++ + } + + return eol, data[:idx], nil +} + func strictParse(r io.Reader, override bool) (Env, error) { env := make(Env) scanner := bufio.NewScanner(r) + scanner.Split(splitLines) firstLine := true @@ -143,28 +221,34 @@ func strictParse(r io.Reader, override bool) (Env, error) { } quote := "" + // look for the delimiter character idx := strings.Index(line, "=") if idx == -1 { idx = strings.Index(line, ":") } + // look for a quote character if idx > 0 && idx < len(line)-1 { val := strings.TrimSpace(line[idx+1:]) if val[0] == '"' || val[0] == '\'' { quote = val[:1] + // look for the closing quote character within the same line idx = strings.LastIndex(strings.TrimSpace(val[1:]), quote) if idx >= 0 && val[idx] != '\\' { quote = "" } } } + // look for the closing quote character for quote != "" && scanner.Scan() { l := scanner.Text() line += "\n" + l idx := strings.LastIndex(l, quote) if idx > 0 && l[idx-1] == '\\' { + // foud a matching quote character but it's escaped continue } if idx >= 0 { + // foud a matching quote quote = "" } } @@ -195,21 +279,23 @@ func parseLine(s string, env Env, override bool) error { return checkFormat(s, env) } - key := rm[1] - val := rm[2] + key := strings.TrimSpace(rm[1]) + val := strings.TrimSpace(rm[2]) - // trim whitespace - val = strings.TrimSpace(val) + var hsq, hdq bool - // determine if string has quote prefix - hdq := strings.HasPrefix(val, `"`) + // check if the value is quoted + if l := len(val); l >= 2 { + l -= 1 + // has double quotes + hdq = val[0] == '"' && val[l] == '"' + // has single quotes + hsq = val[0] == '\'' && val[l] == '\'' - // determine if string has single quote prefix - hsq := strings.HasPrefix(val, `'`) - - // remove quotes '' or "" - if l := len(val); (hsq || hdq) && l >= 2 { - val = val[1 : l-1] + // remove quotes '' or "" + if hsq || hdq { + val = val[1:l] + } } if hdq { @@ -220,13 +306,11 @@ func parseLine(s string, env Env, override bool) error { val = unescapeRgx.ReplaceAllString(val, "$1") } - fv := func(s string) string { - return varReplacement(s, hsq, env, override) - } - if !hsq { + fv := func(s string) string { + return varReplacement(s, hsq, env, override) + } val = varRgx.ReplaceAllStringFunc(val, fv) - val = parseVal(val, env, hdq, override) } env[key] = val @@ -250,8 +334,13 @@ func parseExport(st string, env Env) error { var varNameRgx = regexp.MustCompile(`(\$)(\{?([A-Z0-9_]+)\}?)`) func varReplacement(s string, hsq bool, env Env, override bool) string { - if strings.HasPrefix(s, "\\") { - return strings.TrimPrefix(s, "\\") + if s == "" { + return s + } + + if s[0] == '\\' { + // the dollar sign is escaped + return s[1:] } if hsq { @@ -270,18 +359,17 @@ func varReplacement(s string, hsq bool, env Env, override bool) string { return replace } - replace, ok := env[v] - if !ok { - replace = os.Getenv(v) + if replace, ok := env[v]; ok { + return replace } - return replace + return os.Getenv(v) } func checkFormat(s string, env Env) error { st := strings.TrimSpace(s) - if (st == "") || strings.HasPrefix(st, "#") { + if st == "" || st[0] == '#' { return nil } @@ -291,18 +379,3 @@ func checkFormat(s string, env Env) error { return fmt.Errorf("line `%s` doesn't match format", s) } - -func parseVal(val string, env Env, ignoreNewlines bool, override bool) string { - if strings.Contains(val, "=") && !ignoreNewlines { - kv := strings.Split(val, "\r") - - if len(kv) > 1 { - val = kv[0] - for _, l := range kv[1:] { - _ = parseLine(l, env, override) - } - } - } - - return val -} diff --git a/vendor/github.com/valyala/fasttemplate/template.go b/vendor/github.com/valyala/fasttemplate/template.go index 18620013..f2d3261f 100644 --- a/vendor/github.com/valyala/fasttemplate/template.go +++ b/vendor/github.com/valyala/fasttemplate/template.go @@ -112,8 +112,7 @@ func ExecuteFuncString(template, startTag, endTag string, f TagFunc) string { // but when f returns an error, ExecuteFuncStringWithErr won't panic like ExecuteFuncString // it just returns an empty string and the error f returned func ExecuteFuncStringWithErr(template, startTag, endTag string, f TagFunc) (string, error) { - tagsCount := bytes.Count(unsafeString2Bytes(template), unsafeString2Bytes(startTag)) - if tagsCount == 0 { + if n := bytes.Index(unsafeString2Bytes(template), unsafeString2Bytes(startTag)); n < 0 { return template, nil } diff --git a/vendor/go.mau.fi/whatsmeow/appstate.go b/vendor/go.mau.fi/whatsmeow/appstate.go index f1130462..7e99b513 100644 --- a/vendor/go.mau.fi/whatsmeow/appstate.go +++ b/vendor/go.mau.fi/whatsmeow/appstate.go @@ -270,11 +270,12 @@ func (cli *Client) requestAppStateKeys(ctx context.Context, rawKeyIDs [][]byte) }, }, } - if cli.Store.ID == nil { + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { return } cli.Log.Infof("Sending key request for app state keys %+v", debugKeyIDs) - _, err := cli.SendMessage(ctx, cli.Store.ID.ToNonAD(), "", msg) + _, err := cli.SendMessage(ctx, ownID, msg, SendRequestExtra{Peer: true}) if err != nil { cli.Log.Warnf("Failed to send app state key request: %v", err) } diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go index 03c84a5d..046bebe2 100644 --- a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go +++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc v3.21.12 // source: binary/proto/def.proto package proto @@ -2109,7 +2109,7 @@ func (x *BizIdentityInfo_VerifiedLevelValue) UnmarshalJSON(b []byte) error { // Deprecated: Use BizIdentityInfo_VerifiedLevelValue.Descriptor instead. func (BizIdentityInfo_VerifiedLevelValue) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{140, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{141, 0} } type BizIdentityInfo_HostStorageType int32 @@ -2165,7 +2165,7 @@ func (x *BizIdentityInfo_HostStorageType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizIdentityInfo_HostStorageType.Descriptor instead. func (BizIdentityInfo_HostStorageType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{140, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{141, 1} } type BizIdentityInfo_ActualActorsType int32 @@ -2221,7 +2221,7 @@ func (x *BizIdentityInfo_ActualActorsType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizIdentityInfo_ActualActorsType.Descriptor instead. func (BizIdentityInfo_ActualActorsType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{140, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{141, 2} } type BizAccountLinkInfo_HostStorageType int32 @@ -2277,7 +2277,7 @@ func (x *BizAccountLinkInfo_HostStorageType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizAccountLinkInfo_HostStorageType.Descriptor instead. func (BizAccountLinkInfo_HostStorageType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{142, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{143, 0} } type BizAccountLinkInfo_AccountType int32 @@ -2330,7 +2330,7 @@ func (x *BizAccountLinkInfo_AccountType) UnmarshalJSON(b []byte) error { // Deprecated: Use BizAccountLinkInfo_AccountType.Descriptor instead. func (BizAccountLinkInfo_AccountType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{142, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{143, 1} } type ClientPayload_Product int32 @@ -2386,7 +2386,7 @@ func (x *ClientPayload_Product) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_Product.Descriptor instead. func (ClientPayload_Product) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 0} } type ClientPayload_IOSAppExtension int32 @@ -2445,7 +2445,7 @@ func (x *ClientPayload_IOSAppExtension) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_IOSAppExtension.Descriptor instead. func (ClientPayload_IOSAppExtension) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 1} } type ClientPayload_ConnectType int32 @@ -2540,7 +2540,7 @@ func (x *ClientPayload_ConnectType) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_ConnectType.Descriptor instead. func (ClientPayload_ConnectType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 2} } type ClientPayload_ConnectReason int32 @@ -2608,7 +2608,7 @@ func (x *ClientPayload_ConnectReason) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_ConnectReason.Descriptor instead. func (ClientPayload_ConnectReason) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 3} } type ClientPayload_BizMarketSegment int32 @@ -2667,7 +2667,7 @@ func (x *ClientPayload_BizMarketSegment) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_BizMarketSegment.Descriptor instead. func (ClientPayload_BizMarketSegment) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 4} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 4} } type ClientPayload_WebInfo_WebSubPlatform int32 @@ -2732,7 +2732,7 @@ func (x *ClientPayload_WebInfo_WebSubPlatform) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_WebInfo_WebSubPlatform.Descriptor instead. func (ClientPayload_WebInfo_WebSubPlatform) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 0, 0} } type ClientPayload_UserAgent_ReleaseChannel int32 @@ -2794,7 +2794,7 @@ func (x *ClientPayload_UserAgent_ReleaseChannel) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_UserAgent_ReleaseChannel.Descriptor instead. func (ClientPayload_UserAgent_ReleaseChannel) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 1, 0} } type ClientPayload_UserAgent_Platform int32 @@ -2940,7 +2940,7 @@ func (x *ClientPayload_UserAgent_Platform) UnmarshalJSON(b []byte) error { // Deprecated: Use ClientPayload_UserAgent_Platform.Descriptor instead. func (ClientPayload_UserAgent_Platform) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 1, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 1, 1} } type ClientPayload_DNSSource_DNSResolutionMethod int32 @@ -3005,7 +3005,7 @@ func (x *ClientPayload_DNSSource_DNSResolutionMethod) UnmarshalJSON(b []byte) er // Deprecated: Use ClientPayload_DNSSource_DNSResolutionMethod.Descriptor instead. func (ClientPayload_DNSSource_DNSResolutionMethod) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 3, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 3, 0} } type WebMessageInfo_StubType int32 @@ -3541,7 +3541,7 @@ func (x *WebMessageInfo_StubType) UnmarshalJSON(b []byte) error { // Deprecated: Use WebMessageInfo_StubType.Descriptor instead. func (WebMessageInfo_StubType) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{149, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{150, 0} } type WebMessageInfo_Status int32 @@ -3609,7 +3609,7 @@ func (x *WebMessageInfo_Status) UnmarshalJSON(b []byte) error { // Deprecated: Use WebMessageInfo_Status.Descriptor instead. func (WebMessageInfo_Status) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{149, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{150, 1} } type WebMessageInfo_BizPrivacyStatus int32 @@ -3671,7 +3671,7 @@ func (x *WebMessageInfo_BizPrivacyStatus) UnmarshalJSON(b []byte) error { // Deprecated: Use WebMessageInfo_BizPrivacyStatus.Descriptor instead. func (WebMessageInfo_BizPrivacyStatus) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{149, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{150, 2} } type WebFeatures_Flag int32 @@ -3733,7 +3733,7 @@ func (x *WebFeatures_Flag) UnmarshalJSON(b []byte) error { // Deprecated: Use WebFeatures_Flag.Descriptor instead. func (WebFeatures_Flag) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{150, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{151, 0} } type PaymentInfo_TxnStatus int32 @@ -3879,7 +3879,7 @@ func (x *PaymentInfo_TxnStatus) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInfo_TxnStatus.Descriptor instead. func (PaymentInfo_TxnStatus) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{157, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{158, 0} } type PaymentInfo_Status int32 @@ -3965,7 +3965,7 @@ func (x *PaymentInfo_Status) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInfo_Status.Descriptor instead. func (PaymentInfo_Status) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{157, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{158, 1} } type PaymentInfo_Currency int32 @@ -4021,7 +4021,7 @@ func (x *PaymentInfo_Currency) UnmarshalJSON(b []byte) error { // Deprecated: Use PaymentInfo_Currency.Descriptor instead. func (PaymentInfo_Currency) EnumDescriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{157, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{158, 2} } type ADVSignedKeyIndexList struct { @@ -8326,6 +8326,7 @@ type ContextInfo struct { ParentGroupJid *string `protobuf:"bytes,35,opt,name=parentGroupJid" json:"parentGroupJid,omitempty"` TrustBannerType *string `protobuf:"bytes,37,opt,name=trustBannerType" json:"trustBannerType,omitempty"` TrustBannerAction *uint32 `protobuf:"varint,38,opt,name=trustBannerAction" json:"trustBannerAction,omitempty"` + IsSampled *bool `protobuf:"varint,39,opt,name=isSampled" json:"isSampled,omitempty"` } func (x *ContextInfo) Reset() { @@ -8535,6 +8536,13 @@ func (x *ContextInfo) GetTrustBannerAction() uint32 { return 0 } +func (x *ContextInfo) GetIsSampled() bool { + if x != nil && x.IsSampled != nil { + return *x.IsSampled + } + return false +} + type ActionLink struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -9000,6 +9008,7 @@ type Message struct { EncReactionMessage *EncReactionMessage `protobuf:"bytes,56,opt,name=encReactionMessage" json:"encReactionMessage,omitempty"` EditedMessage *FutureProofMessage `protobuf:"bytes,58,opt,name=editedMessage" json:"editedMessage,omitempty"` ViewOnceMessageV2Extension *FutureProofMessage `protobuf:"bytes,59,opt,name=viewOnceMessageV2Extension" json:"viewOnceMessageV2Extension,omitempty"` + PollCreationMessageV2 *PollCreationMessage `protobuf:"bytes,60,opt,name=pollCreationMessageV2" json:"pollCreationMessageV2,omitempty"` } func (x *Message) Reset() { @@ -9377,6 +9386,13 @@ func (x *Message) GetViewOnceMessageV2Extension() *FutureProofMessage { return nil } +func (x *Message) GetPollCreationMessageV2() *PollCreationMessage { + if x != nil { + return x.PollCreationMessageV2 + } + return nil +} + type MessageContextInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -12315,6 +12331,7 @@ type MsgOpaqueData struct { SenderTimestampMs *int64 `protobuf:"varint,22,opt,name=senderTimestampMs" json:"senderTimestampMs,omitempty"` PollUpdateParentKey *string `protobuf:"bytes,23,opt,name=pollUpdateParentKey" json:"pollUpdateParentKey,omitempty"` EncPollVote *PollEncValue `protobuf:"bytes,24,opt,name=encPollVote" json:"encPollVote,omitempty"` + IsSentCagPollCreation *bool `protobuf:"varint,28,opt,name=isSentCagPollCreation" json:"isSentCagPollCreation,omitempty"` EncReactionTargetMessageKey *string `protobuf:"bytes,25,opt,name=encReactionTargetMessageKey" json:"encReactionTargetMessageKey,omitempty"` EncReactionEncPayload []byte `protobuf:"bytes,26,opt,name=encReactionEncPayload" json:"encReactionEncPayload,omitempty"` EncReactionEncIv []byte `protobuf:"bytes,27,opt,name=encReactionEncIv" json:"encReactionEncIv,omitempty"` @@ -12506,6 +12523,13 @@ func (x *MsgOpaqueData) GetEncPollVote() *PollEncValue { return nil } +func (x *MsgOpaqueData) GetIsSentCagPollCreation() bool { + if x != nil && x.IsSentCagPollCreation != nil { + return *x.IsSentCagPollCreation + } + return false +} + func (x *MsgOpaqueData) GetEncReactionTargetMessageKey() string { if x != nil && x.EncReactionTargetMessageKey != nil { return *x.EncReactionTargetMessageKey @@ -13413,6 +13437,7 @@ type SyncActionValue struct { RemoveRecentStickerAction *RemoveRecentStickerAction `protobuf:"bytes,34,opt,name=removeRecentStickerAction" json:"removeRecentStickerAction,omitempty"` ChatAssignment *ChatAssignmentAction `protobuf:"bytes,35,opt,name=chatAssignment" json:"chatAssignment,omitempty"` ChatAssignmentOpenedStatus *ChatAssignmentOpenedStatusAction `protobuf:"bytes,36,opt,name=chatAssignmentOpenedStatus" json:"chatAssignmentOpenedStatus,omitempty"` + PnForLidChatAction *PnForLidChatAction `protobuf:"bytes,37,opt,name=pnForLidChatAction" json:"pnForLidChatAction,omitempty"` } func (x *SyncActionValue) Reset() { @@ -13664,6 +13689,13 @@ func (x *SyncActionValue) GetChatAssignmentOpenedStatus() *ChatAssignmentOpenedS return nil } +func (x *SyncActionValue) GetPnForLidChatAction() *PnForLidChatAction { + if x != nil { + return x.PnForLidChatAction + } + return nil +} + type UserStatusMuteAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -14513,6 +14545,53 @@ func (x *PrimaryFeature) GetFlags() []string { return nil } +type PnForLidChatAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PnJid *string `protobuf:"bytes,1,opt,name=pnJid" json:"pnJid,omitempty"` +} + +func (x *PnForLidChatAction) Reset() { + *x = PnForLidChatAction{} + if protoimpl.UnsafeEnabled { + mi := &file_binary_proto_def_proto_msgTypes[119] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PnForLidChatAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PnForLidChatAction) ProtoMessage() {} + +func (x *PnForLidChatAction) ProtoReflect() protoreflect.Message { + mi := &file_binary_proto_def_proto_msgTypes[119] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PnForLidChatAction.ProtoReflect.Descriptor instead. +func (*PnForLidChatAction) Descriptor() ([]byte, []int) { + return file_binary_proto_def_proto_rawDescGZIP(), []int{119} +} + +func (x *PnForLidChatAction) GetPnJid() string { + if x != nil && x.PnJid != nil { + return *x.PnJid + } + return "" +} + type PinAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -14524,7 +14603,7 @@ type PinAction struct { func (x *PinAction) Reset() { *x = PinAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[119] + mi := &file_binary_proto_def_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14537,7 +14616,7 @@ func (x *PinAction) String() string { func (*PinAction) ProtoMessage() {} func (x *PinAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[119] + mi := &file_binary_proto_def_proto_msgTypes[120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14550,7 +14629,7 @@ func (x *PinAction) ProtoReflect() protoreflect.Message { // Deprecated: Use PinAction.ProtoReflect.Descriptor instead. func (*PinAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{119} + return file_binary_proto_def_proto_rawDescGZIP(), []int{120} } func (x *PinAction) GetPinned() bool { @@ -14571,7 +14650,7 @@ type NuxAction struct { func (x *NuxAction) Reset() { *x = NuxAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[120] + mi := &file_binary_proto_def_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14584,7 +14663,7 @@ func (x *NuxAction) String() string { func (*NuxAction) ProtoMessage() {} func (x *NuxAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[120] + mi := &file_binary_proto_def_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14597,7 +14676,7 @@ func (x *NuxAction) ProtoReflect() protoreflect.Message { // Deprecated: Use NuxAction.ProtoReflect.Descriptor instead. func (*NuxAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{120} + return file_binary_proto_def_proto_rawDescGZIP(), []int{121} } func (x *NuxAction) GetAcknowledged() bool { @@ -14620,7 +14699,7 @@ type MuteAction struct { func (x *MuteAction) Reset() { *x = MuteAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[121] + mi := &file_binary_proto_def_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14633,7 +14712,7 @@ func (x *MuteAction) String() string { func (*MuteAction) ProtoMessage() {} func (x *MuteAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[121] + mi := &file_binary_proto_def_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14646,7 +14725,7 @@ func (x *MuteAction) ProtoReflect() protoreflect.Message { // Deprecated: Use MuteAction.ProtoReflect.Descriptor instead. func (*MuteAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{121} + return file_binary_proto_def_proto_rawDescGZIP(), []int{122} } func (x *MuteAction) GetMuted() bool { @@ -14682,7 +14761,7 @@ type MarkChatAsReadAction struct { func (x *MarkChatAsReadAction) Reset() { *x = MarkChatAsReadAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[122] + mi := &file_binary_proto_def_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14695,7 +14774,7 @@ func (x *MarkChatAsReadAction) String() string { func (*MarkChatAsReadAction) ProtoMessage() {} func (x *MarkChatAsReadAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[122] + mi := &file_binary_proto_def_proto_msgTypes[123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14708,7 +14787,7 @@ func (x *MarkChatAsReadAction) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkChatAsReadAction.ProtoReflect.Descriptor instead. func (*MarkChatAsReadAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{122} + return file_binary_proto_def_proto_rawDescGZIP(), []int{123} } func (x *MarkChatAsReadAction) GetRead() bool { @@ -14736,7 +14815,7 @@ type LocaleSetting struct { func (x *LocaleSetting) Reset() { *x = LocaleSetting{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[123] + mi := &file_binary_proto_def_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14749,7 +14828,7 @@ func (x *LocaleSetting) String() string { func (*LocaleSetting) ProtoMessage() {} func (x *LocaleSetting) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[123] + mi := &file_binary_proto_def_proto_msgTypes[124] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14762,7 +14841,7 @@ func (x *LocaleSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use LocaleSetting.ProtoReflect.Descriptor instead. func (*LocaleSetting) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{123} + return file_binary_proto_def_proto_rawDescGZIP(), []int{124} } func (x *LocaleSetting) GetLocale() string { @@ -14786,7 +14865,7 @@ type LabelEditAction struct { func (x *LabelEditAction) Reset() { *x = LabelEditAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[124] + mi := &file_binary_proto_def_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14799,7 +14878,7 @@ func (x *LabelEditAction) String() string { func (*LabelEditAction) ProtoMessage() {} func (x *LabelEditAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[124] + mi := &file_binary_proto_def_proto_msgTypes[125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14812,7 +14891,7 @@ func (x *LabelEditAction) ProtoReflect() protoreflect.Message { // Deprecated: Use LabelEditAction.ProtoReflect.Descriptor instead. func (*LabelEditAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{124} + return file_binary_proto_def_proto_rawDescGZIP(), []int{125} } func (x *LabelEditAction) GetName() string { @@ -14854,7 +14933,7 @@ type LabelAssociationAction struct { func (x *LabelAssociationAction) Reset() { *x = LabelAssociationAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[125] + mi := &file_binary_proto_def_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14867,7 +14946,7 @@ func (x *LabelAssociationAction) String() string { func (*LabelAssociationAction) ProtoMessage() {} func (x *LabelAssociationAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[125] + mi := &file_binary_proto_def_proto_msgTypes[126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14880,7 +14959,7 @@ func (x *LabelAssociationAction) ProtoReflect() protoreflect.Message { // Deprecated: Use LabelAssociationAction.ProtoReflect.Descriptor instead. func (*LabelAssociationAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{125} + return file_binary_proto_def_proto_rawDescGZIP(), []int{126} } func (x *LabelAssociationAction) GetLabeled() bool { @@ -14901,7 +14980,7 @@ type KeyExpiration struct { func (x *KeyExpiration) Reset() { *x = KeyExpiration{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[126] + mi := &file_binary_proto_def_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14914,7 +14993,7 @@ func (x *KeyExpiration) String() string { func (*KeyExpiration) ProtoMessage() {} func (x *KeyExpiration) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[126] + mi := &file_binary_proto_def_proto_msgTypes[127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14927,7 +15006,7 @@ func (x *KeyExpiration) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyExpiration.ProtoReflect.Descriptor instead. func (*KeyExpiration) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{126} + return file_binary_proto_def_proto_rawDescGZIP(), []int{127} } func (x *KeyExpiration) GetExpiredKeyEpoch() int32 { @@ -14949,7 +15028,7 @@ type DeleteMessageForMeAction struct { func (x *DeleteMessageForMeAction) Reset() { *x = DeleteMessageForMeAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[127] + mi := &file_binary_proto_def_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -14962,7 +15041,7 @@ func (x *DeleteMessageForMeAction) String() string { func (*DeleteMessageForMeAction) ProtoMessage() {} func (x *DeleteMessageForMeAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[127] + mi := &file_binary_proto_def_proto_msgTypes[128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -14975,7 +15054,7 @@ func (x *DeleteMessageForMeAction) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMessageForMeAction.ProtoReflect.Descriptor instead. func (*DeleteMessageForMeAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{127} + return file_binary_proto_def_proto_rawDescGZIP(), []int{128} } func (x *DeleteMessageForMeAction) GetDeleteMedia() bool { @@ -15003,7 +15082,7 @@ type DeleteChatAction struct { func (x *DeleteChatAction) Reset() { *x = DeleteChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[128] + mi := &file_binary_proto_def_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15016,7 +15095,7 @@ func (x *DeleteChatAction) String() string { func (*DeleteChatAction) ProtoMessage() {} func (x *DeleteChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[128] + mi := &file_binary_proto_def_proto_msgTypes[129] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15029,7 +15108,7 @@ func (x *DeleteChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteChatAction.ProtoReflect.Descriptor instead. func (*DeleteChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{128} + return file_binary_proto_def_proto_rawDescGZIP(), []int{129} } func (x *DeleteChatAction) GetMessageRange() *SyncActionMessageRange { @@ -15052,7 +15131,7 @@ type ContactAction struct { func (x *ContactAction) Reset() { *x = ContactAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[129] + mi := &file_binary_proto_def_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15065,7 +15144,7 @@ func (x *ContactAction) String() string { func (*ContactAction) ProtoMessage() {} func (x *ContactAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[129] + mi := &file_binary_proto_def_proto_msgTypes[130] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15078,7 +15157,7 @@ func (x *ContactAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactAction.ProtoReflect.Descriptor instead. func (*ContactAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{129} + return file_binary_proto_def_proto_rawDescGZIP(), []int{130} } func (x *ContactAction) GetFullName() string { @@ -15113,7 +15192,7 @@ type ClearChatAction struct { func (x *ClearChatAction) Reset() { *x = ClearChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[130] + mi := &file_binary_proto_def_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15126,7 +15205,7 @@ func (x *ClearChatAction) String() string { func (*ClearChatAction) ProtoMessage() {} func (x *ClearChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[130] + mi := &file_binary_proto_def_proto_msgTypes[131] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15139,7 +15218,7 @@ func (x *ClearChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearChatAction.ProtoReflect.Descriptor instead. func (*ClearChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{130} + return file_binary_proto_def_proto_rawDescGZIP(), []int{131} } func (x *ClearChatAction) GetMessageRange() *SyncActionMessageRange { @@ -15160,7 +15239,7 @@ type ChatAssignmentOpenedStatusAction struct { func (x *ChatAssignmentOpenedStatusAction) Reset() { *x = ChatAssignmentOpenedStatusAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[131] + mi := &file_binary_proto_def_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15173,7 +15252,7 @@ func (x *ChatAssignmentOpenedStatusAction) String() string { func (*ChatAssignmentOpenedStatusAction) ProtoMessage() {} func (x *ChatAssignmentOpenedStatusAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[131] + mi := &file_binary_proto_def_proto_msgTypes[132] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15186,7 +15265,7 @@ func (x *ChatAssignmentOpenedStatusAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatAssignmentOpenedStatusAction.ProtoReflect.Descriptor instead. func (*ChatAssignmentOpenedStatusAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{131} + return file_binary_proto_def_proto_rawDescGZIP(), []int{132} } func (x *ChatAssignmentOpenedStatusAction) GetChatOpened() bool { @@ -15207,7 +15286,7 @@ type ChatAssignmentAction struct { func (x *ChatAssignmentAction) Reset() { *x = ChatAssignmentAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[132] + mi := &file_binary_proto_def_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15220,7 +15299,7 @@ func (x *ChatAssignmentAction) String() string { func (*ChatAssignmentAction) ProtoMessage() {} func (x *ChatAssignmentAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[132] + mi := &file_binary_proto_def_proto_msgTypes[133] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15233,7 +15312,7 @@ func (x *ChatAssignmentAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatAssignmentAction.ProtoReflect.Descriptor instead. func (*ChatAssignmentAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{132} + return file_binary_proto_def_proto_rawDescGZIP(), []int{133} } func (x *ChatAssignmentAction) GetDeviceAgentID() string { @@ -15255,7 +15334,7 @@ type ArchiveChatAction struct { func (x *ArchiveChatAction) Reset() { *x = ArchiveChatAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[133] + mi := &file_binary_proto_def_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15268,7 +15347,7 @@ func (x *ArchiveChatAction) String() string { func (*ArchiveChatAction) ProtoMessage() {} func (x *ArchiveChatAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[133] + mi := &file_binary_proto_def_proto_msgTypes[134] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15281,7 +15360,7 @@ func (x *ArchiveChatAction) ProtoReflect() protoreflect.Message { // Deprecated: Use ArchiveChatAction.ProtoReflect.Descriptor instead. func (*ArchiveChatAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{133} + return file_binary_proto_def_proto_rawDescGZIP(), []int{134} } func (x *ArchiveChatAction) GetArchived() bool { @@ -15309,7 +15388,7 @@ type AndroidUnsupportedActions struct { func (x *AndroidUnsupportedActions) Reset() { *x = AndroidUnsupportedActions{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[134] + mi := &file_binary_proto_def_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15322,7 +15401,7 @@ func (x *AndroidUnsupportedActions) String() string { func (*AndroidUnsupportedActions) ProtoMessage() {} func (x *AndroidUnsupportedActions) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[134] + mi := &file_binary_proto_def_proto_msgTypes[135] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15335,7 +15414,7 @@ func (x *AndroidUnsupportedActions) ProtoReflect() protoreflect.Message { // Deprecated: Use AndroidUnsupportedActions.ProtoReflect.Descriptor instead. func (*AndroidUnsupportedActions) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{134} + return file_binary_proto_def_proto_rawDescGZIP(), []int{135} } func (x *AndroidUnsupportedActions) GetAllowed() bool { @@ -15358,7 +15437,7 @@ type AgentAction struct { func (x *AgentAction) Reset() { *x = AgentAction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[135] + mi := &file_binary_proto_def_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15371,7 +15450,7 @@ func (x *AgentAction) String() string { func (*AgentAction) ProtoMessage() {} func (x *AgentAction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[135] + mi := &file_binary_proto_def_proto_msgTypes[136] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15384,7 +15463,7 @@ func (x *AgentAction) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentAction.ProtoReflect.Descriptor instead. func (*AgentAction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{135} + return file_binary_proto_def_proto_rawDescGZIP(), []int{136} } func (x *AgentAction) GetName() string { @@ -15422,7 +15501,7 @@ type SyncActionData struct { func (x *SyncActionData) Reset() { *x = SyncActionData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[136] + mi := &file_binary_proto_def_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15435,7 +15514,7 @@ func (x *SyncActionData) String() string { func (*SyncActionData) ProtoMessage() {} func (x *SyncActionData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[136] + mi := &file_binary_proto_def_proto_msgTypes[137] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15448,7 +15527,7 @@ func (x *SyncActionData) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncActionData.ProtoReflect.Descriptor instead. func (*SyncActionData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{136} + return file_binary_proto_def_proto_rawDescGZIP(), []int{137} } func (x *SyncActionData) GetIndex() []byte { @@ -15491,7 +15570,7 @@ type RecentEmojiWeight struct { func (x *RecentEmojiWeight) Reset() { *x = RecentEmojiWeight{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[137] + mi := &file_binary_proto_def_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15504,7 +15583,7 @@ func (x *RecentEmojiWeight) String() string { func (*RecentEmojiWeight) ProtoMessage() {} func (x *RecentEmojiWeight) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[137] + mi := &file_binary_proto_def_proto_msgTypes[138] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15517,7 +15596,7 @@ func (x *RecentEmojiWeight) ProtoReflect() protoreflect.Message { // Deprecated: Use RecentEmojiWeight.ProtoReflect.Descriptor instead. func (*RecentEmojiWeight) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{137} + return file_binary_proto_def_proto_rawDescGZIP(), []int{138} } func (x *RecentEmojiWeight) GetEmoji() string { @@ -15547,7 +15626,7 @@ type VerifiedNameCertificate struct { func (x *VerifiedNameCertificate) Reset() { *x = VerifiedNameCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[138] + mi := &file_binary_proto_def_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15560,7 +15639,7 @@ func (x *VerifiedNameCertificate) String() string { func (*VerifiedNameCertificate) ProtoMessage() {} func (x *VerifiedNameCertificate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[138] + mi := &file_binary_proto_def_proto_msgTypes[139] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15573,7 +15652,7 @@ func (x *VerifiedNameCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifiedNameCertificate.ProtoReflect.Descriptor instead. func (*VerifiedNameCertificate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{138} + return file_binary_proto_def_proto_rawDescGZIP(), []int{139} } func (x *VerifiedNameCertificate) GetDetails() []byte { @@ -15610,7 +15689,7 @@ type LocalizedName struct { func (x *LocalizedName) Reset() { *x = LocalizedName{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[139] + mi := &file_binary_proto_def_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15623,7 +15702,7 @@ func (x *LocalizedName) String() string { func (*LocalizedName) ProtoMessage() {} func (x *LocalizedName) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[139] + mi := &file_binary_proto_def_proto_msgTypes[140] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15636,7 +15715,7 @@ func (x *LocalizedName) ProtoReflect() protoreflect.Message { // Deprecated: Use LocalizedName.ProtoReflect.Descriptor instead. func (*LocalizedName) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{139} + return file_binary_proto_def_proto_rawDescGZIP(), []int{140} } func (x *LocalizedName) GetLg() string { @@ -15678,7 +15757,7 @@ type BizIdentityInfo struct { func (x *BizIdentityInfo) Reset() { *x = BizIdentityInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[140] + mi := &file_binary_proto_def_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15691,7 +15770,7 @@ func (x *BizIdentityInfo) String() string { func (*BizIdentityInfo) ProtoMessage() {} func (x *BizIdentityInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[140] + mi := &file_binary_proto_def_proto_msgTypes[141] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15704,7 +15783,7 @@ func (x *BizIdentityInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BizIdentityInfo.ProtoReflect.Descriptor instead. func (*BizIdentityInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{140} + return file_binary_proto_def_proto_rawDescGZIP(), []int{141} } func (x *BizIdentityInfo) GetVlevel() BizIdentityInfo_VerifiedLevelValue { @@ -15775,7 +15854,7 @@ type BizAccountPayload struct { func (x *BizAccountPayload) Reset() { *x = BizAccountPayload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[141] + mi := &file_binary_proto_def_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15788,7 +15867,7 @@ func (x *BizAccountPayload) String() string { func (*BizAccountPayload) ProtoMessage() {} func (x *BizAccountPayload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[141] + mi := &file_binary_proto_def_proto_msgTypes[142] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15801,7 +15880,7 @@ func (x *BizAccountPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use BizAccountPayload.ProtoReflect.Descriptor instead. func (*BizAccountPayload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{141} + return file_binary_proto_def_proto_rawDescGZIP(), []int{142} } func (x *BizAccountPayload) GetVnameCert() *VerifiedNameCertificate { @@ -15833,7 +15912,7 @@ type BizAccountLinkInfo struct { func (x *BizAccountLinkInfo) Reset() { *x = BizAccountLinkInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[142] + mi := &file_binary_proto_def_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15846,7 +15925,7 @@ func (x *BizAccountLinkInfo) String() string { func (*BizAccountLinkInfo) ProtoMessage() {} func (x *BizAccountLinkInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[142] + mi := &file_binary_proto_def_proto_msgTypes[143] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15859,7 +15938,7 @@ func (x *BizAccountLinkInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BizAccountLinkInfo.ProtoReflect.Descriptor instead. func (*BizAccountLinkInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{142} + return file_binary_proto_def_proto_rawDescGZIP(), []int{143} } func (x *BizAccountLinkInfo) GetWhatsappBizAcctFbid() uint64 { @@ -15910,7 +15989,7 @@ type HandshakeMessage struct { func (x *HandshakeMessage) Reset() { *x = HandshakeMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[143] + mi := &file_binary_proto_def_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15923,7 +16002,7 @@ func (x *HandshakeMessage) String() string { func (*HandshakeMessage) ProtoMessage() {} func (x *HandshakeMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[143] + mi := &file_binary_proto_def_proto_msgTypes[144] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15936,7 +16015,7 @@ func (x *HandshakeMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeMessage.ProtoReflect.Descriptor instead. func (*HandshakeMessage) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{143} + return file_binary_proto_def_proto_rawDescGZIP(), []int{144} } func (x *HandshakeMessage) GetClientHello() *HandshakeClientHello { @@ -15973,7 +16052,7 @@ type HandshakeServerHello struct { func (x *HandshakeServerHello) Reset() { *x = HandshakeServerHello{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[144] + mi := &file_binary_proto_def_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -15986,7 +16065,7 @@ func (x *HandshakeServerHello) String() string { func (*HandshakeServerHello) ProtoMessage() {} func (x *HandshakeServerHello) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[144] + mi := &file_binary_proto_def_proto_msgTypes[145] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -15999,7 +16078,7 @@ func (x *HandshakeServerHello) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeServerHello.ProtoReflect.Descriptor instead. func (*HandshakeServerHello) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{144} + return file_binary_proto_def_proto_rawDescGZIP(), []int{145} } func (x *HandshakeServerHello) GetEphemeral() []byte { @@ -16036,7 +16115,7 @@ type HandshakeClientHello struct { func (x *HandshakeClientHello) Reset() { *x = HandshakeClientHello{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[145] + mi := &file_binary_proto_def_proto_msgTypes[146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16049,7 +16128,7 @@ func (x *HandshakeClientHello) String() string { func (*HandshakeClientHello) ProtoMessage() {} func (x *HandshakeClientHello) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[145] + mi := &file_binary_proto_def_proto_msgTypes[146] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16062,7 +16141,7 @@ func (x *HandshakeClientHello) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeClientHello.ProtoReflect.Descriptor instead. func (*HandshakeClientHello) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{145} + return file_binary_proto_def_proto_rawDescGZIP(), []int{146} } func (x *HandshakeClientHello) GetEphemeral() []byte { @@ -16098,7 +16177,7 @@ type HandshakeClientFinish struct { func (x *HandshakeClientFinish) Reset() { *x = HandshakeClientFinish{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[146] + mi := &file_binary_proto_def_proto_msgTypes[147] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16111,7 +16190,7 @@ func (x *HandshakeClientFinish) String() string { func (*HandshakeClientFinish) ProtoMessage() {} func (x *HandshakeClientFinish) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[146] + mi := &file_binary_proto_def_proto_msgTypes[147] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16124,7 +16203,7 @@ func (x *HandshakeClientFinish) ProtoReflect() protoreflect.Message { // Deprecated: Use HandshakeClientFinish.ProtoReflect.Descriptor instead. func (*HandshakeClientFinish) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{146} + return file_binary_proto_def_proto_rawDescGZIP(), []int{147} } func (x *HandshakeClientFinish) GetStatic() []byte { @@ -16178,7 +16257,7 @@ type ClientPayload struct { func (x *ClientPayload) Reset() { *x = ClientPayload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[147] + mi := &file_binary_proto_def_proto_msgTypes[148] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16191,7 +16270,7 @@ func (x *ClientPayload) String() string { func (*ClientPayload) ProtoMessage() {} func (x *ClientPayload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[147] + mi := &file_binary_proto_def_proto_msgTypes[148] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16204,7 +16283,7 @@ func (x *ClientPayload) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload.ProtoReflect.Descriptor instead. func (*ClientPayload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148} } func (x *ClientPayload) GetUsername() uint64 { @@ -16410,7 +16489,7 @@ type WebNotificationsInfo struct { func (x *WebNotificationsInfo) Reset() { *x = WebNotificationsInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[148] + mi := &file_binary_proto_def_proto_msgTypes[149] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16423,7 +16502,7 @@ func (x *WebNotificationsInfo) String() string { func (*WebNotificationsInfo) ProtoMessage() {} func (x *WebNotificationsInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[148] + mi := &file_binary_proto_def_proto_msgTypes[149] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16436,7 +16515,7 @@ func (x *WebNotificationsInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WebNotificationsInfo.ProtoReflect.Descriptor instead. func (*WebNotificationsInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{148} + return file_binary_proto_def_proto_rawDescGZIP(), []int{149} } func (x *WebNotificationsInfo) GetTimestamp() uint64 { @@ -16520,7 +16599,7 @@ type WebMessageInfo struct { func (x *WebMessageInfo) Reset() { *x = WebMessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[149] + mi := &file_binary_proto_def_proto_msgTypes[150] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16533,7 +16612,7 @@ func (x *WebMessageInfo) String() string { func (*WebMessageInfo) ProtoMessage() {} func (x *WebMessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[149] + mi := &file_binary_proto_def_proto_msgTypes[150] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16546,7 +16625,7 @@ func (x *WebMessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WebMessageInfo.ProtoReflect.Descriptor instead. func (*WebMessageInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{149} + return file_binary_proto_def_proto_rawDescGZIP(), []int{150} } func (x *WebMessageInfo) GetKey() *MessageKey { @@ -16905,7 +16984,7 @@ type WebFeatures struct { func (x *WebFeatures) Reset() { *x = WebFeatures{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[150] + mi := &file_binary_proto_def_proto_msgTypes[151] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -16918,7 +16997,7 @@ func (x *WebFeatures) String() string { func (*WebFeatures) ProtoMessage() {} func (x *WebFeatures) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[150] + mi := &file_binary_proto_def_proto_msgTypes[151] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -16931,7 +17010,7 @@ func (x *WebFeatures) ProtoReflect() protoreflect.Message { // Deprecated: Use WebFeatures.ProtoReflect.Descriptor instead. func (*WebFeatures) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{150} + return file_binary_proto_def_proto_rawDescGZIP(), []int{151} } func (x *WebFeatures) GetLabelsDisplay() WebFeatures_Flag { @@ -17265,7 +17344,7 @@ type UserReceipt struct { func (x *UserReceipt) Reset() { *x = UserReceipt{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[151] + mi := &file_binary_proto_def_proto_msgTypes[152] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17278,7 +17357,7 @@ func (x *UserReceipt) String() string { func (*UserReceipt) ProtoMessage() {} func (x *UserReceipt) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[151] + mi := &file_binary_proto_def_proto_msgTypes[152] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17291,7 +17370,7 @@ func (x *UserReceipt) ProtoReflect() protoreflect.Message { // Deprecated: Use UserReceipt.ProtoReflect.Descriptor instead. func (*UserReceipt) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{151} + return file_binary_proto_def_proto_rawDescGZIP(), []int{152} } func (x *UserReceipt) GetUserJid() string { @@ -17348,7 +17427,7 @@ type StatusPSA struct { func (x *StatusPSA) Reset() { *x = StatusPSA{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[152] + mi := &file_binary_proto_def_proto_msgTypes[153] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17361,7 +17440,7 @@ func (x *StatusPSA) String() string { func (*StatusPSA) ProtoMessage() {} func (x *StatusPSA) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[152] + mi := &file_binary_proto_def_proto_msgTypes[153] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17374,7 +17453,7 @@ func (x *StatusPSA) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusPSA.ProtoReflect.Descriptor instead. func (*StatusPSA) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{152} + return file_binary_proto_def_proto_rawDescGZIP(), []int{153} } func (x *StatusPSA) GetCampaignId() uint64 { @@ -17406,7 +17485,7 @@ type Reaction struct { func (x *Reaction) Reset() { *x = Reaction{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[153] + mi := &file_binary_proto_def_proto_msgTypes[154] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17419,7 +17498,7 @@ func (x *Reaction) String() string { func (*Reaction) ProtoMessage() {} func (x *Reaction) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[153] + mi := &file_binary_proto_def_proto_msgTypes[154] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17432,7 +17511,7 @@ func (x *Reaction) ProtoReflect() protoreflect.Message { // Deprecated: Use Reaction.ProtoReflect.Descriptor instead. func (*Reaction) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{153} + return file_binary_proto_def_proto_rawDescGZIP(), []int{154} } func (x *Reaction) GetKey() *MessageKey { @@ -17478,12 +17557,13 @@ type PollUpdate struct { PollUpdateMessageKey *MessageKey `protobuf:"bytes,1,opt,name=pollUpdateMessageKey" json:"pollUpdateMessageKey,omitempty"` Vote *PollVoteMessage `protobuf:"bytes,2,opt,name=vote" json:"vote,omitempty"` SenderTimestampMs *int64 `protobuf:"varint,3,opt,name=senderTimestampMs" json:"senderTimestampMs,omitempty"` + ServerTimestampMs *int64 `protobuf:"varint,4,opt,name=serverTimestampMs" json:"serverTimestampMs,omitempty"` } func (x *PollUpdate) Reset() { *x = PollUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[154] + mi := &file_binary_proto_def_proto_msgTypes[155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17496,7 +17576,7 @@ func (x *PollUpdate) String() string { func (*PollUpdate) ProtoMessage() {} func (x *PollUpdate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[154] + mi := &file_binary_proto_def_proto_msgTypes[155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17509,7 +17589,7 @@ func (x *PollUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use PollUpdate.ProtoReflect.Descriptor instead. func (*PollUpdate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{154} + return file_binary_proto_def_proto_rawDescGZIP(), []int{155} } func (x *PollUpdate) GetPollUpdateMessageKey() *MessageKey { @@ -17533,6 +17613,13 @@ func (x *PollUpdate) GetSenderTimestampMs() int64 { return 0 } +func (x *PollUpdate) GetServerTimestampMs() int64 { + if x != nil && x.ServerTimestampMs != nil { + return *x.ServerTimestampMs + } + return 0 +} + type PollAdditionalMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -17544,7 +17631,7 @@ type PollAdditionalMetadata struct { func (x *PollAdditionalMetadata) Reset() { *x = PollAdditionalMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[155] + mi := &file_binary_proto_def_proto_msgTypes[156] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17557,7 +17644,7 @@ func (x *PollAdditionalMetadata) String() string { func (*PollAdditionalMetadata) ProtoMessage() {} func (x *PollAdditionalMetadata) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[155] + mi := &file_binary_proto_def_proto_msgTypes[156] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17570,7 +17657,7 @@ func (x *PollAdditionalMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use PollAdditionalMetadata.ProtoReflect.Descriptor instead. func (*PollAdditionalMetadata) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{155} + return file_binary_proto_def_proto_rawDescGZIP(), []int{156} } func (x *PollAdditionalMetadata) GetPollInvalidated() bool { @@ -17593,7 +17680,7 @@ type PhotoChange struct { func (x *PhotoChange) Reset() { *x = PhotoChange{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[156] + mi := &file_binary_proto_def_proto_msgTypes[157] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17606,7 +17693,7 @@ func (x *PhotoChange) String() string { func (*PhotoChange) ProtoMessage() {} func (x *PhotoChange) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[156] + mi := &file_binary_proto_def_proto_msgTypes[157] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17619,7 +17706,7 @@ func (x *PhotoChange) ProtoReflect() protoreflect.Message { // Deprecated: Use PhotoChange.ProtoReflect.Descriptor instead. func (*PhotoChange) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{156} + return file_binary_proto_def_proto_rawDescGZIP(), []int{157} } func (x *PhotoChange) GetOldPhoto() []byte { @@ -17666,7 +17753,7 @@ type PaymentInfo struct { func (x *PaymentInfo) Reset() { *x = PaymentInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[157] + mi := &file_binary_proto_def_proto_msgTypes[158] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17679,7 +17766,7 @@ func (x *PaymentInfo) String() string { func (*PaymentInfo) ProtoMessage() {} func (x *PaymentInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[157] + mi := &file_binary_proto_def_proto_msgTypes[158] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17692,7 +17779,7 @@ func (x *PaymentInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentInfo.ProtoReflect.Descriptor instead. func (*PaymentInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{157} + return file_binary_proto_def_proto_rawDescGZIP(), []int{158} } func (x *PaymentInfo) GetCurrencyDeprecated() PaymentInfo_Currency { @@ -17800,7 +17887,7 @@ type NotificationMessageInfo struct { func (x *NotificationMessageInfo) Reset() { *x = NotificationMessageInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[158] + mi := &file_binary_proto_def_proto_msgTypes[159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17813,7 +17900,7 @@ func (x *NotificationMessageInfo) String() string { func (*NotificationMessageInfo) ProtoMessage() {} func (x *NotificationMessageInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[158] + mi := &file_binary_proto_def_proto_msgTypes[159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17826,7 +17913,7 @@ func (x *NotificationMessageInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationMessageInfo.ProtoReflect.Descriptor instead. func (*NotificationMessageInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{158} + return file_binary_proto_def_proto_rawDescGZIP(), []int{159} } func (x *NotificationMessageInfo) GetKey() *MessageKey { @@ -17868,7 +17955,7 @@ type MediaData struct { func (x *MediaData) Reset() { *x = MediaData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[159] + mi := &file_binary_proto_def_proto_msgTypes[160] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17881,7 +17968,7 @@ func (x *MediaData) String() string { func (*MediaData) ProtoMessage() {} func (x *MediaData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[159] + mi := &file_binary_proto_def_proto_msgTypes[160] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17894,7 +17981,7 @@ func (x *MediaData) ProtoReflect() protoreflect.Message { // Deprecated: Use MediaData.ProtoReflect.Descriptor instead. func (*MediaData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{159} + return file_binary_proto_def_proto_rawDescGZIP(), []int{160} } func (x *MediaData) GetLocalPath() string { @@ -17920,7 +18007,7 @@ type KeepInChat struct { func (x *KeepInChat) Reset() { *x = KeepInChat{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[160] + mi := &file_binary_proto_def_proto_msgTypes[161] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -17933,7 +18020,7 @@ func (x *KeepInChat) String() string { func (*KeepInChat) ProtoMessage() {} func (x *KeepInChat) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[160] + mi := &file_binary_proto_def_proto_msgTypes[161] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -17946,7 +18033,7 @@ func (x *KeepInChat) ProtoReflect() protoreflect.Message { // Deprecated: Use KeepInChat.ProtoReflect.Descriptor instead. func (*KeepInChat) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{160} + return file_binary_proto_def_proto_rawDescGZIP(), []int{161} } func (x *KeepInChat) GetKeepType() KeepType { @@ -18003,7 +18090,7 @@ type NoiseCertificate struct { func (x *NoiseCertificate) Reset() { *x = NoiseCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[161] + mi := &file_binary_proto_def_proto_msgTypes[162] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18016,7 +18103,7 @@ func (x *NoiseCertificate) String() string { func (*NoiseCertificate) ProtoMessage() {} func (x *NoiseCertificate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[161] + mi := &file_binary_proto_def_proto_msgTypes[162] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18029,7 +18116,7 @@ func (x *NoiseCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use NoiseCertificate.ProtoReflect.Descriptor instead. func (*NoiseCertificate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{161} + return file_binary_proto_def_proto_rawDescGZIP(), []int{162} } func (x *NoiseCertificate) GetDetails() []byte { @@ -18058,7 +18145,7 @@ type CertChain struct { func (x *CertChain) Reset() { *x = CertChain{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[162] + mi := &file_binary_proto_def_proto_msgTypes[163] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18071,7 +18158,7 @@ func (x *CertChain) String() string { func (*CertChain) ProtoMessage() {} func (x *CertChain) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[162] + mi := &file_binary_proto_def_proto_msgTypes[163] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18084,7 +18171,7 @@ func (x *CertChain) ProtoReflect() protoreflect.Message { // Deprecated: Use CertChain.ProtoReflect.Descriptor instead. func (*CertChain) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{162} + return file_binary_proto_def_proto_rawDescGZIP(), []int{163} } func (x *CertChain) GetLeaf() *CertChain_NoiseCertificate { @@ -18114,7 +18201,7 @@ type DeviceProps_HistorySyncConfig struct { func (x *DeviceProps_HistorySyncConfig) Reset() { *x = DeviceProps_HistorySyncConfig{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[163] + mi := &file_binary_proto_def_proto_msgTypes[164] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18127,7 +18214,7 @@ func (x *DeviceProps_HistorySyncConfig) String() string { func (*DeviceProps_HistorySyncConfig) ProtoMessage() {} func (x *DeviceProps_HistorySyncConfig) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[163] + mi := &file_binary_proto_def_proto_msgTypes[164] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18179,7 +18266,7 @@ type DeviceProps_AppVersion struct { func (x *DeviceProps_AppVersion) Reset() { *x = DeviceProps_AppVersion{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[164] + mi := &file_binary_proto_def_proto_msgTypes[165] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18192,7 +18279,7 @@ func (x *DeviceProps_AppVersion) String() string { func (*DeviceProps_AppVersion) ProtoMessage() {} func (x *DeviceProps_AppVersion) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[164] + mi := &file_binary_proto_def_proto_msgTypes[165] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18256,7 +18343,7 @@ type PeerDataOperationRequestResponseMessage_PeerDataOperationResult struct { func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) Reset() { *x = PeerDataOperationRequestResponseMessage_PeerDataOperationResult{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[165] + mi := &file_binary_proto_def_proto_msgTypes[166] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18269,7 +18356,7 @@ func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) String func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult) ProtoMessage() {} func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[165] + mi := &file_binary_proto_def_proto_msgTypes[166] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18323,7 +18410,7 @@ type PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreview func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse) Reset() { *x = PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[166] + mi := &file_binary_proto_def_proto_msgTypes[167] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18337,7 +18424,7 @@ func (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPrevi } func (x *PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[166] + mi := &file_binary_proto_def_proto_msgTypes[167] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18413,7 +18500,7 @@ type PeerDataOperationRequestMessage_RequestUrlPreview struct { func (x *PeerDataOperationRequestMessage_RequestUrlPreview) Reset() { *x = PeerDataOperationRequestMessage_RequestUrlPreview{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[167] + mi := &file_binary_proto_def_proto_msgTypes[168] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18426,7 +18513,7 @@ func (x *PeerDataOperationRequestMessage_RequestUrlPreview) String() string { func (*PeerDataOperationRequestMessage_RequestUrlPreview) ProtoMessage() {} func (x *PeerDataOperationRequestMessage_RequestUrlPreview) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[167] + mi := &file_binary_proto_def_proto_msgTypes[168] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18460,7 +18547,7 @@ type PeerDataOperationRequestMessage_RequestStickerReupload struct { func (x *PeerDataOperationRequestMessage_RequestStickerReupload) Reset() { *x = PeerDataOperationRequestMessage_RequestStickerReupload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[168] + mi := &file_binary_proto_def_proto_msgTypes[169] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18473,7 +18560,7 @@ func (x *PeerDataOperationRequestMessage_RequestStickerReupload) String() string func (*PeerDataOperationRequestMessage_RequestStickerReupload) ProtoMessage() {} func (x *PeerDataOperationRequestMessage_RequestStickerReupload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[168] + mi := &file_binary_proto_def_proto_msgTypes[169] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18507,7 +18594,7 @@ type ListResponseMessage_SingleSelectReply struct { func (x *ListResponseMessage_SingleSelectReply) Reset() { *x = ListResponseMessage_SingleSelectReply{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[169] + mi := &file_binary_proto_def_proto_msgTypes[170] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18520,7 +18607,7 @@ func (x *ListResponseMessage_SingleSelectReply) String() string { func (*ListResponseMessage_SingleSelectReply) ProtoMessage() {} func (x *ListResponseMessage_SingleSelectReply) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[169] + mi := &file_binary_proto_def_proto_msgTypes[170] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18555,7 +18642,7 @@ type ListMessage_Section struct { func (x *ListMessage_Section) Reset() { *x = ListMessage_Section{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[170] + mi := &file_binary_proto_def_proto_msgTypes[171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18568,7 +18655,7 @@ func (x *ListMessage_Section) String() string { func (*ListMessage_Section) ProtoMessage() {} func (x *ListMessage_Section) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[170] + mi := &file_binary_proto_def_proto_msgTypes[171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18611,7 +18698,7 @@ type ListMessage_Row struct { func (x *ListMessage_Row) Reset() { *x = ListMessage_Row{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[171] + mi := &file_binary_proto_def_proto_msgTypes[172] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18624,7 +18711,7 @@ func (x *ListMessage_Row) String() string { func (*ListMessage_Row) ProtoMessage() {} func (x *ListMessage_Row) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[171] + mi := &file_binary_proto_def_proto_msgTypes[172] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18672,7 +18759,7 @@ type ListMessage_Product struct { func (x *ListMessage_Product) Reset() { *x = ListMessage_Product{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[172] + mi := &file_binary_proto_def_proto_msgTypes[173] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18685,7 +18772,7 @@ func (x *ListMessage_Product) String() string { func (*ListMessage_Product) ProtoMessage() {} func (x *ListMessage_Product) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[172] + mi := &file_binary_proto_def_proto_msgTypes[173] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18720,7 +18807,7 @@ type ListMessage_ProductSection struct { func (x *ListMessage_ProductSection) Reset() { *x = ListMessage_ProductSection{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[173] + mi := &file_binary_proto_def_proto_msgTypes[174] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18733,7 +18820,7 @@ func (x *ListMessage_ProductSection) String() string { func (*ListMessage_ProductSection) ProtoMessage() {} func (x *ListMessage_ProductSection) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[173] + mi := &file_binary_proto_def_proto_msgTypes[174] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18776,7 +18863,7 @@ type ListMessage_ProductListInfo struct { func (x *ListMessage_ProductListInfo) Reset() { *x = ListMessage_ProductListInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[174] + mi := &file_binary_proto_def_proto_msgTypes[175] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18789,7 +18876,7 @@ func (x *ListMessage_ProductListInfo) String() string { func (*ListMessage_ProductListInfo) ProtoMessage() {} func (x *ListMessage_ProductListInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[174] + mi := &file_binary_proto_def_proto_msgTypes[175] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18838,7 +18925,7 @@ type ListMessage_ProductListHeaderImage struct { func (x *ListMessage_ProductListHeaderImage) Reset() { *x = ListMessage_ProductListHeaderImage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[175] + mi := &file_binary_proto_def_proto_msgTypes[176] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18851,7 +18938,7 @@ func (x *ListMessage_ProductListHeaderImage) String() string { func (*ListMessage_ProductListHeaderImage) ProtoMessage() {} func (x *ListMessage_ProductListHeaderImage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[175] + mi := &file_binary_proto_def_proto_msgTypes[176] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18894,7 +18981,7 @@ type InteractiveResponseMessage_NativeFlowResponseMessage struct { func (x *InteractiveResponseMessage_NativeFlowResponseMessage) Reset() { *x = InteractiveResponseMessage_NativeFlowResponseMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[176] + mi := &file_binary_proto_def_proto_msgTypes[177] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18907,7 +18994,7 @@ func (x *InteractiveResponseMessage_NativeFlowResponseMessage) String() string { func (*InteractiveResponseMessage_NativeFlowResponseMessage) ProtoMessage() {} func (x *InteractiveResponseMessage_NativeFlowResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[176] + mi := &file_binary_proto_def_proto_msgTypes[177] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -18955,7 +19042,7 @@ type InteractiveResponseMessage_Body struct { func (x *InteractiveResponseMessage_Body) Reset() { *x = InteractiveResponseMessage_Body{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[177] + mi := &file_binary_proto_def_proto_msgTypes[178] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -18968,7 +19055,7 @@ func (x *InteractiveResponseMessage_Body) String() string { func (*InteractiveResponseMessage_Body) ProtoMessage() {} func (x *InteractiveResponseMessage_Body) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[177] + mi := &file_binary_proto_def_proto_msgTypes[178] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19004,7 +19091,7 @@ type InteractiveMessage_ShopMessage struct { func (x *InteractiveMessage_ShopMessage) Reset() { *x = InteractiveMessage_ShopMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[178] + mi := &file_binary_proto_def_proto_msgTypes[179] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19017,7 +19104,7 @@ func (x *InteractiveMessage_ShopMessage) String() string { func (*InteractiveMessage_ShopMessage) ProtoMessage() {} func (x *InteractiveMessage_ShopMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[178] + mi := &file_binary_proto_def_proto_msgTypes[179] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19067,7 +19154,7 @@ type InteractiveMessage_NativeFlowMessage struct { func (x *InteractiveMessage_NativeFlowMessage) Reset() { *x = InteractiveMessage_NativeFlowMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[179] + mi := &file_binary_proto_def_proto_msgTypes[180] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19080,7 +19167,7 @@ func (x *InteractiveMessage_NativeFlowMessage) String() string { func (*InteractiveMessage_NativeFlowMessage) ProtoMessage() {} func (x *InteractiveMessage_NativeFlowMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[179] + mi := &file_binary_proto_def_proto_msgTypes[180] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19137,7 +19224,7 @@ type InteractiveMessage_Header struct { func (x *InteractiveMessage_Header) Reset() { *x = InteractiveMessage_Header{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[180] + mi := &file_binary_proto_def_proto_msgTypes[181] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19150,7 +19237,7 @@ func (x *InteractiveMessage_Header) String() string { func (*InteractiveMessage_Header) ProtoMessage() {} func (x *InteractiveMessage_Header) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[180] + mi := &file_binary_proto_def_proto_msgTypes[181] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19261,7 +19348,7 @@ type InteractiveMessage_Footer struct { func (x *InteractiveMessage_Footer) Reset() { *x = InteractiveMessage_Footer{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[181] + mi := &file_binary_proto_def_proto_msgTypes[182] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19274,7 +19361,7 @@ func (x *InteractiveMessage_Footer) String() string { func (*InteractiveMessage_Footer) ProtoMessage() {} func (x *InteractiveMessage_Footer) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[181] + mi := &file_binary_proto_def_proto_msgTypes[182] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19310,7 +19397,7 @@ type InteractiveMessage_CollectionMessage struct { func (x *InteractiveMessage_CollectionMessage) Reset() { *x = InteractiveMessage_CollectionMessage{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[182] + mi := &file_binary_proto_def_proto_msgTypes[183] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19323,7 +19410,7 @@ func (x *InteractiveMessage_CollectionMessage) String() string { func (*InteractiveMessage_CollectionMessage) ProtoMessage() {} func (x *InteractiveMessage_CollectionMessage) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[182] + mi := &file_binary_proto_def_proto_msgTypes[183] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19371,7 +19458,7 @@ type InteractiveMessage_Body struct { func (x *InteractiveMessage_Body) Reset() { *x = InteractiveMessage_Body{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[183] + mi := &file_binary_proto_def_proto_msgTypes[184] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19384,7 +19471,7 @@ func (x *InteractiveMessage_Body) String() string { func (*InteractiveMessage_Body) ProtoMessage() {} func (x *InteractiveMessage_Body) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[183] + mi := &file_binary_proto_def_proto_msgTypes[184] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19419,7 +19506,7 @@ type InteractiveMessage_NativeFlowMessage_NativeFlowButton struct { func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) Reset() { *x = InteractiveMessage_NativeFlowMessage_NativeFlowButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[184] + mi := &file_binary_proto_def_proto_msgTypes[185] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19432,7 +19519,7 @@ func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) String() string func (*InteractiveMessage_NativeFlowMessage_NativeFlowButton) ProtoMessage() {} func (x *InteractiveMessage_NativeFlowMessage_NativeFlowButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[184] + mi := &file_binary_proto_def_proto_msgTypes[185] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19478,7 +19565,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter struct { func (x *HighlyStructuredMessage_HSMLocalizableParameter) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[185] + mi := &file_binary_proto_def_proto_msgTypes[186] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19491,7 +19578,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter) String() string { func (*HighlyStructuredMessage_HSMLocalizableParameter) ProtoMessage() {} func (x *HighlyStructuredMessage_HSMLocalizableParameter) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[185] + mi := &file_binary_proto_def_proto_msgTypes[186] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19568,7 +19655,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime struct { func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[186] + mi := &file_binary_proto_def_proto_msgTypes[187] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19581,7 +19668,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) String() s func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) ProtoMessage() {} func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[186] + mi := &file_binary_proto_def_proto_msgTypes[187] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19648,7 +19735,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency struct { func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[187] + mi := &file_binary_proto_def_proto_msgTypes[188] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19661,7 +19748,7 @@ func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) String() s func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) ProtoMessage() {} func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[187] + mi := &file_binary_proto_def_proto_msgTypes[188] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19702,7 +19789,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnix func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[188] + mi := &file_binary_proto_def_proto_msgTypes[189] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19716,7 +19803,7 @@ func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUn } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[188] + mi := &file_binary_proto_def_proto_msgTypes[189] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19756,7 +19843,7 @@ type HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComp func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent) Reset() { *x = HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[189] + mi := &file_binary_proto_def_proto_msgTypes[190] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19770,7 +19857,7 @@ func (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeCo } func (x *HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[189] + mi := &file_binary_proto_def_proto_msgTypes[190] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19849,7 +19936,7 @@ type ButtonsMessage_Button struct { func (x *ButtonsMessage_Button) Reset() { *x = ButtonsMessage_Button{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[190] + mi := &file_binary_proto_def_proto_msgTypes[191] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19862,7 +19949,7 @@ func (x *ButtonsMessage_Button) String() string { func (*ButtonsMessage_Button) ProtoMessage() {} func (x *ButtonsMessage_Button) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[190] + mi := &file_binary_proto_def_proto_msgTypes[191] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19918,7 +20005,7 @@ type ButtonsMessage_Button_NativeFlowInfo struct { func (x *ButtonsMessage_Button_NativeFlowInfo) Reset() { *x = ButtonsMessage_Button_NativeFlowInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[191] + mi := &file_binary_proto_def_proto_msgTypes[192] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19931,7 +20018,7 @@ func (x *ButtonsMessage_Button_NativeFlowInfo) String() string { func (*ButtonsMessage_Button_NativeFlowInfo) ProtoMessage() {} func (x *ButtonsMessage_Button_NativeFlowInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[191] + mi := &file_binary_proto_def_proto_msgTypes[192] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -19972,7 +20059,7 @@ type ButtonsMessage_Button_ButtonText struct { func (x *ButtonsMessage_Button_ButtonText) Reset() { *x = ButtonsMessage_Button_ButtonText{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[192] + mi := &file_binary_proto_def_proto_msgTypes[193] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -19985,7 +20072,7 @@ func (x *ButtonsMessage_Button_ButtonText) String() string { func (*ButtonsMessage_Button_ButtonText) ProtoMessage() {} func (x *ButtonsMessage_Button_ButtonText) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[192] + mi := &file_binary_proto_def_proto_msgTypes[193] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20020,7 +20107,7 @@ type HydratedTemplateButton_HydratedURLButton struct { func (x *HydratedTemplateButton_HydratedURLButton) Reset() { *x = HydratedTemplateButton_HydratedURLButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[193] + mi := &file_binary_proto_def_proto_msgTypes[194] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20033,7 +20120,7 @@ func (x *HydratedTemplateButton_HydratedURLButton) String() string { func (*HydratedTemplateButton_HydratedURLButton) ProtoMessage() {} func (x *HydratedTemplateButton_HydratedURLButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[193] + mi := &file_binary_proto_def_proto_msgTypes[194] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20075,7 +20162,7 @@ type HydratedTemplateButton_HydratedQuickReplyButton struct { func (x *HydratedTemplateButton_HydratedQuickReplyButton) Reset() { *x = HydratedTemplateButton_HydratedQuickReplyButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[194] + mi := &file_binary_proto_def_proto_msgTypes[195] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20088,7 +20175,7 @@ func (x *HydratedTemplateButton_HydratedQuickReplyButton) String() string { func (*HydratedTemplateButton_HydratedQuickReplyButton) ProtoMessage() {} func (x *HydratedTemplateButton_HydratedQuickReplyButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[194] + mi := &file_binary_proto_def_proto_msgTypes[195] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20130,7 +20217,7 @@ type HydratedTemplateButton_HydratedCallButton struct { func (x *HydratedTemplateButton_HydratedCallButton) Reset() { *x = HydratedTemplateButton_HydratedCallButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[195] + mi := &file_binary_proto_def_proto_msgTypes[196] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20143,7 +20230,7 @@ func (x *HydratedTemplateButton_HydratedCallButton) String() string { func (*HydratedTemplateButton_HydratedCallButton) ProtoMessage() {} func (x *HydratedTemplateButton_HydratedCallButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[195] + mi := &file_binary_proto_def_proto_msgTypes[196] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20196,7 +20283,7 @@ type ContextInfo_ExternalAdReplyInfo struct { func (x *ContextInfo_ExternalAdReplyInfo) Reset() { *x = ContextInfo_ExternalAdReplyInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[196] + mi := &file_binary_proto_def_proto_msgTypes[197] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20209,7 +20296,7 @@ func (x *ContextInfo_ExternalAdReplyInfo) String() string { func (*ContextInfo_ExternalAdReplyInfo) ProtoMessage() {} func (x *ContextInfo_ExternalAdReplyInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[196] + mi := &file_binary_proto_def_proto_msgTypes[197] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20330,7 +20417,7 @@ type ContextInfo_AdReplyInfo struct { func (x *ContextInfo_AdReplyInfo) Reset() { *x = ContextInfo_AdReplyInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[197] + mi := &file_binary_proto_def_proto_msgTypes[198] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20343,7 +20430,7 @@ func (x *ContextInfo_AdReplyInfo) String() string { func (*ContextInfo_AdReplyInfo) ProtoMessage() {} func (x *ContextInfo_AdReplyInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[197] + mi := &file_binary_proto_def_proto_msgTypes[198] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20399,7 +20486,7 @@ type TemplateButton_URLButton struct { func (x *TemplateButton_URLButton) Reset() { *x = TemplateButton_URLButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[198] + mi := &file_binary_proto_def_proto_msgTypes[199] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20412,7 +20499,7 @@ func (x *TemplateButton_URLButton) String() string { func (*TemplateButton_URLButton) ProtoMessage() {} func (x *TemplateButton_URLButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[198] + mi := &file_binary_proto_def_proto_msgTypes[199] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20454,7 +20541,7 @@ type TemplateButton_QuickReplyButton struct { func (x *TemplateButton_QuickReplyButton) Reset() { *x = TemplateButton_QuickReplyButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[199] + mi := &file_binary_proto_def_proto_msgTypes[200] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20467,7 +20554,7 @@ func (x *TemplateButton_QuickReplyButton) String() string { func (*TemplateButton_QuickReplyButton) ProtoMessage() {} func (x *TemplateButton_QuickReplyButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[199] + mi := &file_binary_proto_def_proto_msgTypes[200] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20509,7 +20596,7 @@ type TemplateButton_CallButton struct { func (x *TemplateButton_CallButton) Reset() { *x = TemplateButton_CallButton{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[200] + mi := &file_binary_proto_def_proto_msgTypes[201] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20522,7 +20609,7 @@ func (x *TemplateButton_CallButton) String() string { func (*TemplateButton_CallButton) ProtoMessage() {} func (x *TemplateButton_CallButton) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[200] + mi := &file_binary_proto_def_proto_msgTypes[201] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20567,7 +20654,7 @@ type PaymentBackground_MediaData struct { func (x *PaymentBackground_MediaData) Reset() { *x = PaymentBackground_MediaData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[201] + mi := &file_binary_proto_def_proto_msgTypes[202] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20580,7 +20667,7 @@ func (x *PaymentBackground_MediaData) String() string { func (*PaymentBackground_MediaData) ProtoMessage() {} func (x *PaymentBackground_MediaData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[201] + mi := &file_binary_proto_def_proto_msgTypes[202] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20653,7 +20740,7 @@ type TemplateMessage_HydratedFourRowTemplate struct { func (x *TemplateMessage_HydratedFourRowTemplate) Reset() { *x = TemplateMessage_HydratedFourRowTemplate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[202] + mi := &file_binary_proto_def_proto_msgTypes[203] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20666,7 +20753,7 @@ func (x *TemplateMessage_HydratedFourRowTemplate) String() string { func (*TemplateMessage_HydratedFourRowTemplate) ProtoMessage() {} func (x *TemplateMessage_HydratedFourRowTemplate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[202] + mi := &file_binary_proto_def_proto_msgTypes[203] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20812,7 +20899,7 @@ type TemplateMessage_FourRowTemplate struct { func (x *TemplateMessage_FourRowTemplate) Reset() { *x = TemplateMessage_FourRowTemplate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[203] + mi := &file_binary_proto_def_proto_msgTypes[204] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20825,7 +20912,7 @@ func (x *TemplateMessage_FourRowTemplate) String() string { func (*TemplateMessage_FourRowTemplate) ProtoMessage() {} func (x *TemplateMessage_FourRowTemplate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[203] + mi := &file_binary_proto_def_proto_msgTypes[204] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -20960,7 +21047,7 @@ type ProductMessage_ProductSnapshot struct { func (x *ProductMessage_ProductSnapshot) Reset() { *x = ProductMessage_ProductSnapshot{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[204] + mi := &file_binary_proto_def_proto_msgTypes[205] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -20973,7 +21060,7 @@ func (x *ProductMessage_ProductSnapshot) String() string { func (*ProductMessage_ProductSnapshot) ProtoMessage() {} func (x *ProductMessage_ProductSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[204] + mi := &file_binary_proto_def_proto_msgTypes[205] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21079,7 +21166,7 @@ type ProductMessage_CatalogSnapshot struct { func (x *ProductMessage_CatalogSnapshot) Reset() { *x = ProductMessage_CatalogSnapshot{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[205] + mi := &file_binary_proto_def_proto_msgTypes[206] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21092,7 +21179,7 @@ func (x *ProductMessage_CatalogSnapshot) String() string { func (*ProductMessage_CatalogSnapshot) ProtoMessage() {} func (x *ProductMessage_CatalogSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[205] + mi := &file_binary_proto_def_proto_msgTypes[206] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21140,7 +21227,7 @@ type PollCreationMessage_Option struct { func (x *PollCreationMessage_Option) Reset() { *x = PollCreationMessage_Option{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[206] + mi := &file_binary_proto_def_proto_msgTypes[207] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21153,7 +21240,7 @@ func (x *PollCreationMessage_Option) String() string { func (*PollCreationMessage_Option) ProtoMessage() {} func (x *PollCreationMessage_Option) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[206] + mi := &file_binary_proto_def_proto_msgTypes[207] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21187,7 +21274,7 @@ type MsgOpaqueData_PollOption struct { func (x *MsgOpaqueData_PollOption) Reset() { *x = MsgOpaqueData_PollOption{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[207] + mi := &file_binary_proto_def_proto_msgTypes[208] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21200,7 +21287,7 @@ func (x *MsgOpaqueData_PollOption) String() string { func (*MsgOpaqueData_PollOption) ProtoMessage() {} func (x *MsgOpaqueData_PollOption) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[207] + mi := &file_binary_proto_def_proto_msgTypes[208] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21238,7 +21325,7 @@ type VerifiedNameCertificate_Details struct { func (x *VerifiedNameCertificate_Details) Reset() { *x = VerifiedNameCertificate_Details{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[208] + mi := &file_binary_proto_def_proto_msgTypes[209] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21251,7 +21338,7 @@ func (x *VerifiedNameCertificate_Details) String() string { func (*VerifiedNameCertificate_Details) ProtoMessage() {} func (x *VerifiedNameCertificate_Details) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[208] + mi := &file_binary_proto_def_proto_msgTypes[209] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21264,7 +21351,7 @@ func (x *VerifiedNameCertificate_Details) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifiedNameCertificate_Details.ProtoReflect.Descriptor instead. func (*VerifiedNameCertificate_Details) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{138, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{139, 0} } func (x *VerifiedNameCertificate_Details) GetSerial() uint64 { @@ -21316,7 +21403,7 @@ type ClientPayload_WebInfo struct { func (x *ClientPayload_WebInfo) Reset() { *x = ClientPayload_WebInfo{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[209] + mi := &file_binary_proto_def_proto_msgTypes[210] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21329,7 +21416,7 @@ func (x *ClientPayload_WebInfo) String() string { func (*ClientPayload_WebInfo) ProtoMessage() {} func (x *ClientPayload_WebInfo) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[209] + mi := &file_binary_proto_def_proto_msgTypes[210] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21342,7 +21429,7 @@ func (x *ClientPayload_WebInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_WebInfo.ProtoReflect.Descriptor instead. func (*ClientPayload_WebInfo) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 0} } func (x *ClientPayload_WebInfo) GetRefToken() string { @@ -21396,7 +21483,7 @@ type ClientPayload_UserAgent struct { func (x *ClientPayload_UserAgent) Reset() { *x = ClientPayload_UserAgent{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[210] + mi := &file_binary_proto_def_proto_msgTypes[211] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21409,7 +21496,7 @@ func (x *ClientPayload_UserAgent) String() string { func (*ClientPayload_UserAgent) ProtoMessage() {} func (x *ClientPayload_UserAgent) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[210] + mi := &file_binary_proto_def_proto_msgTypes[211] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21422,7 +21509,7 @@ func (x *ClientPayload_UserAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_UserAgent.ProtoReflect.Descriptor instead. func (*ClientPayload_UserAgent) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 1} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 1} } func (x *ClientPayload_UserAgent) GetPlatform() ClientPayload_UserAgent_Platform { @@ -21534,7 +21621,7 @@ type ClientPayload_DevicePairingRegistrationData struct { func (x *ClientPayload_DevicePairingRegistrationData) Reset() { *x = ClientPayload_DevicePairingRegistrationData{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[211] + mi := &file_binary_proto_def_proto_msgTypes[212] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21547,7 +21634,7 @@ func (x *ClientPayload_DevicePairingRegistrationData) String() string { func (*ClientPayload_DevicePairingRegistrationData) ProtoMessage() {} func (x *ClientPayload_DevicePairingRegistrationData) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[211] + mi := &file_binary_proto_def_proto_msgTypes[212] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21560,7 +21647,7 @@ func (x *ClientPayload_DevicePairingRegistrationData) ProtoReflect() protoreflec // Deprecated: Use ClientPayload_DevicePairingRegistrationData.ProtoReflect.Descriptor instead. func (*ClientPayload_DevicePairingRegistrationData) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 2} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 2} } func (x *ClientPayload_DevicePairingRegistrationData) GetERegid() []byte { @@ -21631,7 +21718,7 @@ type ClientPayload_DNSSource struct { func (x *ClientPayload_DNSSource) Reset() { *x = ClientPayload_DNSSource{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[212] + mi := &file_binary_proto_def_proto_msgTypes[213] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21644,7 +21731,7 @@ func (x *ClientPayload_DNSSource) String() string { func (*ClientPayload_DNSSource) ProtoMessage() {} func (x *ClientPayload_DNSSource) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[212] + mi := &file_binary_proto_def_proto_msgTypes[213] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21657,7 +21744,7 @@ func (x *ClientPayload_DNSSource) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientPayload_DNSSource.ProtoReflect.Descriptor instead. func (*ClientPayload_DNSSource) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 3} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 3} } func (x *ClientPayload_DNSSource) GetDnsMethod() ClientPayload_DNSSource_DNSResolutionMethod { @@ -21695,7 +21782,7 @@ type ClientPayload_WebInfo_WebdPayload struct { func (x *ClientPayload_WebInfo_WebdPayload) Reset() { *x = ClientPayload_WebInfo_WebdPayload{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[213] + mi := &file_binary_proto_def_proto_msgTypes[214] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21708,7 +21795,7 @@ func (x *ClientPayload_WebInfo_WebdPayload) String() string { func (*ClientPayload_WebInfo_WebdPayload) ProtoMessage() {} func (x *ClientPayload_WebInfo_WebdPayload) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[213] + mi := &file_binary_proto_def_proto_msgTypes[214] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21721,7 +21808,7 @@ func (x *ClientPayload_WebInfo_WebdPayload) ProtoReflect() protoreflect.Message // Deprecated: Use ClientPayload_WebInfo_WebdPayload.ProtoReflect.Descriptor instead. func (*ClientPayload_WebInfo_WebdPayload) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 0, 0} } func (x *ClientPayload_WebInfo_WebdPayload) GetUsesParticipantInKey() bool { @@ -21816,7 +21903,7 @@ type ClientPayload_UserAgent_AppVersion struct { func (x *ClientPayload_UserAgent_AppVersion) Reset() { *x = ClientPayload_UserAgent_AppVersion{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[214] + mi := &file_binary_proto_def_proto_msgTypes[215] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21829,7 +21916,7 @@ func (x *ClientPayload_UserAgent_AppVersion) String() string { func (*ClientPayload_UserAgent_AppVersion) ProtoMessage() {} func (x *ClientPayload_UserAgent_AppVersion) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[214] + mi := &file_binary_proto_def_proto_msgTypes[215] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21842,7 +21929,7 @@ func (x *ClientPayload_UserAgent_AppVersion) ProtoReflect() protoreflect.Message // Deprecated: Use ClientPayload_UserAgent_AppVersion.ProtoReflect.Descriptor instead. func (*ClientPayload_UserAgent_AppVersion) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{147, 1, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{148, 1, 0} } func (x *ClientPayload_UserAgent_AppVersion) GetPrimary() uint32 { @@ -21895,7 +21982,7 @@ type NoiseCertificate_Details struct { func (x *NoiseCertificate_Details) Reset() { *x = NoiseCertificate_Details{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[215] + mi := &file_binary_proto_def_proto_msgTypes[216] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21908,7 +21995,7 @@ func (x *NoiseCertificate_Details) String() string { func (*NoiseCertificate_Details) ProtoMessage() {} func (x *NoiseCertificate_Details) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[215] + mi := &file_binary_proto_def_proto_msgTypes[216] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21921,7 +22008,7 @@ func (x *NoiseCertificate_Details) ProtoReflect() protoreflect.Message { // Deprecated: Use NoiseCertificate_Details.ProtoReflect.Descriptor instead. func (*NoiseCertificate_Details) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{161, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{162, 0} } func (x *NoiseCertificate_Details) GetSerial() uint32 { @@ -21971,7 +22058,7 @@ type CertChain_NoiseCertificate struct { func (x *CertChain_NoiseCertificate) Reset() { *x = CertChain_NoiseCertificate{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[216] + mi := &file_binary_proto_def_proto_msgTypes[217] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -21984,7 +22071,7 @@ func (x *CertChain_NoiseCertificate) String() string { func (*CertChain_NoiseCertificate) ProtoMessage() {} func (x *CertChain_NoiseCertificate) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[216] + mi := &file_binary_proto_def_proto_msgTypes[217] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -21997,7 +22084,7 @@ func (x *CertChain_NoiseCertificate) ProtoReflect() protoreflect.Message { // Deprecated: Use CertChain_NoiseCertificate.ProtoReflect.Descriptor instead. func (*CertChain_NoiseCertificate) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{162, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{163, 0} } func (x *CertChain_NoiseCertificate) GetDetails() []byte { @@ -22029,7 +22116,7 @@ type CertChain_NoiseCertificate_Details struct { func (x *CertChain_NoiseCertificate_Details) Reset() { *x = CertChain_NoiseCertificate_Details{} if protoimpl.UnsafeEnabled { - mi := &file_binary_proto_def_proto_msgTypes[217] + mi := &file_binary_proto_def_proto_msgTypes[218] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -22042,7 +22129,7 @@ func (x *CertChain_NoiseCertificate_Details) String() string { func (*CertChain_NoiseCertificate_Details) ProtoMessage() {} func (x *CertChain_NoiseCertificate_Details) ProtoReflect() protoreflect.Message { - mi := &file_binary_proto_def_proto_msgTypes[217] + mi := &file_binary_proto_def_proto_msgTypes[218] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -22055,7 +22142,7 @@ func (x *CertChain_NoiseCertificate_Details) ProtoReflect() protoreflect.Message // Deprecated: Use CertChain_NoiseCertificate_Details.ProtoReflect.Descriptor instead. func (*CertChain_NoiseCertificate_Details) Descriptor() ([]byte, []int) { - return file_binary_proto_def_proto_rawDescGZIP(), []int{162, 0, 0} + return file_binary_proto_def_proto_rawDescGZIP(), []int{163, 0, 0} } func (x *CertChain_NoiseCertificate_Details) GetSerial() uint32 { @@ -22111,7 +22198,7 @@ func file_binary_proto_def_proto_rawDescGZIP() []byte { } var file_binary_proto_def_proto_enumTypes = make([]protoimpl.EnumInfo, 54) -var file_binary_proto_def_proto_msgTypes = make([]protoimpl.MessageInfo, 218) +var file_binary_proto_def_proto_msgTypes = make([]protoimpl.MessageInfo, 219) var file_binary_proto_def_proto_goTypes = []interface{}{ (PeerDataOperationRequestType)(0), // 0: proto.PeerDataOperationRequestType (KeepType)(0), // 1: proto.KeepType @@ -22286,115 +22373,116 @@ var file_binary_proto_def_proto_goTypes = []interface{}{ (*PushNameSetting)(nil), // 170: proto.PushNameSetting (*PrimaryVersionAction)(nil), // 171: proto.PrimaryVersionAction (*PrimaryFeature)(nil), // 172: proto.PrimaryFeature - (*PinAction)(nil), // 173: proto.PinAction - (*NuxAction)(nil), // 174: proto.NuxAction - (*MuteAction)(nil), // 175: proto.MuteAction - (*MarkChatAsReadAction)(nil), // 176: proto.MarkChatAsReadAction - (*LocaleSetting)(nil), // 177: proto.LocaleSetting - (*LabelEditAction)(nil), // 178: proto.LabelEditAction - (*LabelAssociationAction)(nil), // 179: proto.LabelAssociationAction - (*KeyExpiration)(nil), // 180: proto.KeyExpiration - (*DeleteMessageForMeAction)(nil), // 181: proto.DeleteMessageForMeAction - (*DeleteChatAction)(nil), // 182: proto.DeleteChatAction - (*ContactAction)(nil), // 183: proto.ContactAction - (*ClearChatAction)(nil), // 184: proto.ClearChatAction - (*ChatAssignmentOpenedStatusAction)(nil), // 185: proto.ChatAssignmentOpenedStatusAction - (*ChatAssignmentAction)(nil), // 186: proto.ChatAssignmentAction - (*ArchiveChatAction)(nil), // 187: proto.ArchiveChatAction - (*AndroidUnsupportedActions)(nil), // 188: proto.AndroidUnsupportedActions - (*AgentAction)(nil), // 189: proto.AgentAction - (*SyncActionData)(nil), // 190: proto.SyncActionData - (*RecentEmojiWeight)(nil), // 191: proto.RecentEmojiWeight - (*VerifiedNameCertificate)(nil), // 192: proto.VerifiedNameCertificate - (*LocalizedName)(nil), // 193: proto.LocalizedName - (*BizIdentityInfo)(nil), // 194: proto.BizIdentityInfo - (*BizAccountPayload)(nil), // 195: proto.BizAccountPayload - (*BizAccountLinkInfo)(nil), // 196: proto.BizAccountLinkInfo - (*HandshakeMessage)(nil), // 197: proto.HandshakeMessage - (*HandshakeServerHello)(nil), // 198: proto.HandshakeServerHello - (*HandshakeClientHello)(nil), // 199: proto.HandshakeClientHello - (*HandshakeClientFinish)(nil), // 200: proto.HandshakeClientFinish - (*ClientPayload)(nil), // 201: proto.ClientPayload - (*WebNotificationsInfo)(nil), // 202: proto.WebNotificationsInfo - (*WebMessageInfo)(nil), // 203: proto.WebMessageInfo - (*WebFeatures)(nil), // 204: proto.WebFeatures - (*UserReceipt)(nil), // 205: proto.UserReceipt - (*StatusPSA)(nil), // 206: proto.StatusPSA - (*Reaction)(nil), // 207: proto.Reaction - (*PollUpdate)(nil), // 208: proto.PollUpdate - (*PollAdditionalMetadata)(nil), // 209: proto.PollAdditionalMetadata - (*PhotoChange)(nil), // 210: proto.PhotoChange - (*PaymentInfo)(nil), // 211: proto.PaymentInfo - (*NotificationMessageInfo)(nil), // 212: proto.NotificationMessageInfo - (*MediaData)(nil), // 213: proto.MediaData - (*KeepInChat)(nil), // 214: proto.KeepInChat - (*NoiseCertificate)(nil), // 215: proto.NoiseCertificate - (*CertChain)(nil), // 216: proto.CertChain - (*DeviceProps_HistorySyncConfig)(nil), // 217: proto.DeviceProps.HistorySyncConfig - (*DeviceProps_AppVersion)(nil), // 218: proto.DeviceProps.AppVersion - (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult)(nil), // 219: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult - (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse)(nil), // 220: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse - (*PeerDataOperationRequestMessage_RequestUrlPreview)(nil), // 221: proto.PeerDataOperationRequestMessage.RequestUrlPreview - (*PeerDataOperationRequestMessage_RequestStickerReupload)(nil), // 222: proto.PeerDataOperationRequestMessage.RequestStickerReupload - (*ListResponseMessage_SingleSelectReply)(nil), // 223: proto.ListResponseMessage.SingleSelectReply - (*ListMessage_Section)(nil), // 224: proto.ListMessage.Section - (*ListMessage_Row)(nil), // 225: proto.ListMessage.Row - (*ListMessage_Product)(nil), // 226: proto.ListMessage.Product - (*ListMessage_ProductSection)(nil), // 227: proto.ListMessage.ProductSection - (*ListMessage_ProductListInfo)(nil), // 228: proto.ListMessage.ProductListInfo - (*ListMessage_ProductListHeaderImage)(nil), // 229: proto.ListMessage.ProductListHeaderImage - (*InteractiveResponseMessage_NativeFlowResponseMessage)(nil), // 230: proto.InteractiveResponseMessage.NativeFlowResponseMessage - (*InteractiveResponseMessage_Body)(nil), // 231: proto.InteractiveResponseMessage.Body - (*InteractiveMessage_ShopMessage)(nil), // 232: proto.InteractiveMessage.ShopMessage - (*InteractiveMessage_NativeFlowMessage)(nil), // 233: proto.InteractiveMessage.NativeFlowMessage - (*InteractiveMessage_Header)(nil), // 234: proto.InteractiveMessage.Header - (*InteractiveMessage_Footer)(nil), // 235: proto.InteractiveMessage.Footer - (*InteractiveMessage_CollectionMessage)(nil), // 236: proto.InteractiveMessage.CollectionMessage - (*InteractiveMessage_Body)(nil), // 237: proto.InteractiveMessage.Body - (*InteractiveMessage_NativeFlowMessage_NativeFlowButton)(nil), // 238: proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton - (*HighlyStructuredMessage_HSMLocalizableParameter)(nil), // 239: proto.HighlyStructuredMessage.HSMLocalizableParameter - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime)(nil), // 240: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency)(nil), // 241: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch)(nil), // 242: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch - (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent)(nil), // 243: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent - (*ButtonsMessage_Button)(nil), // 244: proto.ButtonsMessage.Button - (*ButtonsMessage_Button_NativeFlowInfo)(nil), // 245: proto.ButtonsMessage.Button.NativeFlowInfo - (*ButtonsMessage_Button_ButtonText)(nil), // 246: proto.ButtonsMessage.Button.ButtonText - (*HydratedTemplateButton_HydratedURLButton)(nil), // 247: proto.HydratedTemplateButton.HydratedURLButton - (*HydratedTemplateButton_HydratedQuickReplyButton)(nil), // 248: proto.HydratedTemplateButton.HydratedQuickReplyButton - (*HydratedTemplateButton_HydratedCallButton)(nil), // 249: proto.HydratedTemplateButton.HydratedCallButton - (*ContextInfo_ExternalAdReplyInfo)(nil), // 250: proto.ContextInfo.ExternalAdReplyInfo - (*ContextInfo_AdReplyInfo)(nil), // 251: proto.ContextInfo.AdReplyInfo - (*TemplateButton_URLButton)(nil), // 252: proto.TemplateButton.URLButton - (*TemplateButton_QuickReplyButton)(nil), // 253: proto.TemplateButton.QuickReplyButton - (*TemplateButton_CallButton)(nil), // 254: proto.TemplateButton.CallButton - (*PaymentBackground_MediaData)(nil), // 255: proto.PaymentBackground.MediaData - (*TemplateMessage_HydratedFourRowTemplate)(nil), // 256: proto.TemplateMessage.HydratedFourRowTemplate - (*TemplateMessage_FourRowTemplate)(nil), // 257: proto.TemplateMessage.FourRowTemplate - (*ProductMessage_ProductSnapshot)(nil), // 258: proto.ProductMessage.ProductSnapshot - (*ProductMessage_CatalogSnapshot)(nil), // 259: proto.ProductMessage.CatalogSnapshot - (*PollCreationMessage_Option)(nil), // 260: proto.PollCreationMessage.Option - (*MsgOpaqueData_PollOption)(nil), // 261: proto.MsgOpaqueData.PollOption - (*VerifiedNameCertificate_Details)(nil), // 262: proto.VerifiedNameCertificate.Details - (*ClientPayload_WebInfo)(nil), // 263: proto.ClientPayload.WebInfo - (*ClientPayload_UserAgent)(nil), // 264: proto.ClientPayload.UserAgent - (*ClientPayload_DevicePairingRegistrationData)(nil), // 265: proto.ClientPayload.DevicePairingRegistrationData - (*ClientPayload_DNSSource)(nil), // 266: proto.ClientPayload.DNSSource - (*ClientPayload_WebInfo_WebdPayload)(nil), // 267: proto.ClientPayload.WebInfo.WebdPayload - (*ClientPayload_UserAgent_AppVersion)(nil), // 268: proto.ClientPayload.UserAgent.AppVersion - (*NoiseCertificate_Details)(nil), // 269: proto.NoiseCertificate.Details - (*CertChain_NoiseCertificate)(nil), // 270: proto.CertChain.NoiseCertificate - (*CertChain_NoiseCertificate_Details)(nil), // 271: proto.CertChain.NoiseCertificate.Details + (*PnForLidChatAction)(nil), // 173: proto.PnForLidChatAction + (*PinAction)(nil), // 174: proto.PinAction + (*NuxAction)(nil), // 175: proto.NuxAction + (*MuteAction)(nil), // 176: proto.MuteAction + (*MarkChatAsReadAction)(nil), // 177: proto.MarkChatAsReadAction + (*LocaleSetting)(nil), // 178: proto.LocaleSetting + (*LabelEditAction)(nil), // 179: proto.LabelEditAction + (*LabelAssociationAction)(nil), // 180: proto.LabelAssociationAction + (*KeyExpiration)(nil), // 181: proto.KeyExpiration + (*DeleteMessageForMeAction)(nil), // 182: proto.DeleteMessageForMeAction + (*DeleteChatAction)(nil), // 183: proto.DeleteChatAction + (*ContactAction)(nil), // 184: proto.ContactAction + (*ClearChatAction)(nil), // 185: proto.ClearChatAction + (*ChatAssignmentOpenedStatusAction)(nil), // 186: proto.ChatAssignmentOpenedStatusAction + (*ChatAssignmentAction)(nil), // 187: proto.ChatAssignmentAction + (*ArchiveChatAction)(nil), // 188: proto.ArchiveChatAction + (*AndroidUnsupportedActions)(nil), // 189: proto.AndroidUnsupportedActions + (*AgentAction)(nil), // 190: proto.AgentAction + (*SyncActionData)(nil), // 191: proto.SyncActionData + (*RecentEmojiWeight)(nil), // 192: proto.RecentEmojiWeight + (*VerifiedNameCertificate)(nil), // 193: proto.VerifiedNameCertificate + (*LocalizedName)(nil), // 194: proto.LocalizedName + (*BizIdentityInfo)(nil), // 195: proto.BizIdentityInfo + (*BizAccountPayload)(nil), // 196: proto.BizAccountPayload + (*BizAccountLinkInfo)(nil), // 197: proto.BizAccountLinkInfo + (*HandshakeMessage)(nil), // 198: proto.HandshakeMessage + (*HandshakeServerHello)(nil), // 199: proto.HandshakeServerHello + (*HandshakeClientHello)(nil), // 200: proto.HandshakeClientHello + (*HandshakeClientFinish)(nil), // 201: proto.HandshakeClientFinish + (*ClientPayload)(nil), // 202: proto.ClientPayload + (*WebNotificationsInfo)(nil), // 203: proto.WebNotificationsInfo + (*WebMessageInfo)(nil), // 204: proto.WebMessageInfo + (*WebFeatures)(nil), // 205: proto.WebFeatures + (*UserReceipt)(nil), // 206: proto.UserReceipt + (*StatusPSA)(nil), // 207: proto.StatusPSA + (*Reaction)(nil), // 208: proto.Reaction + (*PollUpdate)(nil), // 209: proto.PollUpdate + (*PollAdditionalMetadata)(nil), // 210: proto.PollAdditionalMetadata + (*PhotoChange)(nil), // 211: proto.PhotoChange + (*PaymentInfo)(nil), // 212: proto.PaymentInfo + (*NotificationMessageInfo)(nil), // 213: proto.NotificationMessageInfo + (*MediaData)(nil), // 214: proto.MediaData + (*KeepInChat)(nil), // 215: proto.KeepInChat + (*NoiseCertificate)(nil), // 216: proto.NoiseCertificate + (*CertChain)(nil), // 217: proto.CertChain + (*DeviceProps_HistorySyncConfig)(nil), // 218: proto.DeviceProps.HistorySyncConfig + (*DeviceProps_AppVersion)(nil), // 219: proto.DeviceProps.AppVersion + (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult)(nil), // 220: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + (*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse)(nil), // 221: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse + (*PeerDataOperationRequestMessage_RequestUrlPreview)(nil), // 222: proto.PeerDataOperationRequestMessage.RequestUrlPreview + (*PeerDataOperationRequestMessage_RequestStickerReupload)(nil), // 223: proto.PeerDataOperationRequestMessage.RequestStickerReupload + (*ListResponseMessage_SingleSelectReply)(nil), // 224: proto.ListResponseMessage.SingleSelectReply + (*ListMessage_Section)(nil), // 225: proto.ListMessage.Section + (*ListMessage_Row)(nil), // 226: proto.ListMessage.Row + (*ListMessage_Product)(nil), // 227: proto.ListMessage.Product + (*ListMessage_ProductSection)(nil), // 228: proto.ListMessage.ProductSection + (*ListMessage_ProductListInfo)(nil), // 229: proto.ListMessage.ProductListInfo + (*ListMessage_ProductListHeaderImage)(nil), // 230: proto.ListMessage.ProductListHeaderImage + (*InteractiveResponseMessage_NativeFlowResponseMessage)(nil), // 231: proto.InteractiveResponseMessage.NativeFlowResponseMessage + (*InteractiveResponseMessage_Body)(nil), // 232: proto.InteractiveResponseMessage.Body + (*InteractiveMessage_ShopMessage)(nil), // 233: proto.InteractiveMessage.ShopMessage + (*InteractiveMessage_NativeFlowMessage)(nil), // 234: proto.InteractiveMessage.NativeFlowMessage + (*InteractiveMessage_Header)(nil), // 235: proto.InteractiveMessage.Header + (*InteractiveMessage_Footer)(nil), // 236: proto.InteractiveMessage.Footer + (*InteractiveMessage_CollectionMessage)(nil), // 237: proto.InteractiveMessage.CollectionMessage + (*InteractiveMessage_Body)(nil), // 238: proto.InteractiveMessage.Body + (*InteractiveMessage_NativeFlowMessage_NativeFlowButton)(nil), // 239: proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton + (*HighlyStructuredMessage_HSMLocalizableParameter)(nil), // 240: proto.HighlyStructuredMessage.HSMLocalizableParameter + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime)(nil), // 241: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency)(nil), // 242: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch)(nil), // 243: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent)(nil), // 244: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + (*ButtonsMessage_Button)(nil), // 245: proto.ButtonsMessage.Button + (*ButtonsMessage_Button_NativeFlowInfo)(nil), // 246: proto.ButtonsMessage.Button.NativeFlowInfo + (*ButtonsMessage_Button_ButtonText)(nil), // 247: proto.ButtonsMessage.Button.ButtonText + (*HydratedTemplateButton_HydratedURLButton)(nil), // 248: proto.HydratedTemplateButton.HydratedURLButton + (*HydratedTemplateButton_HydratedQuickReplyButton)(nil), // 249: proto.HydratedTemplateButton.HydratedQuickReplyButton + (*HydratedTemplateButton_HydratedCallButton)(nil), // 250: proto.HydratedTemplateButton.HydratedCallButton + (*ContextInfo_ExternalAdReplyInfo)(nil), // 251: proto.ContextInfo.ExternalAdReplyInfo + (*ContextInfo_AdReplyInfo)(nil), // 252: proto.ContextInfo.AdReplyInfo + (*TemplateButton_URLButton)(nil), // 253: proto.TemplateButton.URLButton + (*TemplateButton_QuickReplyButton)(nil), // 254: proto.TemplateButton.QuickReplyButton + (*TemplateButton_CallButton)(nil), // 255: proto.TemplateButton.CallButton + (*PaymentBackground_MediaData)(nil), // 256: proto.PaymentBackground.MediaData + (*TemplateMessage_HydratedFourRowTemplate)(nil), // 257: proto.TemplateMessage.HydratedFourRowTemplate + (*TemplateMessage_FourRowTemplate)(nil), // 258: proto.TemplateMessage.FourRowTemplate + (*ProductMessage_ProductSnapshot)(nil), // 259: proto.ProductMessage.ProductSnapshot + (*ProductMessage_CatalogSnapshot)(nil), // 260: proto.ProductMessage.CatalogSnapshot + (*PollCreationMessage_Option)(nil), // 261: proto.PollCreationMessage.Option + (*MsgOpaqueData_PollOption)(nil), // 262: proto.MsgOpaqueData.PollOption + (*VerifiedNameCertificate_Details)(nil), // 263: proto.VerifiedNameCertificate.Details + (*ClientPayload_WebInfo)(nil), // 264: proto.ClientPayload.WebInfo + (*ClientPayload_UserAgent)(nil), // 265: proto.ClientPayload.UserAgent + (*ClientPayload_DevicePairingRegistrationData)(nil), // 266: proto.ClientPayload.DevicePairingRegistrationData + (*ClientPayload_DNSSource)(nil), // 267: proto.ClientPayload.DNSSource + (*ClientPayload_WebInfo_WebdPayload)(nil), // 268: proto.ClientPayload.WebInfo.WebdPayload + (*ClientPayload_UserAgent_AppVersion)(nil), // 269: proto.ClientPayload.UserAgent.AppVersion + (*NoiseCertificate_Details)(nil), // 270: proto.NoiseCertificate.Details + (*CertChain_NoiseCertificate)(nil), // 271: proto.CertChain.NoiseCertificate + (*CertChain_NoiseCertificate_Details)(nil), // 272: proto.CertChain.NoiseCertificate.Details } var file_binary_proto_def_proto_depIdxs = []int32{ - 218, // 0: proto.DeviceProps.version:type_name -> proto.DeviceProps.AppVersion + 219, // 0: proto.DeviceProps.version:type_name -> proto.DeviceProps.AppVersion 3, // 1: proto.DeviceProps.platformType:type_name -> proto.DeviceProps.PlatformType - 217, // 2: proto.DeviceProps.historySyncConfig:type_name -> proto.DeviceProps.HistorySyncConfig + 218, // 2: proto.DeviceProps.historySyncConfig:type_name -> proto.DeviceProps.HistorySyncConfig 0, // 3: proto.PeerDataOperationRequestResponseMessage.peerDataOperationRequestType:type_name -> proto.PeerDataOperationRequestType - 219, // 4: proto.PeerDataOperationRequestResponseMessage.peerDataOperationResult:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + 220, // 4: proto.PeerDataOperationRequestResponseMessage.peerDataOperationResult:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult 0, // 5: proto.PeerDataOperationRequestMessage.peerDataOperationRequestType:type_name -> proto.PeerDataOperationRequestType - 222, // 6: proto.PeerDataOperationRequestMessage.requestStickerReupload:type_name -> proto.PeerDataOperationRequestMessage.RequestStickerReupload - 221, // 7: proto.PeerDataOperationRequestMessage.requestUrlPreview:type_name -> proto.PeerDataOperationRequestMessage.RequestUrlPreview + 223, // 6: proto.PeerDataOperationRequestMessage.requestStickerReupload:type_name -> proto.PeerDataOperationRequestMessage.RequestStickerReupload + 222, // 7: proto.PeerDataOperationRequestMessage.requestUrlPreview:type_name -> proto.PeerDataOperationRequestMessage.RequestUrlPreview 4, // 8: proto.PaymentInviteMessage.serviceType:type_name -> proto.PaymentInviteMessage.ServiceType 6, // 9: proto.OrderMessage.status:type_name -> proto.OrderMessage.OrderStatus 5, // 10: proto.OrderMessage.surface:type_name -> proto.OrderMessage.OrderSurface @@ -22402,29 +22490,29 @@ var file_binary_proto_def_proto_depIdxs = []int32{ 103, // 12: proto.LocationMessage.contextInfo:type_name -> proto.ContextInfo 103, // 13: proto.LiveLocationMessage.contextInfo:type_name -> proto.ContextInfo 7, // 14: proto.ListResponseMessage.listType:type_name -> proto.ListResponseMessage.ListType - 223, // 15: proto.ListResponseMessage.singleSelectReply:type_name -> proto.ListResponseMessage.SingleSelectReply + 224, // 15: proto.ListResponseMessage.singleSelectReply:type_name -> proto.ListResponseMessage.SingleSelectReply 103, // 16: proto.ListResponseMessage.contextInfo:type_name -> proto.ContextInfo 8, // 17: proto.ListMessage.listType:type_name -> proto.ListMessage.ListType - 224, // 18: proto.ListMessage.sections:type_name -> proto.ListMessage.Section - 228, // 19: proto.ListMessage.productListInfo:type_name -> proto.ListMessage.ProductListInfo + 225, // 18: proto.ListMessage.sections:type_name -> proto.ListMessage.Section + 229, // 19: proto.ListMessage.productListInfo:type_name -> proto.ListMessage.ProductListInfo 103, // 20: proto.ListMessage.contextInfo:type_name -> proto.ContextInfo 145, // 21: proto.KeepInChatMessage.key:type_name -> proto.MessageKey 1, // 22: proto.KeepInChatMessage.keepType:type_name -> proto.KeepType 9, // 23: proto.InvoiceMessage.attachmentType:type_name -> proto.InvoiceMessage.AttachmentType - 231, // 24: proto.InteractiveResponseMessage.body:type_name -> proto.InteractiveResponseMessage.Body + 232, // 24: proto.InteractiveResponseMessage.body:type_name -> proto.InteractiveResponseMessage.Body 103, // 25: proto.InteractiveResponseMessage.contextInfo:type_name -> proto.ContextInfo - 230, // 26: proto.InteractiveResponseMessage.nativeFlowResponseMessage:type_name -> proto.InteractiveResponseMessage.NativeFlowResponseMessage - 234, // 27: proto.InteractiveMessage.header:type_name -> proto.InteractiveMessage.Header - 237, // 28: proto.InteractiveMessage.body:type_name -> proto.InteractiveMessage.Body - 235, // 29: proto.InteractiveMessage.footer:type_name -> proto.InteractiveMessage.Footer + 231, // 26: proto.InteractiveResponseMessage.nativeFlowResponseMessage:type_name -> proto.InteractiveResponseMessage.NativeFlowResponseMessage + 235, // 27: proto.InteractiveMessage.header:type_name -> proto.InteractiveMessage.Header + 238, // 28: proto.InteractiveMessage.body:type_name -> proto.InteractiveMessage.Body + 236, // 29: proto.InteractiveMessage.footer:type_name -> proto.InteractiveMessage.Footer 103, // 30: proto.InteractiveMessage.contextInfo:type_name -> proto.ContextInfo - 232, // 31: proto.InteractiveMessage.shopStorefrontMessage:type_name -> proto.InteractiveMessage.ShopMessage - 236, // 32: proto.InteractiveMessage.collectionMessage:type_name -> proto.InteractiveMessage.CollectionMessage - 233, // 33: proto.InteractiveMessage.nativeFlowMessage:type_name -> proto.InteractiveMessage.NativeFlowMessage + 233, // 31: proto.InteractiveMessage.shopStorefrontMessage:type_name -> proto.InteractiveMessage.ShopMessage + 237, // 32: proto.InteractiveMessage.collectionMessage:type_name -> proto.InteractiveMessage.CollectionMessage + 234, // 33: proto.InteractiveMessage.nativeFlowMessage:type_name -> proto.InteractiveMessage.NativeFlowMessage 99, // 34: proto.ImageMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation 103, // 35: proto.ImageMessage.contextInfo:type_name -> proto.ContextInfo 11, // 36: proto.HistorySyncNotification.syncType:type_name -> proto.HistorySyncNotification.HistorySyncType - 239, // 37: proto.HighlyStructuredMessage.localizableParams:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter + 240, // 37: proto.HighlyStructuredMessage.localizableParams:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter 112, // 38: proto.HighlyStructuredMessage.hydratedHsm:type_name -> proto.TemplateMessage 103, // 39: proto.GroupInviteMessage.contextInfo:type_name -> proto.ContextInfo 14, // 40: proto.GroupInviteMessage.groupType:type_name -> proto.GroupInviteMessage.GroupType @@ -22445,7 +22533,7 @@ var file_binary_proto_def_proto_depIdxs = []int32{ 103, // 55: proto.ButtonsResponseMessage.contextInfo:type_name -> proto.ContextInfo 18, // 56: proto.ButtonsResponseMessage.type:type_name -> proto.ButtonsResponseMessage.Type 103, // 57: proto.ButtonsMessage.contextInfo:type_name -> proto.ContextInfo - 244, // 58: proto.ButtonsMessage.buttons:type_name -> proto.ButtonsMessage.Button + 245, // 58: proto.ButtonsMessage.buttons:type_name -> proto.ButtonsMessage.Button 19, // 59: proto.ButtonsMessage.headerType:type_name -> proto.ButtonsMessage.HeaderType 80, // 60: proto.ButtonsMessage.documentMessage:type_name -> proto.DocumentMessage 73, // 61: proto.ButtonsMessage.imageMessage:type_name -> proto.ImageMessage @@ -22459,20 +22547,20 @@ var file_binary_proto_def_proto_depIdxs = []int32{ 95, // 69: proto.AppStateSyncKeyData.fingerprint:type_name -> proto.AppStateSyncKeyFingerprint 106, // 70: proto.InteractiveAnnotation.polygonVertices:type_name -> proto.Point 98, // 71: proto.InteractiveAnnotation.location:type_name -> proto.Location - 248, // 72: proto.HydratedTemplateButton.quickReplyButton:type_name -> proto.HydratedTemplateButton.HydratedQuickReplyButton - 247, // 73: proto.HydratedTemplateButton.urlButton:type_name -> proto.HydratedTemplateButton.HydratedURLButton - 249, // 74: proto.HydratedTemplateButton.callButton:type_name -> proto.HydratedTemplateButton.HydratedCallButton + 249, // 72: proto.HydratedTemplateButton.quickReplyButton:type_name -> proto.HydratedTemplateButton.HydratedQuickReplyButton + 248, // 73: proto.HydratedTemplateButton.urlButton:type_name -> proto.HydratedTemplateButton.HydratedURLButton + 250, // 74: proto.HydratedTemplateButton.callButton:type_name -> proto.HydratedTemplateButton.HydratedCallButton 21, // 75: proto.DisappearingMode.initiator:type_name -> proto.DisappearingMode.Initiator 109, // 76: proto.ContextInfo.quotedMessage:type_name -> proto.Message - 251, // 77: proto.ContextInfo.quotedAd:type_name -> proto.ContextInfo.AdReplyInfo + 252, // 77: proto.ContextInfo.quotedAd:type_name -> proto.ContextInfo.AdReplyInfo 145, // 78: proto.ContextInfo.placeholderKey:type_name -> proto.MessageKey - 250, // 79: proto.ContextInfo.externalAdReply:type_name -> proto.ContextInfo.ExternalAdReplyInfo + 251, // 79: proto.ContextInfo.externalAdReply:type_name -> proto.ContextInfo.ExternalAdReplyInfo 101, // 80: proto.ContextInfo.disappearingMode:type_name -> proto.DisappearingMode 104, // 81: proto.ContextInfo.actionLink:type_name -> proto.ActionLink - 253, // 82: proto.TemplateButton.quickReplyButton:type_name -> proto.TemplateButton.QuickReplyButton - 252, // 83: proto.TemplateButton.urlButton:type_name -> proto.TemplateButton.URLButton - 254, // 84: proto.TemplateButton.callButton:type_name -> proto.TemplateButton.CallButton - 255, // 85: proto.PaymentBackground.mediaData:type_name -> proto.PaymentBackground.MediaData + 254, // 82: proto.TemplateButton.quickReplyButton:type_name -> proto.TemplateButton.QuickReplyButton + 253, // 83: proto.TemplateButton.urlButton:type_name -> proto.TemplateButton.URLButton + 255, // 84: proto.TemplateButton.callButton:type_name -> proto.TemplateButton.CallButton + 256, // 85: proto.PaymentBackground.mediaData:type_name -> proto.PaymentBackground.MediaData 24, // 86: proto.PaymentBackground.type:type_name -> proto.PaymentBackground.Type 116, // 87: proto.Message.senderKeyDistributionMessage:type_name -> proto.SenderKeyDistributionMessage 73, // 88: proto.Message.imageMessage:type_name -> proto.ImageMessage @@ -22522,277 +22610,279 @@ var file_binary_proto_def_proto_depIdxs = []int32{ 79, // 132: proto.Message.encReactionMessage:type_name -> proto.EncReactionMessage 77, // 133: proto.Message.editedMessage:type_name -> proto.FutureProofMessage 77, // 134: proto.Message.viewOnceMessageV2Extension:type_name -> proto.FutureProofMessage - 102, // 135: proto.MessageContextInfo.deviceListMetadata:type_name -> proto.DeviceListMetadata - 99, // 136: proto.VideoMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation - 103, // 137: proto.VideoMessage.contextInfo:type_name -> proto.ContextInfo - 25, // 138: proto.VideoMessage.gifAttribution:type_name -> proto.VideoMessage.Attribution - 103, // 139: proto.TemplateMessage.contextInfo:type_name -> proto.ContextInfo - 256, // 140: proto.TemplateMessage.hydratedTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate - 257, // 141: proto.TemplateMessage.fourRowTemplate:type_name -> proto.TemplateMessage.FourRowTemplate - 256, // 142: proto.TemplateMessage.hydratedFourRowTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate - 71, // 143: proto.TemplateMessage.interactiveMessageTemplate:type_name -> proto.InteractiveMessage - 103, // 144: proto.TemplateButtonReplyMessage.contextInfo:type_name -> proto.ContextInfo - 103, // 145: proto.StickerMessage.contextInfo:type_name -> proto.ContextInfo - 109, // 146: proto.SendPaymentMessage.noteMessage:type_name -> proto.Message - 145, // 147: proto.SendPaymentMessage.requestMessageKey:type_name -> proto.MessageKey - 107, // 148: proto.SendPaymentMessage.background:type_name -> proto.PaymentBackground - 103, // 149: proto.RequestPhoneNumberMessage.contextInfo:type_name -> proto.ContextInfo - 109, // 150: proto.RequestPaymentMessage.noteMessage:type_name -> proto.Message - 108, // 151: proto.RequestPaymentMessage.amount:type_name -> proto.Money - 107, // 152: proto.RequestPaymentMessage.background:type_name -> proto.PaymentBackground - 145, // 153: proto.ReactionMessage.key:type_name -> proto.MessageKey - 145, // 154: proto.ProtocolMessage.key:type_name -> proto.MessageKey - 26, // 155: proto.ProtocolMessage.type:type_name -> proto.ProtocolMessage.Type - 74, // 156: proto.ProtocolMessage.historySyncNotification:type_name -> proto.HistorySyncNotification - 92, // 157: proto.ProtocolMessage.appStateSyncKeyShare:type_name -> proto.AppStateSyncKeyShare - 93, // 158: proto.ProtocolMessage.appStateSyncKeyRequest:type_name -> proto.AppStateSyncKeyRequest - 72, // 159: proto.ProtocolMessage.initialSecurityNotificationSettingSync:type_name -> proto.InitialSecurityNotificationSettingSync - 97, // 160: proto.ProtocolMessage.appStateFatalExceptionNotification:type_name -> proto.AppStateFatalExceptionNotification - 101, // 161: proto.ProtocolMessage.disappearingMode:type_name -> proto.DisappearingMode - 109, // 162: proto.ProtocolMessage.editedMessage:type_name -> proto.Message - 61, // 163: proto.ProtocolMessage.peerDataOperationRequestMessage:type_name -> proto.PeerDataOperationRequestMessage - 60, // 164: proto.ProtocolMessage.peerDataOperationRequestResponseMessage:type_name -> proto.PeerDataOperationRequestResponseMessage - 258, // 165: proto.ProductMessage.product:type_name -> proto.ProductMessage.ProductSnapshot - 259, // 166: proto.ProductMessage.catalog:type_name -> proto.ProductMessage.CatalogSnapshot - 103, // 167: proto.ProductMessage.contextInfo:type_name -> proto.ContextInfo - 145, // 168: proto.PollUpdateMessage.pollCreationMessageKey:type_name -> proto.MessageKey - 126, // 169: proto.PollUpdateMessage.vote:type_name -> proto.PollEncValue - 125, // 170: proto.PollUpdateMessage.metadata:type_name -> proto.PollUpdateMessageMetadata - 260, // 171: proto.PollCreationMessage.options:type_name -> proto.PollCreationMessage.Option - 103, // 172: proto.PollCreationMessage.contextInfo:type_name -> proto.ContextInfo - 133, // 173: proto.PastParticipants.pastParticipants:type_name -> proto.PastParticipant - 27, // 174: proto.PastParticipant.leaveReason:type_name -> proto.PastParticipant.LeaveReason - 28, // 175: proto.HistorySync.syncType:type_name -> proto.HistorySync.HistorySyncType - 138, // 176: proto.HistorySync.conversations:type_name -> proto.Conversation - 203, // 177: proto.HistorySync.statusV3Messages:type_name -> proto.WebMessageInfo - 131, // 178: proto.HistorySync.pushnames:type_name -> proto.Pushname - 137, // 179: proto.HistorySync.globalSettings:type_name -> proto.GlobalSettings - 130, // 180: proto.HistorySync.recentStickers:type_name -> proto.StickerMetadata - 132, // 181: proto.HistorySync.pastParticipants:type_name -> proto.PastParticipants - 203, // 182: proto.HistorySyncMsg.message:type_name -> proto.WebMessageInfo - 29, // 183: proto.GroupParticipant.rank:type_name -> proto.GroupParticipant.Rank - 129, // 184: proto.GlobalSettings.lightThemeWallpaper:type_name -> proto.WallpaperSettings - 2, // 185: proto.GlobalSettings.mediaVisibility:type_name -> proto.MediaVisibility - 129, // 186: proto.GlobalSettings.darkThemeWallpaper:type_name -> proto.WallpaperSettings - 140, // 187: proto.GlobalSettings.autoDownloadWiFi:type_name -> proto.AutoDownloadSettings - 140, // 188: proto.GlobalSettings.autoDownloadCellular:type_name -> proto.AutoDownloadSettings - 140, // 189: proto.GlobalSettings.autoDownloadRoaming:type_name -> proto.AutoDownloadSettings - 139, // 190: proto.GlobalSettings.avatarUserSettings:type_name -> proto.AvatarUserSettings - 135, // 191: proto.Conversation.messages:type_name -> proto.HistorySyncMsg - 30, // 192: proto.Conversation.endOfHistoryTransferType:type_name -> proto.Conversation.EndOfHistoryTransferType - 101, // 193: proto.Conversation.disappearingMode:type_name -> proto.DisappearingMode - 136, // 194: proto.Conversation.participant:type_name -> proto.GroupParticipant - 129, // 195: proto.Conversation.wallpaper:type_name -> proto.WallpaperSettings - 2, // 196: proto.Conversation.mediaVisibility:type_name -> proto.MediaVisibility - 142, // 197: proto.MsgRowOpaqueData.currentMsg:type_name -> proto.MsgOpaqueData - 142, // 198: proto.MsgRowOpaqueData.quotedMsg:type_name -> proto.MsgOpaqueData - 261, // 199: proto.MsgOpaqueData.pollOptions:type_name -> proto.MsgOpaqueData.PollOption - 126, // 200: proto.MsgOpaqueData.encPollVote:type_name -> proto.PollEncValue - 31, // 201: proto.MediaRetryNotification.result:type_name -> proto.MediaRetryNotification.ResultType - 146, // 202: proto.SyncdSnapshot.version:type_name -> proto.SyncdVersion - 149, // 203: proto.SyncdSnapshot.records:type_name -> proto.SyncdRecord - 154, // 204: proto.SyncdSnapshot.keyId:type_name -> proto.KeyId - 153, // 205: proto.SyncdRecord.index:type_name -> proto.SyncdIndex - 147, // 206: proto.SyncdRecord.value:type_name -> proto.SyncdValue - 154, // 207: proto.SyncdRecord.keyId:type_name -> proto.KeyId - 146, // 208: proto.SyncdPatch.version:type_name -> proto.SyncdVersion - 152, // 209: proto.SyncdPatch.mutations:type_name -> proto.SyncdMutation - 155, // 210: proto.SyncdPatch.externalMutations:type_name -> proto.ExternalBlobReference - 154, // 211: proto.SyncdPatch.keyId:type_name -> proto.KeyId - 156, // 212: proto.SyncdPatch.exitCode:type_name -> proto.ExitCode - 152, // 213: proto.SyncdMutations.mutations:type_name -> proto.SyncdMutation - 32, // 214: proto.SyncdMutation.operation:type_name -> proto.SyncdMutation.SyncdOperation - 149, // 215: proto.SyncdMutation.record:type_name -> proto.SyncdRecord - 165, // 216: proto.SyncActionValue.starAction:type_name -> proto.StarAction - 183, // 217: proto.SyncActionValue.contactAction:type_name -> proto.ContactAction - 175, // 218: proto.SyncActionValue.muteAction:type_name -> proto.MuteAction - 173, // 219: proto.SyncActionValue.pinAction:type_name -> proto.PinAction - 166, // 220: proto.SyncActionValue.securityNotificationSetting:type_name -> proto.SecurityNotificationSetting - 170, // 221: proto.SyncActionValue.pushNameSetting:type_name -> proto.PushNameSetting - 169, // 222: proto.SyncActionValue.quickReplyAction:type_name -> proto.QuickReplyAction - 168, // 223: proto.SyncActionValue.recentEmojiWeightsAction:type_name -> proto.RecentEmojiWeightsAction - 178, // 224: proto.SyncActionValue.labelEditAction:type_name -> proto.LabelEditAction - 179, // 225: proto.SyncActionValue.labelAssociationAction:type_name -> proto.LabelAssociationAction - 177, // 226: proto.SyncActionValue.localeSetting:type_name -> proto.LocaleSetting - 187, // 227: proto.SyncActionValue.archiveChatAction:type_name -> proto.ArchiveChatAction - 181, // 228: proto.SyncActionValue.deleteMessageForMeAction:type_name -> proto.DeleteMessageForMeAction - 180, // 229: proto.SyncActionValue.keyExpiration:type_name -> proto.KeyExpiration - 176, // 230: proto.SyncActionValue.markChatAsReadAction:type_name -> proto.MarkChatAsReadAction - 184, // 231: proto.SyncActionValue.clearChatAction:type_name -> proto.ClearChatAction - 182, // 232: proto.SyncActionValue.deleteChatAction:type_name -> proto.DeleteChatAction - 159, // 233: proto.SyncActionValue.unarchiveChatsSetting:type_name -> proto.UnarchiveChatsSetting - 172, // 234: proto.SyncActionValue.primaryFeature:type_name -> proto.PrimaryFeature - 188, // 235: proto.SyncActionValue.androidUnsupportedActions:type_name -> proto.AndroidUnsupportedActions - 189, // 236: proto.SyncActionValue.agentAction:type_name -> proto.AgentAction - 163, // 237: proto.SyncActionValue.subscriptionAction:type_name -> proto.SubscriptionAction - 158, // 238: proto.SyncActionValue.userStatusMuteAction:type_name -> proto.UserStatusMuteAction - 160, // 239: proto.SyncActionValue.timeFormatAction:type_name -> proto.TimeFormatAction - 174, // 240: proto.SyncActionValue.nuxAction:type_name -> proto.NuxAction - 171, // 241: proto.SyncActionValue.primaryVersionAction:type_name -> proto.PrimaryVersionAction - 164, // 242: proto.SyncActionValue.stickerAction:type_name -> proto.StickerAction - 167, // 243: proto.SyncActionValue.removeRecentStickerAction:type_name -> proto.RemoveRecentStickerAction - 186, // 244: proto.SyncActionValue.chatAssignment:type_name -> proto.ChatAssignmentAction - 185, // 245: proto.SyncActionValue.chatAssignmentOpenedStatus:type_name -> proto.ChatAssignmentOpenedStatusAction - 145, // 246: proto.SyncActionMessage.key:type_name -> proto.MessageKey - 161, // 247: proto.SyncActionMessageRange.messages:type_name -> proto.SyncActionMessage - 191, // 248: proto.RecentEmojiWeightsAction.weights:type_name -> proto.RecentEmojiWeight - 162, // 249: proto.MarkChatAsReadAction.messageRange:type_name -> proto.SyncActionMessageRange - 162, // 250: proto.DeleteChatAction.messageRange:type_name -> proto.SyncActionMessageRange - 162, // 251: proto.ClearChatAction.messageRange:type_name -> proto.SyncActionMessageRange - 162, // 252: proto.ArchiveChatAction.messageRange:type_name -> proto.SyncActionMessageRange - 157, // 253: proto.SyncActionData.value:type_name -> proto.SyncActionValue - 33, // 254: proto.BizIdentityInfo.vlevel:type_name -> proto.BizIdentityInfo.VerifiedLevelValue - 192, // 255: proto.BizIdentityInfo.vnameCert:type_name -> proto.VerifiedNameCertificate - 34, // 256: proto.BizIdentityInfo.hostStorage:type_name -> proto.BizIdentityInfo.HostStorageType - 35, // 257: proto.BizIdentityInfo.actualActors:type_name -> proto.BizIdentityInfo.ActualActorsType - 192, // 258: proto.BizAccountPayload.vnameCert:type_name -> proto.VerifiedNameCertificate - 36, // 259: proto.BizAccountLinkInfo.hostStorage:type_name -> proto.BizAccountLinkInfo.HostStorageType - 37, // 260: proto.BizAccountLinkInfo.accountType:type_name -> proto.BizAccountLinkInfo.AccountType - 199, // 261: proto.HandshakeMessage.clientHello:type_name -> proto.HandshakeClientHello - 198, // 262: proto.HandshakeMessage.serverHello:type_name -> proto.HandshakeServerHello - 200, // 263: proto.HandshakeMessage.clientFinish:type_name -> proto.HandshakeClientFinish - 264, // 264: proto.ClientPayload.userAgent:type_name -> proto.ClientPayload.UserAgent - 263, // 265: proto.ClientPayload.webInfo:type_name -> proto.ClientPayload.WebInfo - 40, // 266: proto.ClientPayload.connectType:type_name -> proto.ClientPayload.ConnectType - 41, // 267: proto.ClientPayload.connectReason:type_name -> proto.ClientPayload.ConnectReason - 266, // 268: proto.ClientPayload.dnsSource:type_name -> proto.ClientPayload.DNSSource - 265, // 269: proto.ClientPayload.devicePairingData:type_name -> proto.ClientPayload.DevicePairingRegistrationData - 38, // 270: proto.ClientPayload.product:type_name -> proto.ClientPayload.Product - 39, // 271: proto.ClientPayload.iosAppExtension:type_name -> proto.ClientPayload.IOSAppExtension - 42, // 272: proto.ClientPayload.bizMarketSegment:type_name -> proto.ClientPayload.BizMarketSegment - 203, // 273: proto.WebNotificationsInfo.notifyMessages:type_name -> proto.WebMessageInfo - 145, // 274: proto.WebMessageInfo.key:type_name -> proto.MessageKey - 109, // 275: proto.WebMessageInfo.message:type_name -> proto.Message - 48, // 276: proto.WebMessageInfo.status:type_name -> proto.WebMessageInfo.Status - 47, // 277: proto.WebMessageInfo.messageStubType:type_name -> proto.WebMessageInfo.StubType - 211, // 278: proto.WebMessageInfo.paymentInfo:type_name -> proto.PaymentInfo - 65, // 279: proto.WebMessageInfo.finalLiveLocation:type_name -> proto.LiveLocationMessage - 211, // 280: proto.WebMessageInfo.quotedPaymentInfo:type_name -> proto.PaymentInfo - 49, // 281: proto.WebMessageInfo.bizPrivacyStatus:type_name -> proto.WebMessageInfo.BizPrivacyStatus - 213, // 282: proto.WebMessageInfo.mediaData:type_name -> proto.MediaData - 210, // 283: proto.WebMessageInfo.photoChange:type_name -> proto.PhotoChange - 205, // 284: proto.WebMessageInfo.userReceipt:type_name -> proto.UserReceipt - 207, // 285: proto.WebMessageInfo.reactions:type_name -> proto.Reaction - 213, // 286: proto.WebMessageInfo.quotedStickerData:type_name -> proto.MediaData - 206, // 287: proto.WebMessageInfo.statusPsa:type_name -> proto.StatusPSA - 208, // 288: proto.WebMessageInfo.pollUpdates:type_name -> proto.PollUpdate - 209, // 289: proto.WebMessageInfo.pollAdditionalMetadata:type_name -> proto.PollAdditionalMetadata - 214, // 290: proto.WebMessageInfo.keepInChat:type_name -> proto.KeepInChat - 50, // 291: proto.WebFeatures.labelsDisplay:type_name -> proto.WebFeatures.Flag - 50, // 292: proto.WebFeatures.voipIndividualOutgoing:type_name -> proto.WebFeatures.Flag - 50, // 293: proto.WebFeatures.groupsV3:type_name -> proto.WebFeatures.Flag - 50, // 294: proto.WebFeatures.groupsV3Create:type_name -> proto.WebFeatures.Flag - 50, // 295: proto.WebFeatures.changeNumberV2:type_name -> proto.WebFeatures.Flag - 50, // 296: proto.WebFeatures.queryStatusV3Thumbnail:type_name -> proto.WebFeatures.Flag - 50, // 297: proto.WebFeatures.liveLocations:type_name -> proto.WebFeatures.Flag - 50, // 298: proto.WebFeatures.queryVname:type_name -> proto.WebFeatures.Flag - 50, // 299: proto.WebFeatures.voipIndividualIncoming:type_name -> proto.WebFeatures.Flag - 50, // 300: proto.WebFeatures.quickRepliesQuery:type_name -> proto.WebFeatures.Flag - 50, // 301: proto.WebFeatures.payments:type_name -> proto.WebFeatures.Flag - 50, // 302: proto.WebFeatures.stickerPackQuery:type_name -> proto.WebFeatures.Flag - 50, // 303: proto.WebFeatures.liveLocationsFinal:type_name -> proto.WebFeatures.Flag - 50, // 304: proto.WebFeatures.labelsEdit:type_name -> proto.WebFeatures.Flag - 50, // 305: proto.WebFeatures.mediaUpload:type_name -> proto.WebFeatures.Flag - 50, // 306: proto.WebFeatures.mediaUploadRichQuickReplies:type_name -> proto.WebFeatures.Flag - 50, // 307: proto.WebFeatures.vnameV2:type_name -> proto.WebFeatures.Flag - 50, // 308: proto.WebFeatures.videoPlaybackUrl:type_name -> proto.WebFeatures.Flag - 50, // 309: proto.WebFeatures.statusRanking:type_name -> proto.WebFeatures.Flag - 50, // 310: proto.WebFeatures.voipIndividualVideo:type_name -> proto.WebFeatures.Flag - 50, // 311: proto.WebFeatures.thirdPartyStickers:type_name -> proto.WebFeatures.Flag - 50, // 312: proto.WebFeatures.frequentlyForwardedSetting:type_name -> proto.WebFeatures.Flag - 50, // 313: proto.WebFeatures.groupsV4JoinPermission:type_name -> proto.WebFeatures.Flag - 50, // 314: proto.WebFeatures.recentStickers:type_name -> proto.WebFeatures.Flag - 50, // 315: proto.WebFeatures.catalog:type_name -> proto.WebFeatures.Flag - 50, // 316: proto.WebFeatures.starredStickers:type_name -> proto.WebFeatures.Flag - 50, // 317: proto.WebFeatures.voipGroupCall:type_name -> proto.WebFeatures.Flag - 50, // 318: proto.WebFeatures.templateMessage:type_name -> proto.WebFeatures.Flag - 50, // 319: proto.WebFeatures.templateMessageInteractivity:type_name -> proto.WebFeatures.Flag - 50, // 320: proto.WebFeatures.ephemeralMessages:type_name -> proto.WebFeatures.Flag - 50, // 321: proto.WebFeatures.e2ENotificationSync:type_name -> proto.WebFeatures.Flag - 50, // 322: proto.WebFeatures.recentStickersV2:type_name -> proto.WebFeatures.Flag - 50, // 323: proto.WebFeatures.recentStickersV3:type_name -> proto.WebFeatures.Flag - 50, // 324: proto.WebFeatures.userNotice:type_name -> proto.WebFeatures.Flag - 50, // 325: proto.WebFeatures.support:type_name -> proto.WebFeatures.Flag - 50, // 326: proto.WebFeatures.groupUiiCleanup:type_name -> proto.WebFeatures.Flag - 50, // 327: proto.WebFeatures.groupDogfoodingInternalOnly:type_name -> proto.WebFeatures.Flag - 50, // 328: proto.WebFeatures.settingsSync:type_name -> proto.WebFeatures.Flag - 50, // 329: proto.WebFeatures.archiveV2:type_name -> proto.WebFeatures.Flag - 50, // 330: proto.WebFeatures.ephemeralAllowGroupMembers:type_name -> proto.WebFeatures.Flag - 50, // 331: proto.WebFeatures.ephemeral24HDuration:type_name -> proto.WebFeatures.Flag - 50, // 332: proto.WebFeatures.mdForceUpgrade:type_name -> proto.WebFeatures.Flag - 50, // 333: proto.WebFeatures.disappearingMode:type_name -> proto.WebFeatures.Flag - 50, // 334: proto.WebFeatures.externalMdOptInAvailable:type_name -> proto.WebFeatures.Flag - 50, // 335: proto.WebFeatures.noDeleteMessageTimeLimit:type_name -> proto.WebFeatures.Flag - 145, // 336: proto.Reaction.key:type_name -> proto.MessageKey - 145, // 337: proto.PollUpdate.pollUpdateMessageKey:type_name -> proto.MessageKey - 123, // 338: proto.PollUpdate.vote:type_name -> proto.PollVoteMessage - 53, // 339: proto.PaymentInfo.currencyDeprecated:type_name -> proto.PaymentInfo.Currency - 52, // 340: proto.PaymentInfo.status:type_name -> proto.PaymentInfo.Status - 145, // 341: proto.PaymentInfo.requestMessageKey:type_name -> proto.MessageKey - 51, // 342: proto.PaymentInfo.txnStatus:type_name -> proto.PaymentInfo.TxnStatus - 108, // 343: proto.PaymentInfo.primaryAmount:type_name -> proto.Money - 108, // 344: proto.PaymentInfo.exchangeAmount:type_name -> proto.Money - 145, // 345: proto.NotificationMessageInfo.key:type_name -> proto.MessageKey - 109, // 346: proto.NotificationMessageInfo.message:type_name -> proto.Message - 1, // 347: proto.KeepInChat.keepType:type_name -> proto.KeepType - 145, // 348: proto.KeepInChat.key:type_name -> proto.MessageKey - 270, // 349: proto.CertChain.leaf:type_name -> proto.CertChain.NoiseCertificate - 270, // 350: proto.CertChain.intermediate:type_name -> proto.CertChain.NoiseCertificate - 31, // 351: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.mediaUploadResult:type_name -> proto.MediaRetryNotification.ResultType - 115, // 352: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.stickerMessage:type_name -> proto.StickerMessage - 220, // 353: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.linkPreviewResponse:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse - 225, // 354: proto.ListMessage.Section.rows:type_name -> proto.ListMessage.Row - 226, // 355: proto.ListMessage.ProductSection.products:type_name -> proto.ListMessage.Product - 227, // 356: proto.ListMessage.ProductListInfo.productSections:type_name -> proto.ListMessage.ProductSection - 229, // 357: proto.ListMessage.ProductListInfo.headerImage:type_name -> proto.ListMessage.ProductListHeaderImage - 10, // 358: proto.InteractiveMessage.ShopMessage.surface:type_name -> proto.InteractiveMessage.ShopMessage.Surface - 238, // 359: proto.InteractiveMessage.NativeFlowMessage.buttons:type_name -> proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton - 80, // 360: proto.InteractiveMessage.Header.documentMessage:type_name -> proto.DocumentMessage - 73, // 361: proto.InteractiveMessage.Header.imageMessage:type_name -> proto.ImageMessage - 111, // 362: proto.InteractiveMessage.Header.videoMessage:type_name -> proto.VideoMessage - 241, // 363: proto.HighlyStructuredMessage.HSMLocalizableParameter.currency:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency - 240, // 364: proto.HighlyStructuredMessage.HSMLocalizableParameter.dateTime:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime - 243, // 365: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.component:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent - 242, // 366: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.unixEpoch:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch - 12, // 367: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.dayOfWeek:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType - 13, // 368: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.calendar:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType - 246, // 369: proto.ButtonsMessage.Button.buttonText:type_name -> proto.ButtonsMessage.Button.ButtonText - 20, // 370: proto.ButtonsMessage.Button.type:type_name -> proto.ButtonsMessage.Button.Type - 245, // 371: proto.ButtonsMessage.Button.nativeFlowInfo:type_name -> proto.ButtonsMessage.Button.NativeFlowInfo - 22, // 372: proto.ContextInfo.ExternalAdReplyInfo.mediaType:type_name -> proto.ContextInfo.ExternalAdReplyInfo.MediaType - 23, // 373: proto.ContextInfo.AdReplyInfo.mediaType:type_name -> proto.ContextInfo.AdReplyInfo.MediaType - 75, // 374: proto.TemplateButton.URLButton.displayText:type_name -> proto.HighlyStructuredMessage - 75, // 375: proto.TemplateButton.URLButton.url:type_name -> proto.HighlyStructuredMessage - 75, // 376: proto.TemplateButton.QuickReplyButton.displayText:type_name -> proto.HighlyStructuredMessage - 75, // 377: proto.TemplateButton.CallButton.displayText:type_name -> proto.HighlyStructuredMessage - 75, // 378: proto.TemplateButton.CallButton.phoneNumber:type_name -> proto.HighlyStructuredMessage - 100, // 379: proto.TemplateMessage.HydratedFourRowTemplate.hydratedButtons:type_name -> proto.HydratedTemplateButton - 80, // 380: proto.TemplateMessage.HydratedFourRowTemplate.documentMessage:type_name -> proto.DocumentMessage - 73, // 381: proto.TemplateMessage.HydratedFourRowTemplate.imageMessage:type_name -> proto.ImageMessage - 111, // 382: proto.TemplateMessage.HydratedFourRowTemplate.videoMessage:type_name -> proto.VideoMessage - 64, // 383: proto.TemplateMessage.HydratedFourRowTemplate.locationMessage:type_name -> proto.LocationMessage - 75, // 384: proto.TemplateMessage.FourRowTemplate.content:type_name -> proto.HighlyStructuredMessage - 75, // 385: proto.TemplateMessage.FourRowTemplate.footer:type_name -> proto.HighlyStructuredMessage - 105, // 386: proto.TemplateMessage.FourRowTemplate.buttons:type_name -> proto.TemplateButton - 80, // 387: proto.TemplateMessage.FourRowTemplate.documentMessage:type_name -> proto.DocumentMessage - 75, // 388: proto.TemplateMessage.FourRowTemplate.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage - 73, // 389: proto.TemplateMessage.FourRowTemplate.imageMessage:type_name -> proto.ImageMessage - 111, // 390: proto.TemplateMessage.FourRowTemplate.videoMessage:type_name -> proto.VideoMessage - 64, // 391: proto.TemplateMessage.FourRowTemplate.locationMessage:type_name -> proto.LocationMessage - 73, // 392: proto.ProductMessage.ProductSnapshot.productImage:type_name -> proto.ImageMessage - 73, // 393: proto.ProductMessage.CatalogSnapshot.catalogImage:type_name -> proto.ImageMessage - 193, // 394: proto.VerifiedNameCertificate.Details.localizedNames:type_name -> proto.LocalizedName - 267, // 395: proto.ClientPayload.WebInfo.webdPayload:type_name -> proto.ClientPayload.WebInfo.WebdPayload - 43, // 396: proto.ClientPayload.WebInfo.webSubPlatform:type_name -> proto.ClientPayload.WebInfo.WebSubPlatform - 45, // 397: proto.ClientPayload.UserAgent.platform:type_name -> proto.ClientPayload.UserAgent.Platform - 268, // 398: proto.ClientPayload.UserAgent.appVersion:type_name -> proto.ClientPayload.UserAgent.AppVersion - 44, // 399: proto.ClientPayload.UserAgent.releaseChannel:type_name -> proto.ClientPayload.UserAgent.ReleaseChannel - 46, // 400: proto.ClientPayload.DNSSource.dnsMethod:type_name -> proto.ClientPayload.DNSSource.DNSResolutionMethod - 401, // [401:401] is the sub-list for method output_type - 401, // [401:401] is the sub-list for method input_type - 401, // [401:401] is the sub-list for extension type_name - 401, // [401:401] is the sub-list for extension extendee - 0, // [0:401] is the sub-list for field type_name + 127, // 135: proto.Message.pollCreationMessageV2:type_name -> proto.PollCreationMessage + 102, // 136: proto.MessageContextInfo.deviceListMetadata:type_name -> proto.DeviceListMetadata + 99, // 137: proto.VideoMessage.interactiveAnnotations:type_name -> proto.InteractiveAnnotation + 103, // 138: proto.VideoMessage.contextInfo:type_name -> proto.ContextInfo + 25, // 139: proto.VideoMessage.gifAttribution:type_name -> proto.VideoMessage.Attribution + 103, // 140: proto.TemplateMessage.contextInfo:type_name -> proto.ContextInfo + 257, // 141: proto.TemplateMessage.hydratedTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate + 258, // 142: proto.TemplateMessage.fourRowTemplate:type_name -> proto.TemplateMessage.FourRowTemplate + 257, // 143: proto.TemplateMessage.hydratedFourRowTemplate:type_name -> proto.TemplateMessage.HydratedFourRowTemplate + 71, // 144: proto.TemplateMessage.interactiveMessageTemplate:type_name -> proto.InteractiveMessage + 103, // 145: proto.TemplateButtonReplyMessage.contextInfo:type_name -> proto.ContextInfo + 103, // 146: proto.StickerMessage.contextInfo:type_name -> proto.ContextInfo + 109, // 147: proto.SendPaymentMessage.noteMessage:type_name -> proto.Message + 145, // 148: proto.SendPaymentMessage.requestMessageKey:type_name -> proto.MessageKey + 107, // 149: proto.SendPaymentMessage.background:type_name -> proto.PaymentBackground + 103, // 150: proto.RequestPhoneNumberMessage.contextInfo:type_name -> proto.ContextInfo + 109, // 151: proto.RequestPaymentMessage.noteMessage:type_name -> proto.Message + 108, // 152: proto.RequestPaymentMessage.amount:type_name -> proto.Money + 107, // 153: proto.RequestPaymentMessage.background:type_name -> proto.PaymentBackground + 145, // 154: proto.ReactionMessage.key:type_name -> proto.MessageKey + 145, // 155: proto.ProtocolMessage.key:type_name -> proto.MessageKey + 26, // 156: proto.ProtocolMessage.type:type_name -> proto.ProtocolMessage.Type + 74, // 157: proto.ProtocolMessage.historySyncNotification:type_name -> proto.HistorySyncNotification + 92, // 158: proto.ProtocolMessage.appStateSyncKeyShare:type_name -> proto.AppStateSyncKeyShare + 93, // 159: proto.ProtocolMessage.appStateSyncKeyRequest:type_name -> proto.AppStateSyncKeyRequest + 72, // 160: proto.ProtocolMessage.initialSecurityNotificationSettingSync:type_name -> proto.InitialSecurityNotificationSettingSync + 97, // 161: proto.ProtocolMessage.appStateFatalExceptionNotification:type_name -> proto.AppStateFatalExceptionNotification + 101, // 162: proto.ProtocolMessage.disappearingMode:type_name -> proto.DisappearingMode + 109, // 163: proto.ProtocolMessage.editedMessage:type_name -> proto.Message + 61, // 164: proto.ProtocolMessage.peerDataOperationRequestMessage:type_name -> proto.PeerDataOperationRequestMessage + 60, // 165: proto.ProtocolMessage.peerDataOperationRequestResponseMessage:type_name -> proto.PeerDataOperationRequestResponseMessage + 259, // 166: proto.ProductMessage.product:type_name -> proto.ProductMessage.ProductSnapshot + 260, // 167: proto.ProductMessage.catalog:type_name -> proto.ProductMessage.CatalogSnapshot + 103, // 168: proto.ProductMessage.contextInfo:type_name -> proto.ContextInfo + 145, // 169: proto.PollUpdateMessage.pollCreationMessageKey:type_name -> proto.MessageKey + 126, // 170: proto.PollUpdateMessage.vote:type_name -> proto.PollEncValue + 125, // 171: proto.PollUpdateMessage.metadata:type_name -> proto.PollUpdateMessageMetadata + 261, // 172: proto.PollCreationMessage.options:type_name -> proto.PollCreationMessage.Option + 103, // 173: proto.PollCreationMessage.contextInfo:type_name -> proto.ContextInfo + 133, // 174: proto.PastParticipants.pastParticipants:type_name -> proto.PastParticipant + 27, // 175: proto.PastParticipant.leaveReason:type_name -> proto.PastParticipant.LeaveReason + 28, // 176: proto.HistorySync.syncType:type_name -> proto.HistorySync.HistorySyncType + 138, // 177: proto.HistorySync.conversations:type_name -> proto.Conversation + 204, // 178: proto.HistorySync.statusV3Messages:type_name -> proto.WebMessageInfo + 131, // 179: proto.HistorySync.pushnames:type_name -> proto.Pushname + 137, // 180: proto.HistorySync.globalSettings:type_name -> proto.GlobalSettings + 130, // 181: proto.HistorySync.recentStickers:type_name -> proto.StickerMetadata + 132, // 182: proto.HistorySync.pastParticipants:type_name -> proto.PastParticipants + 204, // 183: proto.HistorySyncMsg.message:type_name -> proto.WebMessageInfo + 29, // 184: proto.GroupParticipant.rank:type_name -> proto.GroupParticipant.Rank + 129, // 185: proto.GlobalSettings.lightThemeWallpaper:type_name -> proto.WallpaperSettings + 2, // 186: proto.GlobalSettings.mediaVisibility:type_name -> proto.MediaVisibility + 129, // 187: proto.GlobalSettings.darkThemeWallpaper:type_name -> proto.WallpaperSettings + 140, // 188: proto.GlobalSettings.autoDownloadWiFi:type_name -> proto.AutoDownloadSettings + 140, // 189: proto.GlobalSettings.autoDownloadCellular:type_name -> proto.AutoDownloadSettings + 140, // 190: proto.GlobalSettings.autoDownloadRoaming:type_name -> proto.AutoDownloadSettings + 139, // 191: proto.GlobalSettings.avatarUserSettings:type_name -> proto.AvatarUserSettings + 135, // 192: proto.Conversation.messages:type_name -> proto.HistorySyncMsg + 30, // 193: proto.Conversation.endOfHistoryTransferType:type_name -> proto.Conversation.EndOfHistoryTransferType + 101, // 194: proto.Conversation.disappearingMode:type_name -> proto.DisappearingMode + 136, // 195: proto.Conversation.participant:type_name -> proto.GroupParticipant + 129, // 196: proto.Conversation.wallpaper:type_name -> proto.WallpaperSettings + 2, // 197: proto.Conversation.mediaVisibility:type_name -> proto.MediaVisibility + 142, // 198: proto.MsgRowOpaqueData.currentMsg:type_name -> proto.MsgOpaqueData + 142, // 199: proto.MsgRowOpaqueData.quotedMsg:type_name -> proto.MsgOpaqueData + 262, // 200: proto.MsgOpaqueData.pollOptions:type_name -> proto.MsgOpaqueData.PollOption + 126, // 201: proto.MsgOpaqueData.encPollVote:type_name -> proto.PollEncValue + 31, // 202: proto.MediaRetryNotification.result:type_name -> proto.MediaRetryNotification.ResultType + 146, // 203: proto.SyncdSnapshot.version:type_name -> proto.SyncdVersion + 149, // 204: proto.SyncdSnapshot.records:type_name -> proto.SyncdRecord + 154, // 205: proto.SyncdSnapshot.keyId:type_name -> proto.KeyId + 153, // 206: proto.SyncdRecord.index:type_name -> proto.SyncdIndex + 147, // 207: proto.SyncdRecord.value:type_name -> proto.SyncdValue + 154, // 208: proto.SyncdRecord.keyId:type_name -> proto.KeyId + 146, // 209: proto.SyncdPatch.version:type_name -> proto.SyncdVersion + 152, // 210: proto.SyncdPatch.mutations:type_name -> proto.SyncdMutation + 155, // 211: proto.SyncdPatch.externalMutations:type_name -> proto.ExternalBlobReference + 154, // 212: proto.SyncdPatch.keyId:type_name -> proto.KeyId + 156, // 213: proto.SyncdPatch.exitCode:type_name -> proto.ExitCode + 152, // 214: proto.SyncdMutations.mutations:type_name -> proto.SyncdMutation + 32, // 215: proto.SyncdMutation.operation:type_name -> proto.SyncdMutation.SyncdOperation + 149, // 216: proto.SyncdMutation.record:type_name -> proto.SyncdRecord + 165, // 217: proto.SyncActionValue.starAction:type_name -> proto.StarAction + 184, // 218: proto.SyncActionValue.contactAction:type_name -> proto.ContactAction + 176, // 219: proto.SyncActionValue.muteAction:type_name -> proto.MuteAction + 174, // 220: proto.SyncActionValue.pinAction:type_name -> proto.PinAction + 166, // 221: proto.SyncActionValue.securityNotificationSetting:type_name -> proto.SecurityNotificationSetting + 170, // 222: proto.SyncActionValue.pushNameSetting:type_name -> proto.PushNameSetting + 169, // 223: proto.SyncActionValue.quickReplyAction:type_name -> proto.QuickReplyAction + 168, // 224: proto.SyncActionValue.recentEmojiWeightsAction:type_name -> proto.RecentEmojiWeightsAction + 179, // 225: proto.SyncActionValue.labelEditAction:type_name -> proto.LabelEditAction + 180, // 226: proto.SyncActionValue.labelAssociationAction:type_name -> proto.LabelAssociationAction + 178, // 227: proto.SyncActionValue.localeSetting:type_name -> proto.LocaleSetting + 188, // 228: proto.SyncActionValue.archiveChatAction:type_name -> proto.ArchiveChatAction + 182, // 229: proto.SyncActionValue.deleteMessageForMeAction:type_name -> proto.DeleteMessageForMeAction + 181, // 230: proto.SyncActionValue.keyExpiration:type_name -> proto.KeyExpiration + 177, // 231: proto.SyncActionValue.markChatAsReadAction:type_name -> proto.MarkChatAsReadAction + 185, // 232: proto.SyncActionValue.clearChatAction:type_name -> proto.ClearChatAction + 183, // 233: proto.SyncActionValue.deleteChatAction:type_name -> proto.DeleteChatAction + 159, // 234: proto.SyncActionValue.unarchiveChatsSetting:type_name -> proto.UnarchiveChatsSetting + 172, // 235: proto.SyncActionValue.primaryFeature:type_name -> proto.PrimaryFeature + 189, // 236: proto.SyncActionValue.androidUnsupportedActions:type_name -> proto.AndroidUnsupportedActions + 190, // 237: proto.SyncActionValue.agentAction:type_name -> proto.AgentAction + 163, // 238: proto.SyncActionValue.subscriptionAction:type_name -> proto.SubscriptionAction + 158, // 239: proto.SyncActionValue.userStatusMuteAction:type_name -> proto.UserStatusMuteAction + 160, // 240: proto.SyncActionValue.timeFormatAction:type_name -> proto.TimeFormatAction + 175, // 241: proto.SyncActionValue.nuxAction:type_name -> proto.NuxAction + 171, // 242: proto.SyncActionValue.primaryVersionAction:type_name -> proto.PrimaryVersionAction + 164, // 243: proto.SyncActionValue.stickerAction:type_name -> proto.StickerAction + 167, // 244: proto.SyncActionValue.removeRecentStickerAction:type_name -> proto.RemoveRecentStickerAction + 187, // 245: proto.SyncActionValue.chatAssignment:type_name -> proto.ChatAssignmentAction + 186, // 246: proto.SyncActionValue.chatAssignmentOpenedStatus:type_name -> proto.ChatAssignmentOpenedStatusAction + 173, // 247: proto.SyncActionValue.pnForLidChatAction:type_name -> proto.PnForLidChatAction + 145, // 248: proto.SyncActionMessage.key:type_name -> proto.MessageKey + 161, // 249: proto.SyncActionMessageRange.messages:type_name -> proto.SyncActionMessage + 192, // 250: proto.RecentEmojiWeightsAction.weights:type_name -> proto.RecentEmojiWeight + 162, // 251: proto.MarkChatAsReadAction.messageRange:type_name -> proto.SyncActionMessageRange + 162, // 252: proto.DeleteChatAction.messageRange:type_name -> proto.SyncActionMessageRange + 162, // 253: proto.ClearChatAction.messageRange:type_name -> proto.SyncActionMessageRange + 162, // 254: proto.ArchiveChatAction.messageRange:type_name -> proto.SyncActionMessageRange + 157, // 255: proto.SyncActionData.value:type_name -> proto.SyncActionValue + 33, // 256: proto.BizIdentityInfo.vlevel:type_name -> proto.BizIdentityInfo.VerifiedLevelValue + 193, // 257: proto.BizIdentityInfo.vnameCert:type_name -> proto.VerifiedNameCertificate + 34, // 258: proto.BizIdentityInfo.hostStorage:type_name -> proto.BizIdentityInfo.HostStorageType + 35, // 259: proto.BizIdentityInfo.actualActors:type_name -> proto.BizIdentityInfo.ActualActorsType + 193, // 260: proto.BizAccountPayload.vnameCert:type_name -> proto.VerifiedNameCertificate + 36, // 261: proto.BizAccountLinkInfo.hostStorage:type_name -> proto.BizAccountLinkInfo.HostStorageType + 37, // 262: proto.BizAccountLinkInfo.accountType:type_name -> proto.BizAccountLinkInfo.AccountType + 200, // 263: proto.HandshakeMessage.clientHello:type_name -> proto.HandshakeClientHello + 199, // 264: proto.HandshakeMessage.serverHello:type_name -> proto.HandshakeServerHello + 201, // 265: proto.HandshakeMessage.clientFinish:type_name -> proto.HandshakeClientFinish + 265, // 266: proto.ClientPayload.userAgent:type_name -> proto.ClientPayload.UserAgent + 264, // 267: proto.ClientPayload.webInfo:type_name -> proto.ClientPayload.WebInfo + 40, // 268: proto.ClientPayload.connectType:type_name -> proto.ClientPayload.ConnectType + 41, // 269: proto.ClientPayload.connectReason:type_name -> proto.ClientPayload.ConnectReason + 267, // 270: proto.ClientPayload.dnsSource:type_name -> proto.ClientPayload.DNSSource + 266, // 271: proto.ClientPayload.devicePairingData:type_name -> proto.ClientPayload.DevicePairingRegistrationData + 38, // 272: proto.ClientPayload.product:type_name -> proto.ClientPayload.Product + 39, // 273: proto.ClientPayload.iosAppExtension:type_name -> proto.ClientPayload.IOSAppExtension + 42, // 274: proto.ClientPayload.bizMarketSegment:type_name -> proto.ClientPayload.BizMarketSegment + 204, // 275: proto.WebNotificationsInfo.notifyMessages:type_name -> proto.WebMessageInfo + 145, // 276: proto.WebMessageInfo.key:type_name -> proto.MessageKey + 109, // 277: proto.WebMessageInfo.message:type_name -> proto.Message + 48, // 278: proto.WebMessageInfo.status:type_name -> proto.WebMessageInfo.Status + 47, // 279: proto.WebMessageInfo.messageStubType:type_name -> proto.WebMessageInfo.StubType + 212, // 280: proto.WebMessageInfo.paymentInfo:type_name -> proto.PaymentInfo + 65, // 281: proto.WebMessageInfo.finalLiveLocation:type_name -> proto.LiveLocationMessage + 212, // 282: proto.WebMessageInfo.quotedPaymentInfo:type_name -> proto.PaymentInfo + 49, // 283: proto.WebMessageInfo.bizPrivacyStatus:type_name -> proto.WebMessageInfo.BizPrivacyStatus + 214, // 284: proto.WebMessageInfo.mediaData:type_name -> proto.MediaData + 211, // 285: proto.WebMessageInfo.photoChange:type_name -> proto.PhotoChange + 206, // 286: proto.WebMessageInfo.userReceipt:type_name -> proto.UserReceipt + 208, // 287: proto.WebMessageInfo.reactions:type_name -> proto.Reaction + 214, // 288: proto.WebMessageInfo.quotedStickerData:type_name -> proto.MediaData + 207, // 289: proto.WebMessageInfo.statusPsa:type_name -> proto.StatusPSA + 209, // 290: proto.WebMessageInfo.pollUpdates:type_name -> proto.PollUpdate + 210, // 291: proto.WebMessageInfo.pollAdditionalMetadata:type_name -> proto.PollAdditionalMetadata + 215, // 292: proto.WebMessageInfo.keepInChat:type_name -> proto.KeepInChat + 50, // 293: proto.WebFeatures.labelsDisplay:type_name -> proto.WebFeatures.Flag + 50, // 294: proto.WebFeatures.voipIndividualOutgoing:type_name -> proto.WebFeatures.Flag + 50, // 295: proto.WebFeatures.groupsV3:type_name -> proto.WebFeatures.Flag + 50, // 296: proto.WebFeatures.groupsV3Create:type_name -> proto.WebFeatures.Flag + 50, // 297: proto.WebFeatures.changeNumberV2:type_name -> proto.WebFeatures.Flag + 50, // 298: proto.WebFeatures.queryStatusV3Thumbnail:type_name -> proto.WebFeatures.Flag + 50, // 299: proto.WebFeatures.liveLocations:type_name -> proto.WebFeatures.Flag + 50, // 300: proto.WebFeatures.queryVname:type_name -> proto.WebFeatures.Flag + 50, // 301: proto.WebFeatures.voipIndividualIncoming:type_name -> proto.WebFeatures.Flag + 50, // 302: proto.WebFeatures.quickRepliesQuery:type_name -> proto.WebFeatures.Flag + 50, // 303: proto.WebFeatures.payments:type_name -> proto.WebFeatures.Flag + 50, // 304: proto.WebFeatures.stickerPackQuery:type_name -> proto.WebFeatures.Flag + 50, // 305: proto.WebFeatures.liveLocationsFinal:type_name -> proto.WebFeatures.Flag + 50, // 306: proto.WebFeatures.labelsEdit:type_name -> proto.WebFeatures.Flag + 50, // 307: proto.WebFeatures.mediaUpload:type_name -> proto.WebFeatures.Flag + 50, // 308: proto.WebFeatures.mediaUploadRichQuickReplies:type_name -> proto.WebFeatures.Flag + 50, // 309: proto.WebFeatures.vnameV2:type_name -> proto.WebFeatures.Flag + 50, // 310: proto.WebFeatures.videoPlaybackUrl:type_name -> proto.WebFeatures.Flag + 50, // 311: proto.WebFeatures.statusRanking:type_name -> proto.WebFeatures.Flag + 50, // 312: proto.WebFeatures.voipIndividualVideo:type_name -> proto.WebFeatures.Flag + 50, // 313: proto.WebFeatures.thirdPartyStickers:type_name -> proto.WebFeatures.Flag + 50, // 314: proto.WebFeatures.frequentlyForwardedSetting:type_name -> proto.WebFeatures.Flag + 50, // 315: proto.WebFeatures.groupsV4JoinPermission:type_name -> proto.WebFeatures.Flag + 50, // 316: proto.WebFeatures.recentStickers:type_name -> proto.WebFeatures.Flag + 50, // 317: proto.WebFeatures.catalog:type_name -> proto.WebFeatures.Flag + 50, // 318: proto.WebFeatures.starredStickers:type_name -> proto.WebFeatures.Flag + 50, // 319: proto.WebFeatures.voipGroupCall:type_name -> proto.WebFeatures.Flag + 50, // 320: proto.WebFeatures.templateMessage:type_name -> proto.WebFeatures.Flag + 50, // 321: proto.WebFeatures.templateMessageInteractivity:type_name -> proto.WebFeatures.Flag + 50, // 322: proto.WebFeatures.ephemeralMessages:type_name -> proto.WebFeatures.Flag + 50, // 323: proto.WebFeatures.e2ENotificationSync:type_name -> proto.WebFeatures.Flag + 50, // 324: proto.WebFeatures.recentStickersV2:type_name -> proto.WebFeatures.Flag + 50, // 325: proto.WebFeatures.recentStickersV3:type_name -> proto.WebFeatures.Flag + 50, // 326: proto.WebFeatures.userNotice:type_name -> proto.WebFeatures.Flag + 50, // 327: proto.WebFeatures.support:type_name -> proto.WebFeatures.Flag + 50, // 328: proto.WebFeatures.groupUiiCleanup:type_name -> proto.WebFeatures.Flag + 50, // 329: proto.WebFeatures.groupDogfoodingInternalOnly:type_name -> proto.WebFeatures.Flag + 50, // 330: proto.WebFeatures.settingsSync:type_name -> proto.WebFeatures.Flag + 50, // 331: proto.WebFeatures.archiveV2:type_name -> proto.WebFeatures.Flag + 50, // 332: proto.WebFeatures.ephemeralAllowGroupMembers:type_name -> proto.WebFeatures.Flag + 50, // 333: proto.WebFeatures.ephemeral24HDuration:type_name -> proto.WebFeatures.Flag + 50, // 334: proto.WebFeatures.mdForceUpgrade:type_name -> proto.WebFeatures.Flag + 50, // 335: proto.WebFeatures.disappearingMode:type_name -> proto.WebFeatures.Flag + 50, // 336: proto.WebFeatures.externalMdOptInAvailable:type_name -> proto.WebFeatures.Flag + 50, // 337: proto.WebFeatures.noDeleteMessageTimeLimit:type_name -> proto.WebFeatures.Flag + 145, // 338: proto.Reaction.key:type_name -> proto.MessageKey + 145, // 339: proto.PollUpdate.pollUpdateMessageKey:type_name -> proto.MessageKey + 123, // 340: proto.PollUpdate.vote:type_name -> proto.PollVoteMessage + 53, // 341: proto.PaymentInfo.currencyDeprecated:type_name -> proto.PaymentInfo.Currency + 52, // 342: proto.PaymentInfo.status:type_name -> proto.PaymentInfo.Status + 145, // 343: proto.PaymentInfo.requestMessageKey:type_name -> proto.MessageKey + 51, // 344: proto.PaymentInfo.txnStatus:type_name -> proto.PaymentInfo.TxnStatus + 108, // 345: proto.PaymentInfo.primaryAmount:type_name -> proto.Money + 108, // 346: proto.PaymentInfo.exchangeAmount:type_name -> proto.Money + 145, // 347: proto.NotificationMessageInfo.key:type_name -> proto.MessageKey + 109, // 348: proto.NotificationMessageInfo.message:type_name -> proto.Message + 1, // 349: proto.KeepInChat.keepType:type_name -> proto.KeepType + 145, // 350: proto.KeepInChat.key:type_name -> proto.MessageKey + 271, // 351: proto.CertChain.leaf:type_name -> proto.CertChain.NoiseCertificate + 271, // 352: proto.CertChain.intermediate:type_name -> proto.CertChain.NoiseCertificate + 31, // 353: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.mediaUploadResult:type_name -> proto.MediaRetryNotification.ResultType + 115, // 354: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.stickerMessage:type_name -> proto.StickerMessage + 221, // 355: proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.linkPreviewResponse:type_name -> proto.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse + 226, // 356: proto.ListMessage.Section.rows:type_name -> proto.ListMessage.Row + 227, // 357: proto.ListMessage.ProductSection.products:type_name -> proto.ListMessage.Product + 228, // 358: proto.ListMessage.ProductListInfo.productSections:type_name -> proto.ListMessage.ProductSection + 230, // 359: proto.ListMessage.ProductListInfo.headerImage:type_name -> proto.ListMessage.ProductListHeaderImage + 10, // 360: proto.InteractiveMessage.ShopMessage.surface:type_name -> proto.InteractiveMessage.ShopMessage.Surface + 239, // 361: proto.InteractiveMessage.NativeFlowMessage.buttons:type_name -> proto.InteractiveMessage.NativeFlowMessage.NativeFlowButton + 80, // 362: proto.InteractiveMessage.Header.documentMessage:type_name -> proto.DocumentMessage + 73, // 363: proto.InteractiveMessage.Header.imageMessage:type_name -> proto.ImageMessage + 111, // 364: proto.InteractiveMessage.Header.videoMessage:type_name -> proto.VideoMessage + 242, // 365: proto.HighlyStructuredMessage.HSMLocalizableParameter.currency:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + 241, // 366: proto.HighlyStructuredMessage.HSMLocalizableParameter.dateTime:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + 244, // 367: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.component:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + 243, // 368: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.unixEpoch:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + 12, // 369: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.dayOfWeek:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType + 13, // 370: proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.calendar:type_name -> proto.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType + 247, // 371: proto.ButtonsMessage.Button.buttonText:type_name -> proto.ButtonsMessage.Button.ButtonText + 20, // 372: proto.ButtonsMessage.Button.type:type_name -> proto.ButtonsMessage.Button.Type + 246, // 373: proto.ButtonsMessage.Button.nativeFlowInfo:type_name -> proto.ButtonsMessage.Button.NativeFlowInfo + 22, // 374: proto.ContextInfo.ExternalAdReplyInfo.mediaType:type_name -> proto.ContextInfo.ExternalAdReplyInfo.MediaType + 23, // 375: proto.ContextInfo.AdReplyInfo.mediaType:type_name -> proto.ContextInfo.AdReplyInfo.MediaType + 75, // 376: proto.TemplateButton.URLButton.displayText:type_name -> proto.HighlyStructuredMessage + 75, // 377: proto.TemplateButton.URLButton.url:type_name -> proto.HighlyStructuredMessage + 75, // 378: proto.TemplateButton.QuickReplyButton.displayText:type_name -> proto.HighlyStructuredMessage + 75, // 379: proto.TemplateButton.CallButton.displayText:type_name -> proto.HighlyStructuredMessage + 75, // 380: proto.TemplateButton.CallButton.phoneNumber:type_name -> proto.HighlyStructuredMessage + 100, // 381: proto.TemplateMessage.HydratedFourRowTemplate.hydratedButtons:type_name -> proto.HydratedTemplateButton + 80, // 382: proto.TemplateMessage.HydratedFourRowTemplate.documentMessage:type_name -> proto.DocumentMessage + 73, // 383: proto.TemplateMessage.HydratedFourRowTemplate.imageMessage:type_name -> proto.ImageMessage + 111, // 384: proto.TemplateMessage.HydratedFourRowTemplate.videoMessage:type_name -> proto.VideoMessage + 64, // 385: proto.TemplateMessage.HydratedFourRowTemplate.locationMessage:type_name -> proto.LocationMessage + 75, // 386: proto.TemplateMessage.FourRowTemplate.content:type_name -> proto.HighlyStructuredMessage + 75, // 387: proto.TemplateMessage.FourRowTemplate.footer:type_name -> proto.HighlyStructuredMessage + 105, // 388: proto.TemplateMessage.FourRowTemplate.buttons:type_name -> proto.TemplateButton + 80, // 389: proto.TemplateMessage.FourRowTemplate.documentMessage:type_name -> proto.DocumentMessage + 75, // 390: proto.TemplateMessage.FourRowTemplate.highlyStructuredMessage:type_name -> proto.HighlyStructuredMessage + 73, // 391: proto.TemplateMessage.FourRowTemplate.imageMessage:type_name -> proto.ImageMessage + 111, // 392: proto.TemplateMessage.FourRowTemplate.videoMessage:type_name -> proto.VideoMessage + 64, // 393: proto.TemplateMessage.FourRowTemplate.locationMessage:type_name -> proto.LocationMessage + 73, // 394: proto.ProductMessage.ProductSnapshot.productImage:type_name -> proto.ImageMessage + 73, // 395: proto.ProductMessage.CatalogSnapshot.catalogImage:type_name -> proto.ImageMessage + 194, // 396: proto.VerifiedNameCertificate.Details.localizedNames:type_name -> proto.LocalizedName + 268, // 397: proto.ClientPayload.WebInfo.webdPayload:type_name -> proto.ClientPayload.WebInfo.WebdPayload + 43, // 398: proto.ClientPayload.WebInfo.webSubPlatform:type_name -> proto.ClientPayload.WebInfo.WebSubPlatform + 45, // 399: proto.ClientPayload.UserAgent.platform:type_name -> proto.ClientPayload.UserAgent.Platform + 269, // 400: proto.ClientPayload.UserAgent.appVersion:type_name -> proto.ClientPayload.UserAgent.AppVersion + 44, // 401: proto.ClientPayload.UserAgent.releaseChannel:type_name -> proto.ClientPayload.UserAgent.ReleaseChannel + 46, // 402: proto.ClientPayload.DNSSource.dnsMethod:type_name -> proto.ClientPayload.DNSSource.DNSResolutionMethod + 403, // [403:403] is the sub-list for method output_type + 403, // [403:403] is the sub-list for method input_type + 403, // [403:403] is the sub-list for extension type_name + 403, // [403:403] is the sub-list for extension extendee + 0, // [0:403] is the sub-list for field type_name } func init() { file_binary_proto_def_proto_init() } @@ -24230,7 +24320,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PinAction); i { + switch v := v.(*PnForLidChatAction); i { case 0: return &v.state case 1: @@ -24242,7 +24332,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NuxAction); i { + switch v := v.(*PinAction); i { case 0: return &v.state case 1: @@ -24254,7 +24344,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MuteAction); i { + switch v := v.(*NuxAction); i { case 0: return &v.state case 1: @@ -24266,7 +24356,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkChatAsReadAction); i { + switch v := v.(*MuteAction); i { case 0: return &v.state case 1: @@ -24278,7 +24368,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocaleSetting); i { + switch v := v.(*MarkChatAsReadAction); i { case 0: return &v.state case 1: @@ -24290,7 +24380,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[124].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LabelEditAction); i { + switch v := v.(*LocaleSetting); i { case 0: return &v.state case 1: @@ -24302,7 +24392,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LabelAssociationAction); i { + switch v := v.(*LabelEditAction); i { case 0: return &v.state case 1: @@ -24314,7 +24404,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyExpiration); i { + switch v := v.(*LabelAssociationAction); i { case 0: return &v.state case 1: @@ -24326,7 +24416,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMessageForMeAction); i { + switch v := v.(*KeyExpiration); i { case 0: return &v.state case 1: @@ -24338,7 +24428,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteChatAction); i { + switch v := v.(*DeleteMessageForMeAction); i { case 0: return &v.state case 1: @@ -24350,7 +24440,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContactAction); i { + switch v := v.(*DeleteChatAction); i { case 0: return &v.state case 1: @@ -24362,7 +24452,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[130].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearChatAction); i { + switch v := v.(*ContactAction); i { case 0: return &v.state case 1: @@ -24374,7 +24464,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[131].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatAssignmentOpenedStatusAction); i { + switch v := v.(*ClearChatAction); i { case 0: return &v.state case 1: @@ -24386,7 +24476,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[132].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatAssignmentAction); i { + switch v := v.(*ChatAssignmentOpenedStatusAction); i { case 0: return &v.state case 1: @@ -24398,7 +24488,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[133].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveChatAction); i { + switch v := v.(*ChatAssignmentAction); i { case 0: return &v.state case 1: @@ -24410,7 +24500,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AndroidUnsupportedActions); i { + switch v := v.(*ArchiveChatAction); i { case 0: return &v.state case 1: @@ -24422,7 +24512,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AgentAction); i { + switch v := v.(*AndroidUnsupportedActions); i { case 0: return &v.state case 1: @@ -24434,7 +24524,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncActionData); i { + switch v := v.(*AgentAction); i { case 0: return &v.state case 1: @@ -24446,7 +24536,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[137].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecentEmojiWeight); i { + switch v := v.(*SyncActionData); i { case 0: return &v.state case 1: @@ -24458,7 +24548,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[138].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifiedNameCertificate); i { + switch v := v.(*RecentEmojiWeight); i { case 0: return &v.state case 1: @@ -24470,7 +24560,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalizedName); i { + switch v := v.(*VerifiedNameCertificate); i { case 0: return &v.state case 1: @@ -24482,7 +24572,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BizIdentityInfo); i { + switch v := v.(*LocalizedName); i { case 0: return &v.state case 1: @@ -24494,7 +24584,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BizAccountPayload); i { + switch v := v.(*BizIdentityInfo); i { case 0: return &v.state case 1: @@ -24506,7 +24596,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[142].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BizAccountLinkInfo); i { + switch v := v.(*BizAccountPayload); i { case 0: return &v.state case 1: @@ -24518,7 +24608,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[143].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeMessage); i { + switch v := v.(*BizAccountLinkInfo); i { case 0: return &v.state case 1: @@ -24530,7 +24620,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[144].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeServerHello); i { + switch v := v.(*HandshakeMessage); i { case 0: return &v.state case 1: @@ -24542,7 +24632,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[145].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeClientHello); i { + switch v := v.(*HandshakeServerHello); i { case 0: return &v.state case 1: @@ -24554,7 +24644,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[146].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HandshakeClientFinish); i { + switch v := v.(*HandshakeClientHello); i { case 0: return &v.state case 1: @@ -24566,7 +24656,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[147].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload); i { + switch v := v.(*HandshakeClientFinish); i { case 0: return &v.state case 1: @@ -24578,7 +24668,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[148].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebNotificationsInfo); i { + switch v := v.(*ClientPayload); i { case 0: return &v.state case 1: @@ -24590,7 +24680,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[149].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebMessageInfo); i { + switch v := v.(*WebNotificationsInfo); i { case 0: return &v.state case 1: @@ -24602,7 +24692,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[150].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebFeatures); i { + switch v := v.(*WebMessageInfo); i { case 0: return &v.state case 1: @@ -24614,7 +24704,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[151].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserReceipt); i { + switch v := v.(*WebFeatures); i { case 0: return &v.state case 1: @@ -24626,7 +24716,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[152].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusPSA); i { + switch v := v.(*UserReceipt); i { case 0: return &v.state case 1: @@ -24638,7 +24728,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[153].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Reaction); i { + switch v := v.(*StatusPSA); i { case 0: return &v.state case 1: @@ -24650,7 +24740,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[154].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollUpdate); i { + switch v := v.(*Reaction); i { case 0: return &v.state case 1: @@ -24662,7 +24752,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollAdditionalMetadata); i { + switch v := v.(*PollUpdate); i { case 0: return &v.state case 1: @@ -24674,7 +24764,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[156].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PhotoChange); i { + switch v := v.(*PollAdditionalMetadata); i { case 0: return &v.state case 1: @@ -24686,7 +24776,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[157].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaymentInfo); i { + switch v := v.(*PhotoChange); i { case 0: return &v.state case 1: @@ -24698,7 +24788,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[158].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotificationMessageInfo); i { + switch v := v.(*PaymentInfo); i { case 0: return &v.state case 1: @@ -24710,7 +24800,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MediaData); i { + switch v := v.(*NotificationMessageInfo); i { case 0: return &v.state case 1: @@ -24722,7 +24812,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[160].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeepInChat); i { + switch v := v.(*MediaData); i { case 0: return &v.state case 1: @@ -24734,7 +24824,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[161].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoiseCertificate); i { + switch v := v.(*KeepInChat); i { case 0: return &v.state case 1: @@ -24746,7 +24836,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[162].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertChain); i { + switch v := v.(*NoiseCertificate); i { case 0: return &v.state case 1: @@ -24758,7 +24848,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[163].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceProps_HistorySyncConfig); i { + switch v := v.(*CertChain); i { case 0: return &v.state case 1: @@ -24770,7 +24860,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[164].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeviceProps_AppVersion); i { + switch v := v.(*DeviceProps_HistorySyncConfig); i { case 0: return &v.state case 1: @@ -24782,7 +24872,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[165].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult); i { + switch v := v.(*DeviceProps_AppVersion); i { case 0: return &v.state case 1: @@ -24794,7 +24884,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[166].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse); i { + switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult); i { case 0: return &v.state case 1: @@ -24806,7 +24896,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[167].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerDataOperationRequestMessage_RequestUrlPreview); i { + switch v := v.(*PeerDataOperationRequestResponseMessage_PeerDataOperationResult_LinkPreviewResponse); i { case 0: return &v.state case 1: @@ -24818,7 +24908,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[168].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerDataOperationRequestMessage_RequestStickerReupload); i { + switch v := v.(*PeerDataOperationRequestMessage_RequestUrlPreview); i { case 0: return &v.state case 1: @@ -24830,7 +24920,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[169].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponseMessage_SingleSelectReply); i { + switch v := v.(*PeerDataOperationRequestMessage_RequestStickerReupload); i { case 0: return &v.state case 1: @@ -24842,7 +24932,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[170].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage_Section); i { + switch v := v.(*ListResponseMessage_SingleSelectReply); i { case 0: return &v.state case 1: @@ -24854,7 +24944,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage_Row); i { + switch v := v.(*ListMessage_Section); i { case 0: return &v.state case 1: @@ -24866,7 +24956,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[172].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage_Product); i { + switch v := v.(*ListMessage_Row); i { case 0: return &v.state case 1: @@ -24878,7 +24968,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[173].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage_ProductSection); i { + switch v := v.(*ListMessage_Product); i { case 0: return &v.state case 1: @@ -24890,7 +24980,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[174].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage_ProductListInfo); i { + switch v := v.(*ListMessage_ProductSection); i { case 0: return &v.state case 1: @@ -24902,7 +24992,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[175].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessage_ProductListHeaderImage); i { + switch v := v.(*ListMessage_ProductListInfo); i { case 0: return &v.state case 1: @@ -24914,7 +25004,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[176].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveResponseMessage_NativeFlowResponseMessage); i { + switch v := v.(*ListMessage_ProductListHeaderImage); i { case 0: return &v.state case 1: @@ -24926,7 +25016,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[177].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveResponseMessage_Body); i { + switch v := v.(*InteractiveResponseMessage_NativeFlowResponseMessage); i { case 0: return &v.state case 1: @@ -24938,7 +25028,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[178].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_ShopMessage); i { + switch v := v.(*InteractiveResponseMessage_Body); i { case 0: return &v.state case 1: @@ -24950,7 +25040,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[179].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_NativeFlowMessage); i { + switch v := v.(*InteractiveMessage_ShopMessage); i { case 0: return &v.state case 1: @@ -24962,7 +25052,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[180].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_Header); i { + switch v := v.(*InteractiveMessage_NativeFlowMessage); i { case 0: return &v.state case 1: @@ -24974,7 +25064,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[181].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_Footer); i { + switch v := v.(*InteractiveMessage_Header); i { case 0: return &v.state case 1: @@ -24986,7 +25076,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[182].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_CollectionMessage); i { + switch v := v.(*InteractiveMessage_Footer); i { case 0: return &v.state case 1: @@ -24998,7 +25088,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[183].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_Body); i { + switch v := v.(*InteractiveMessage_CollectionMessage); i { case 0: return &v.state case 1: @@ -25010,7 +25100,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[184].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InteractiveMessage_NativeFlowMessage_NativeFlowButton); i { + switch v := v.(*InteractiveMessage_Body); i { case 0: return &v.state case 1: @@ -25022,7 +25112,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[185].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter); i { + switch v := v.(*InteractiveMessage_NativeFlowMessage_NativeFlowButton); i { case 0: return &v.state case 1: @@ -25034,7 +25124,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[186].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime); i { + switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter); i { case 0: return &v.state case 1: @@ -25046,7 +25136,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[187].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency); i { + switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime); i { case 0: return &v.state case 1: @@ -25058,7 +25148,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[188].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch); i { + switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMCurrency); i { case 0: return &v.state case 1: @@ -25070,7 +25160,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[189].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent); i { + switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeUnixEpoch); i { case 0: return &v.state case 1: @@ -25082,7 +25172,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[190].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ButtonsMessage_Button); i { + switch v := v.(*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_HSMDateTimeComponent); i { case 0: return &v.state case 1: @@ -25094,7 +25184,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[191].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ButtonsMessage_Button_NativeFlowInfo); i { + switch v := v.(*ButtonsMessage_Button); i { case 0: return &v.state case 1: @@ -25106,7 +25196,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[192].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ButtonsMessage_Button_ButtonText); i { + switch v := v.(*ButtonsMessage_Button_NativeFlowInfo); i { case 0: return &v.state case 1: @@ -25118,7 +25208,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[193].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HydratedTemplateButton_HydratedURLButton); i { + switch v := v.(*ButtonsMessage_Button_ButtonText); i { case 0: return &v.state case 1: @@ -25130,7 +25220,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[194].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HydratedTemplateButton_HydratedQuickReplyButton); i { + switch v := v.(*HydratedTemplateButton_HydratedURLButton); i { case 0: return &v.state case 1: @@ -25142,7 +25232,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[195].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HydratedTemplateButton_HydratedCallButton); i { + switch v := v.(*HydratedTemplateButton_HydratedQuickReplyButton); i { case 0: return &v.state case 1: @@ -25154,7 +25244,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[196].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextInfo_ExternalAdReplyInfo); i { + switch v := v.(*HydratedTemplateButton_HydratedCallButton); i { case 0: return &v.state case 1: @@ -25166,7 +25256,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[197].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextInfo_AdReplyInfo); i { + switch v := v.(*ContextInfo_ExternalAdReplyInfo); i { case 0: return &v.state case 1: @@ -25178,7 +25268,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[198].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateButton_URLButton); i { + switch v := v.(*ContextInfo_AdReplyInfo); i { case 0: return &v.state case 1: @@ -25190,7 +25280,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[199].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateButton_QuickReplyButton); i { + switch v := v.(*TemplateButton_URLButton); i { case 0: return &v.state case 1: @@ -25202,7 +25292,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[200].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateButton_CallButton); i { + switch v := v.(*TemplateButton_QuickReplyButton); i { case 0: return &v.state case 1: @@ -25214,7 +25304,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[201].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PaymentBackground_MediaData); i { + switch v := v.(*TemplateButton_CallButton); i { case 0: return &v.state case 1: @@ -25226,7 +25316,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[202].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateMessage_HydratedFourRowTemplate); i { + switch v := v.(*PaymentBackground_MediaData); i { case 0: return &v.state case 1: @@ -25238,7 +25328,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[203].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateMessage_FourRowTemplate); i { + switch v := v.(*TemplateMessage_HydratedFourRowTemplate); i { case 0: return &v.state case 1: @@ -25250,7 +25340,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[204].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProductMessage_ProductSnapshot); i { + switch v := v.(*TemplateMessage_FourRowTemplate); i { case 0: return &v.state case 1: @@ -25262,7 +25352,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[205].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProductMessage_CatalogSnapshot); i { + switch v := v.(*ProductMessage_ProductSnapshot); i { case 0: return &v.state case 1: @@ -25274,7 +25364,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[206].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PollCreationMessage_Option); i { + switch v := v.(*ProductMessage_CatalogSnapshot); i { case 0: return &v.state case 1: @@ -25286,7 +25376,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[207].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgOpaqueData_PollOption); i { + switch v := v.(*PollCreationMessage_Option); i { case 0: return &v.state case 1: @@ -25298,7 +25388,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[208].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifiedNameCertificate_Details); i { + switch v := v.(*MsgOpaqueData_PollOption); i { case 0: return &v.state case 1: @@ -25310,7 +25400,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[209].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_WebInfo); i { + switch v := v.(*VerifiedNameCertificate_Details); i { case 0: return &v.state case 1: @@ -25322,7 +25412,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[210].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_UserAgent); i { + switch v := v.(*ClientPayload_WebInfo); i { case 0: return &v.state case 1: @@ -25334,7 +25424,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[211].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_DevicePairingRegistrationData); i { + switch v := v.(*ClientPayload_UserAgent); i { case 0: return &v.state case 1: @@ -25346,7 +25436,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[212].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_DNSSource); i { + switch v := v.(*ClientPayload_DevicePairingRegistrationData); i { case 0: return &v.state case 1: @@ -25358,7 +25448,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[213].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_WebInfo_WebdPayload); i { + switch v := v.(*ClientPayload_DNSSource); i { case 0: return &v.state case 1: @@ -25370,7 +25460,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[214].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientPayload_UserAgent_AppVersion); i { + switch v := v.(*ClientPayload_WebInfo_WebdPayload); i { case 0: return &v.state case 1: @@ -25382,7 +25472,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[215].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoiseCertificate_Details); i { + switch v := v.(*ClientPayload_UserAgent_AppVersion); i { case 0: return &v.state case 1: @@ -25394,7 +25484,7 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[216].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertChain_NoiseCertificate); i { + switch v := v.(*NoiseCertificate_Details); i { case 0: return &v.state case 1: @@ -25406,6 +25496,18 @@ func file_binary_proto_def_proto_init() { } } file_binary_proto_def_proto_msgTypes[217].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CertChain_NoiseCertificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_binary_proto_def_proto_msgTypes[218].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CertChain_NoiseCertificate_Details); i { case 0: return &v.state @@ -25454,28 +25556,28 @@ func file_binary_proto_def_proto_init() { (*TemplateMessage_HydratedFourRowTemplate_)(nil), (*TemplateMessage_InteractiveMessageTemplate)(nil), } - file_binary_proto_def_proto_msgTypes[180].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[181].OneofWrappers = []interface{}{ (*InteractiveMessage_Header_DocumentMessage)(nil), (*InteractiveMessage_Header_ImageMessage)(nil), (*InteractiveMessage_Header_JpegThumbnail)(nil), (*InteractiveMessage_Header_VideoMessage)(nil), } - file_binary_proto_def_proto_msgTypes[185].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[186].OneofWrappers = []interface{}{ (*HighlyStructuredMessage_HSMLocalizableParameter_Currency)(nil), (*HighlyStructuredMessage_HSMLocalizableParameter_DateTime)(nil), } - file_binary_proto_def_proto_msgTypes[186].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[187].OneofWrappers = []interface{}{ (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_Component)(nil), (*HighlyStructuredMessage_HSMLocalizableParameter_HSMDateTime_UnixEpoch)(nil), } - file_binary_proto_def_proto_msgTypes[202].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[203].OneofWrappers = []interface{}{ (*TemplateMessage_HydratedFourRowTemplate_DocumentMessage)(nil), (*TemplateMessage_HydratedFourRowTemplate_HydratedTitleText)(nil), (*TemplateMessage_HydratedFourRowTemplate_ImageMessage)(nil), (*TemplateMessage_HydratedFourRowTemplate_VideoMessage)(nil), (*TemplateMessage_HydratedFourRowTemplate_LocationMessage)(nil), } - file_binary_proto_def_proto_msgTypes[203].OneofWrappers = []interface{}{ + file_binary_proto_def_proto_msgTypes[204].OneofWrappers = []interface{}{ (*TemplateMessage_FourRowTemplate_DocumentMessage)(nil), (*TemplateMessage_FourRowTemplate_HighlyStructuredMessage)(nil), (*TemplateMessage_FourRowTemplate_ImageMessage)(nil), @@ -25488,7 +25590,7 @@ func file_binary_proto_def_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_binary_proto_def_proto_rawDesc, NumEnums: 54, - NumMessages: 218, + NumMessages: 219, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw b/vendor/go.mau.fi/whatsmeow/binary/proto/def.pb.raw index 46beb17fb6c9398d34f1027ab258bca8a1fc2f77..52c9695087fdb88035633b273c40bab25df2e52c 100644 GIT binary patch delta 361 zcmex9h2_w6mJJ-(;^M^g)G#9n8=yXJBdN*JEmGn^*wt(nNf$9> z+`Uw0Yv{bFA80Ttb-2g+#bm v3-Y`&QzRIH26F~MIGf`(&h%ltJ^9Dqb<;K38O0b`raQ1RN^D;K?*caf!|;1E delta 75 zcmV-R0JQ(Ymjw5e1h5E80_+d73QO7qvjR}=2m-(yv+`I#4zq-36fpsXvzeGd1G5mE hcLxEkvxuXw2(yB$&IPl4vY1Q(t&jfA*28R diff --git a/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto b/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto index 5311aefb..b72ab79c 100644 --- a/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto +++ b/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto @@ -807,6 +807,7 @@ message ContextInfo { optional string parentGroupJid = 35; optional string trustBannerType = 37; optional uint32 trustBannerAction = 38; + optional bool isSampled = 39; } message ActionLink { @@ -926,6 +927,7 @@ message Message { optional EncReactionMessage encReactionMessage = 56; optional FutureProofMessage editedMessage = 58; optional FutureProofMessage viewOnceMessageV2Extension = 59; + optional PollCreationMessage pollCreationMessageV2 = 60; } message MessageContextInfo { @@ -1360,6 +1362,7 @@ message MsgOpaqueData { optional int64 senderTimestampMs = 22; optional string pollUpdateParentKey = 23; optional PollEncValue encPollVote = 24; + optional bool isSentCagPollCreation = 28; optional string encReactionTargetMessageKey = 25; optional bytes encReactionEncPayload = 26; optional bytes encReactionEncIv = 27; @@ -1495,6 +1498,7 @@ message SyncActionValue { optional RemoveRecentStickerAction removeRecentStickerAction = 34; optional ChatAssignmentAction chatAssignment = 35; optional ChatAssignmentOpenedStatusAction chatAssignmentOpenedStatus = 36; + optional PnForLidChatAction pnForLidChatAction = 37; } message UserStatusMuteAction { @@ -1575,6 +1579,10 @@ message PrimaryFeature { repeated string flags = 1; } +message PnForLidChatAction { + optional string pnJid = 1; +} + message PinAction { optional bool pinned = 1; } @@ -2249,6 +2257,7 @@ message PollUpdate { optional MessageKey pollUpdateMessageKey = 1; optional PollVoteMessage vote = 2; optional int64 senderTimestampMs = 3; + optional int64 serverTimestampMs = 4; } message PollAdditionalMetadata { diff --git a/vendor/go.mau.fi/whatsmeow/broadcast.go b/vendor/go.mau.fi/whatsmeow/broadcast.go index c1260a9c..a61ccfb6 100644 --- a/vendor/go.mau.fi/whatsmeow/broadcast.go +++ b/vendor/go.mau.fi/whatsmeow/broadcast.go @@ -25,16 +25,20 @@ func (cli *Client) getBroadcastListParticipants(jid types.JID) ([]types.JID, err if err != nil { return nil, err } + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { + return nil, ErrNotLoggedIn + } var hasSelf bool for _, participant := range list { - if participant.User == cli.Store.ID.User { + if participant.User == ownID.User { hasSelf = true break } } if !hasSelf { - list = append(list, cli.Store.ID.ToNonAD()) + list = append(list, ownID) } return list, nil } diff --git a/vendor/go.mau.fi/whatsmeow/client.go b/vendor/go.mau.fi/whatsmeow/client.go index 4a862bd3..3f832c94 100644 --- a/vendor/go.mau.fi/whatsmeow/client.go +++ b/vendor/go.mau.fi/whatsmeow/client.go @@ -114,11 +114,18 @@ type Client struct { // If it returns false, the accepting will be cancelled and the retry receipt will be ignored. PreRetryCallback func(receipt *events.Receipt, id types.MessageID, retryCount int, msg *waProto.Message) bool + // PrePairCallback is called before pairing is completed. If it returns false, the pairing will be cancelled and + // the client will disconnect. + PrePairCallback func(jid types.JID, platform, businessName string) bool + // Should untrusted identity errors be handled automatically? If true, the stored identity and existing signal // sessions will be removed on untrusted identity errors, and an events.IdentityChange will be dispatched. // If false, decrypting a message from untrusted devices will fail. AutoTrustIdentity bool + // Should SubscribePresence return an error if no privacy token is stored for the user? + ErrorOnSubscribePresenceWithoutToken bool + uniqueID string idCounter uint32 @@ -250,6 +257,14 @@ func (cli *Client) closeSocketWaitChan() { cli.socketLock.Unlock() } +func (cli *Client) getOwnID() types.JID { + id := cli.Store.ID + if id == nil { + return types.EmptyJID + } + return *id +} + func (cli *Client) WaitForConnection(timeout time.Duration) bool { timeoutChan := time.After(timeout) cli.socketLock.RLock() @@ -392,7 +407,8 @@ func (cli *Client) unlockedDisconnect() { // Note that this will not emit any events. The LoggedOut event is only used for external logouts // (triggered by the user from the main device or by WhatsApp servers). func (cli *Client) Logout() error { - if cli.Store.ID == nil { + ownID := cli.getOwnID() + if ownID.IsEmpty() { return ErrNotLoggedIn } _, err := cli.sendIQ(infoQuery{ @@ -402,7 +418,7 @@ func (cli *Client) Logout() error { Content: []waBinary.Node{{ Tag: "remove-companion-device", Attrs: waBinary.Attrs{ - "jid": *cli.Store.ID, + "jid": ownID, "reason": "user_initiated", }, }}, @@ -600,7 +616,10 @@ func (cli *Client) ParseWebMessage(chatJID types.JID, webMsg *waProto.WebMessage } var err error if info.IsFromMe { - info.Sender = cli.Store.ID.ToNonAD() + info.Sender = cli.getOwnID().ToNonAD() + if info.Sender.IsEmpty() { + return nil, ErrNotLoggedIn + } } else if chatJID.Server == types.DefaultUserServer { info.Sender = chatJID } else if webMsg.GetParticipant() != "" { diff --git a/vendor/go.mau.fi/whatsmeow/connectionevents.go b/vendor/go.mau.fi/whatsmeow/connectionevents.go index 54fafccf..5d0835fa 100644 --- a/vendor/go.mau.fi/whatsmeow/connectionevents.go +++ b/vendor/go.mau.fi/whatsmeow/connectionevents.go @@ -89,10 +89,9 @@ func (cli *Client) handleConnectFailure(node *waBinary.Node) { } } else if reason == events.ConnectFailureTempBanned { cli.Log.Warnf("Temporary ban connect failure: %s", node.XMLString()) - expiryTime := ag.UnixTime("expire") go cli.dispatchEvent(&events.TemporaryBan{ Code: events.TempBanReason(ag.Int("code")), - Expire: expiryTime, + Expire: time.Duration(ag.Int("expire")) * time.Second, }) } else if reason == events.ConnectFailureClientOutdated { cli.Log.Errorf("Client outdated (405) connect failure") diff --git a/vendor/go.mau.fi/whatsmeow/download.go b/vendor/go.mau.fi/whatsmeow/download.go index 77b392a5..99fd3648 100644 --- a/vendor/go.mau.fi/whatsmeow/download.go +++ b/vendor/go.mau.fi/whatsmeow/download.go @@ -70,6 +70,7 @@ var ( _ DownloadableMessage = (*waProto.VideoMessage)(nil) _ DownloadableMessage = (*waProto.DocumentMessage)(nil) _ DownloadableMessage = (*waProto.StickerMessage)(nil) + _ DownloadableMessage = (*waProto.StickerMetadata)(nil) _ DownloadableMessage = (*waProto.HistorySyncNotification)(nil) _ DownloadableMessage = (*waProto.ExternalBlobReference)(nil) _ DownloadableThumbnail = (*waProto.ExtendedTextMessage)(nil) @@ -96,6 +97,7 @@ var classToMediaType = map[protoreflect.Name]MediaType{ "VideoMessage": MediaVideo, "DocumentMessage": MediaDocument, "StickerMessage": MediaImage, + "StickerMetadata": MediaImage, "HistorySyncNotification": MediaHistory, "ExternalBlobReference": MediaAppState, diff --git a/vendor/go.mau.fi/whatsmeow/errors.go b/vendor/go.mau.fi/whatsmeow/errors.go index 21bc67e0..62227f3b 100644 --- a/vendor/go.mau.fi/whatsmeow/errors.go +++ b/vendor/go.mau.fi/whatsmeow/errors.go @@ -27,8 +27,45 @@ var ( ErrQRStoreContainsID = errors.New("GetQRChannel can only be called when there's no user ID in the client's Store") ErrNoPushName = errors.New("can't send presence without PushName set") + + ErrNoPrivacyToken = errors.New("no privacy token stored") ) +// Errors that happen while confirming device pairing +var ( + ErrPairInvalidDeviceIdentityHMAC = errors.New("invalid device identity HMAC in pair success message") + ErrPairInvalidDeviceSignature = errors.New("invalid device signature in pair success message") + ErrPairRejectedLocally = errors.New("local PrePairCallback rejected pairing") +) + +// PairProtoError is included in an events.PairError if the pairing failed due to a protobuf error. +type PairProtoError struct { + Message string + ProtoErr error +} + +func (err *PairProtoError) Error() string { + return fmt.Sprintf("%s: %v", err.Message, err.ProtoErr) +} + +func (err *PairProtoError) Unwrap() error { + return err.ProtoErr +} + +// PairDatabaseError is included in an events.PairError if the pairing failed due to being unable to save the credentials to the device store. +type PairDatabaseError struct { + Message string + DBErr error +} + +func (err *PairDatabaseError) Error() string { + return fmt.Sprintf("%s: %v", err.Message, err.DBErr) +} + +func (err *PairDatabaseError) Unwrap() error { + return err.DBErr +} + var ( // ErrProfilePictureUnauthorized is returned by GetProfilePictureInfo when trying to get the profile picture of a user // whose privacy settings prevent you from seeing their profile picture (status code 401). @@ -65,6 +102,7 @@ var ( ErrBroadcastListUnsupported = errors.New("sending to non-status broadcast lists is not yet supported") ErrUnknownServer = errors.New("can't send message to unknown server") ErrRecipientADJID = errors.New("message recipient must be normal (non-AD) JID") + ErrServerReturnedError = errors.New("server returned error") ) // Some errors that Client.Download can return @@ -118,12 +156,18 @@ type IQError struct { // Common errors returned by info queries for use with errors.Is var ( - ErrIQBadRequest error = &IQError{Code: 400, Text: "bad-request"} - ErrIQNotAuthorized error = &IQError{Code: 401, Text: "not-authorized"} - ErrIQForbidden error = &IQError{Code: 403, Text: "forbidden"} - ErrIQNotFound error = &IQError{Code: 404, Text: "item-not-found"} - ErrIQNotAcceptable error = &IQError{Code: 406, Text: "not-acceptable"} - ErrIQGone error = &IQError{Code: 410, Text: "gone"} + ErrIQBadRequest error = &IQError{Code: 400, Text: "bad-request"} + ErrIQNotAuthorized error = &IQError{Code: 401, Text: "not-authorized"} + ErrIQForbidden error = &IQError{Code: 403, Text: "forbidden"} + ErrIQNotFound error = &IQError{Code: 404, Text: "item-not-found"} + ErrIQNotAllowed error = &IQError{Code: 405, Text: "not-allowed"} + ErrIQNotAcceptable error = &IQError{Code: 406, Text: "not-acceptable"} + ErrIQGone error = &IQError{Code: 410, Text: "gone"} + ErrIQResourceLimit error = &IQError{Code: 419, Text: "resource-limit"} + ErrIQLocked error = &IQError{Code: 423, Text: "locked"} + ErrIQInternalServerError error = &IQError{Code: 500, Text: "internal-server-error"} + ErrIQServiceUnavailable error = &IQError{Code: 503, Text: "service-unavailable"} + ErrIQPartialServerError error = &IQError{Code: 530, Text: "partial-server-error"} ) func parseIQError(node *waBinary.Node) error { diff --git a/vendor/go.mau.fi/whatsmeow/group.go b/vendor/go.mau.fi/whatsmeow/group.go index a2aa66f4..c771b5a2 100644 --- a/vendor/go.mau.fi/whatsmeow/group.go +++ b/vendor/go.mau.fi/whatsmeow/group.go @@ -29,31 +29,58 @@ func (cli *Client) sendGroupIQ(ctx context.Context, iqType infoQueryType, jid ty }) } +// ReqCreateGroup contains the request data for CreateGroup. +type ReqCreateGroup struct { + // Group names are limited to 25 characters. A longer group name will cause a 406 not acceptable error. + Name string + // You don't need to include your own JID in the participants array, the WhatsApp servers will add it implicitly. + Participants []types.JID + // A create key can be provided to deduplicate the group create notification that will be triggered + // when the group is created. If provided, the JoinedGroup event will contain the same key. + CreateKey types.MessageID + // Set IsParent to true to create a community instead of a normal group. + // When creating a community, the linked announcement group will be created automatically by the server. + types.GroupParent + // Set LinkedParentJID to create a group inside a community. + types.GroupLinkedParent +} + // CreateGroup creates a group on WhatsApp with the given name and participants. // -// You don't need to include your own JID in the participants array, the WhatsApp servers will add it implicitly. -// -// Group names are limited to 25 characters. A longer group name will cause a 406 not acceptable error. -// -// Optionally, a create key can be provided to deduplicate the group create notification that will be triggered -// when the group is created. If provided, the JoinedGroup event will contain the same key. -func (cli *Client) CreateGroup(name string, participants []types.JID, createKey types.MessageID) (*types.GroupInfo, error) { - participantNodes := make([]waBinary.Node, len(participants)) - for i, participant := range participants { +// See ReqCreateGroup for parameters. +func (cli *Client) CreateGroup(req ReqCreateGroup) (*types.GroupInfo, error) { + participantNodes := make([]waBinary.Node, len(req.Participants), len(req.Participants)+1) + for i, participant := range req.Participants { participantNodes[i] = waBinary.Node{ Tag: "participant", Attrs: waBinary.Attrs{"jid": participant}, } } - if createKey == "" { - createKey = GenerateMessageID() + if req.CreateKey == "" { + req.CreateKey = GenerateMessageID() + } + if req.IsParent { + if req.DefaultMembershipApprovalMode == "" { + req.DefaultMembershipApprovalMode = "request_required" + } + participantNodes = append(participantNodes, waBinary.Node{ + Tag: "parent", + Attrs: waBinary.Attrs{ + "default_membership_approval_mode": req.DefaultMembershipApprovalMode, + }, + }) + } else if !req.LinkedParentJID.IsEmpty() { + participantNodes = append(participantNodes, waBinary.Node{ + Tag: "linked_parent", + Attrs: waBinary.Attrs{"jid": req.LinkedParentJID}, + }) } // WhatsApp web doesn't seem to include the static prefix for these - key := strings.TrimPrefix(createKey, "3EB0") + key := strings.TrimPrefix(req.CreateKey, "3EB0") resp, err := cli.sendGroupIQ(context.TODO(), iqSet, types.GroupServerJID, waBinary.Node{ Tag: "create", Attrs: waBinary.Attrs{ - "subject": name, + "subject": req.Name, "key": key, }, Content: participantNodes, @@ -68,6 +95,37 @@ func (cli *Client) CreateGroup(name string, participants []types.JID, createKey return cli.parseGroupNode(&groupNode) } +// UnlinkGroup removes a child group from a parent community. +func (cli *Client) UnlinkGroup(parent, child types.JID) error { + _, err := cli.sendGroupIQ(context.TODO(), iqSet, parent, waBinary.Node{ + Tag: "unlink", + Attrs: waBinary.Attrs{"unlink_type": types.GroupLinkChangeTypeSub}, + Content: []waBinary.Node{{ + Tag: "group", + Attrs: waBinary.Attrs{"jid": child}, + }}, + }) + return err +} + +// LinkGroup adds an existing group as a child group in a community. +// +// To create a new group within a community, set LinkedParentJID in the CreateGroup request. +func (cli *Client) LinkGroup(parent, child types.JID) error { + _, err := cli.sendGroupIQ(context.TODO(), iqSet, parent, waBinary.Node{ + Tag: "links", + Content: []waBinary.Node{{ + Tag: "link", + Attrs: waBinary.Attrs{"link_type": types.GroupLinkChangeTypeSub}, + Content: []waBinary.Node{{ + Tag: "group", + Attrs: waBinary.Attrs{"jid": child}, + }}, + }}, + }) + return err +} + // LeaveGroup leaves the specified group on WhatsApp. func (cli *Client) LeaveGroup(jid types.JID) error { _, err := cli.sendGroupIQ(context.TODO(), iqSet, types.GroupServerJID, waBinary.Node{ @@ -357,6 +415,42 @@ func (cli *Client) GetJoinedGroups() ([]*types.GroupInfo, error) { return infos, nil } +// GetSubGroups gets the subgroups of the given community. +func (cli *Client) GetSubGroups(community types.JID) ([]*types.GroupLinkTarget, error) { + res, err := cli.sendGroupIQ(context.TODO(), iqGet, community, waBinary.Node{Tag: "sub_groups"}) + if err != nil { + return nil, err + } + groups, ok := res.GetOptionalChildByTag("sub_groups") + if !ok { + return nil, &ElementMissingError{Tag: "sub_groups", In: "response to subgroups query"} + } + var parsedGroups []*types.GroupLinkTarget + for _, child := range groups.GetChildren() { + if child.Tag == "group" { + parsedGroup, err := parseGroupLinkTargetNode(&child) + if err != nil { + return parsedGroups, fmt.Errorf("failed to parse group in subgroups list: %w", err) + } + parsedGroups = append(parsedGroups, &parsedGroup) + } + } + return parsedGroups, nil +} + +// GetLinkedGroupsParticipants gets all the participants in the groups of the given community. +func (cli *Client) GetLinkedGroupsParticipants(community types.JID) ([]types.JID, error) { + res, err := cli.sendGroupIQ(context.TODO(), iqGet, community, waBinary.Node{Tag: "linked_groups_participants"}) + if err != nil { + return nil, err + } + participants, ok := res.GetOptionalChildByTag("linked_groups_participants") + if !ok { + return nil, &ElementMissingError{Tag: "linked_groups_participants", In: "response to community participants query"} + } + return parseParticipantList(&participants), nil +} + // GetGroupInfo requests basic info about a group chat from the WhatsApp servers. func (cli *Client) GetGroupInfo(jid types.JID) (*types.GroupInfo, error) { return cli.getGroupInfo(context.TODO(), jid, true) @@ -433,6 +527,17 @@ func (cli *Client) parseGroupNode(groupNode *waBinary.Node) (*types.GroupInfo, e IsSuperAdmin: pcpType == "superadmin", JID: childAG.JID("jid"), } + if errorCode := childAG.OptionalInt("error"); errorCode != 0 { + participant.Error = errorCode + addRequest, ok := child.GetOptionalChildByTag("add_request") + if ok { + addAG := addRequest.AttrGetter() + participant.AddRequest = &types.GroupParticipantAddRequest{ + Code: addAG.String("code"), + Expiration: addAG.UnixTime("expiration"), + } + } + } group.Participants = append(group.Participants, participant) case "description": body, bodyOK := child.GetOptionalChildByTag("body") @@ -453,6 +558,13 @@ func (cli *Client) parseGroupNode(groupNode *waBinary.Node) (*types.GroupInfo, e case "member_add_mode": modeBytes, _ := child.Content.([]byte) group.MemberAddMode = types.GroupMemberAddMode(modeBytes) + case "linked_parent": + group.LinkedParentJID = childAG.JID("jid") + case "default_sub_group": + group.IsDefaultSubGroup = true + case "parent": + group.IsParent = true + group.DefaultMembershipApprovalMode = childAG.OptionalString("default_membership_approval_mode") default: cli.Log.Debugf("Unknown element in group node %s: %s", group.JID.String(), child.XMLString()) } @@ -464,6 +576,24 @@ func (cli *Client) parseGroupNode(groupNode *waBinary.Node) (*types.GroupInfo, e return &group, ag.Error() } +func parseGroupLinkTargetNode(groupNode *waBinary.Node) (types.GroupLinkTarget, error) { + ag := groupNode.AttrGetter() + jidKey := ag.OptionalJIDOrEmpty("jid") + if jidKey.IsEmpty() { + jidKey = types.NewJID(ag.String("id"), types.GroupServer) + } + return types.GroupLinkTarget{ + JID: jidKey, + GroupName: types.GroupName{ + Name: ag.String("subject"), + NameSetAt: ag.UnixTime("s_t"), + }, + GroupIsDefaultSub: types.GroupIsDefaultSub{ + IsDefaultSubGroup: groupNode.GetChildByTag("default_sub_group").Tag == "default_sub_group", + }, + }, ag.Error() +} + func parseParticipantList(node *waBinary.Node) (participants []types.JID) { children := node.GetChildren() participants = make([]types.JID, 0, len(children)) @@ -526,6 +656,8 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err evt.Locked = &types.GroupLocked{IsLocked: true} case "unlocked": evt.Locked = &types.GroupLocked{IsLocked: false} + case "delete": + evt.Delete = &types.GroupDelete{Deleted: true, DeleteReason: cag.String("reason")} case "subject": evt.Name = &types.GroupName{ Name: cag.String("subject"), @@ -575,6 +707,33 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err } case "not_ephemeral": evt.Ephemeral = &types.GroupEphemeral{IsEphemeral: false} + case "link": + evt.Link = &types.GroupLinkChange{ + Type: types.GroupLinkChangeType(cag.String("link_type")), + } + groupNode, ok := child.GetOptionalChildByTag("group") + if !ok { + return nil, &ElementMissingError{Tag: "group", In: "group link"} + } + var err error + evt.Link.Group, err = parseGroupLinkTargetNode(&groupNode) + if err != nil { + return nil, fmt.Errorf("failed to parse group link node in group change: %w", err) + } + case "unlink": + evt.Unlink = &types.GroupLinkChange{ + Type: types.GroupLinkChangeType(cag.String("unlink_type")), + UnlinkReason: types.GroupUnlinkReason(cag.String("unlink_reason")), + } + groupNode, ok := child.GetOptionalChildByTag("group") + if !ok { + return nil, &ElementMissingError{Tag: "group", In: "group unlink"} + } + var err error + evt.Unlink.Group, err = parseGroupLinkTargetNode(&groupNode) + if err != nil { + return nil, fmt.Errorf("failed to parse group unlink node in group change: %w", err) + } default: evt.UnknownChanges = append(evt.UnknownChanges, &child) } diff --git a/vendor/go.mau.fi/whatsmeow/mediaretry.go b/vendor/go.mau.fi/whatsmeow/mediaretry.go index e6e1fa8b..167df5f2 100644 --- a/vendor/go.mau.fi/whatsmeow/mediaretry.go +++ b/vendor/go.mau.fi/whatsmeow/mediaretry.go @@ -82,6 +82,10 @@ func (cli *Client) SendMediaRetryReceipt(message *types.MessageInfo, mediaKey [] if err != nil { return fmt.Errorf("failed to prepare encrypted retry receipt: %w", err) } + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { + return ErrNotLoggedIn + } rmrAttrs := waBinary.Attrs{ "jid": message.Chat, @@ -100,7 +104,7 @@ func (cli *Client) SendMediaRetryReceipt(message *types.MessageInfo, mediaKey [] Tag: "receipt", Attrs: waBinary.Attrs{ "id": message.ID, - "to": cli.Store.ID.ToNonAD(), + "to": ownID, "type": "server-error", }, Content: []waBinary.Node{ diff --git a/vendor/go.mau.fi/whatsmeow/message.go b/vendor/go.mau.fi/whatsmeow/message.go index 6c5ee41d..2c6c2db2 100644 --- a/vendor/go.mau.fi/whatsmeow/message.go +++ b/vendor/go.mau.fi/whatsmeow/message.go @@ -51,8 +51,8 @@ func (cli *Client) handleEncryptedMessage(node *waBinary.Node) { } func (cli *Client) parseMessageSource(node *waBinary.Node, requireParticipant bool) (source types.MessageSource, err error) { - clientID := cli.Store.ID - if clientID == nil { + clientID := cli.getOwnID() + if clientID.IsEmpty() { err = ErrNotLoggedIn return } @@ -406,18 +406,33 @@ func (cli *Client) processProtocolParts(info *types.MessageInfo, msg *waProto.Me func (cli *Client) storeHistoricalMessageSecrets(conversations []*waProto.Conversation) { var secrets []store.MessageSecretInsert - me := cli.Store.ID.ToNonAD() + var privacyTokens []store.PrivacyToken + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { + return + } for _, conv := range conversations { chatJID, _ := types.ParseJID(conv.GetId()) if chatJID.IsEmpty() { continue } + if chatJID.Server == types.DefaultUserServer && conv.GetTcToken() != nil { + ts := conv.GetTcTokenSenderTimestamp() + if ts == 0 { + ts = conv.GetTcTokenTimestamp() + } + privacyTokens = append(privacyTokens, store.PrivacyToken{ + User: chatJID, + Token: conv.GetTcToken(), + Timestamp: time.Unix(int64(ts), 0), + }) + } for _, msg := range conv.GetMessages() { if secret := msg.GetMessage().GetMessageSecret(); secret != nil { var senderJID types.JID msgKey := msg.GetMessage().GetKey() if msgKey.GetFromMe() { - senderJID = me + senderJID = ownID } else if chatJID.Server == types.DefaultUserServer { senderJID = chatJID } else if msgKey.GetParticipant() != "" { @@ -446,6 +461,15 @@ func (cli *Client) storeHistoricalMessageSecrets(conversations []*waProto.Conver cli.Log.Infof("Stored %d message secret keys from history sync", len(secrets)) } } + if len(privacyTokens) > 0 { + cli.Log.Debugf("Storing %d privacy tokens in history sync", len(privacyTokens)) + err := cli.Store.PrivacyTokens.PutPrivacyTokens(privacyTokens...) + if err != nil { + cli.Log.Errorf("Failed to store privacy tokens in history sync: %v", err) + } else { + cli.Log.Infof("Stored %d privacy tokens from history sync", len(privacyTokens)) + } + } } func (cli *Client) handleDecryptedMessage(info *types.MessageInfo, msg *waProto.Message) { diff --git a/vendor/go.mau.fi/whatsmeow/msgsecret.go b/vendor/go.mau.fi/whatsmeow/msgsecret.go index 75e9b271..a4cbb17b 100644 --- a/vendor/go.mau.fi/whatsmeow/msgsecret.go +++ b/vendor/go.mau.fi/whatsmeow/msgsecret.go @@ -94,7 +94,10 @@ func (cli *Client) decryptMsgSecret(msg *events.Message, useCase MsgSecretType, } func (cli *Client) encryptMsgSecret(chat, origSender types.JID, origMsgID types.MessageID, useCase MsgSecretType, plaintext []byte) (ciphertext, iv []byte, err error) { - ownID := *cli.Store.ID + ownID := cli.getOwnID() + if ownID.IsEmpty() { + return nil, nil, ErrNotLoggedIn + } baseEncKey, err := cli.Store.MsgSecrets.GetMessageSecret(chat, origSender, origMsgID) if err != nil { @@ -208,7 +211,7 @@ func HashPollOptions(optionNames []string) [][]byte { // fmt.Println(":(", err) // return // } -// resp, err := cli.SendMessage(context.Background(), evt.Info.Chat, "", pollVoteMsg) +// resp, err := cli.SendMessage(context.Background(), evt.Info.Chat, pollVoteMsg) // } func (cli *Client) BuildPollVote(pollInfo *types.MessageInfo, optionNames []string) (*waProto.Message, error) { pollUpdate, err := cli.EncryptPollVote(pollInfo, &waProto.PollVoteMessage{ @@ -220,7 +223,7 @@ func (cli *Client) BuildPollVote(pollInfo *types.MessageInfo, optionNames []stri // BuildPollCreation builds a poll creation message with the given poll name, options and maximum number of selections. // The built message can be sent normally using Client.SendMessage. // -// resp, err := cli.SendMessage(context.Background(), chat, "", cli.BuildPollCreation("meow?", []string{"yes", "no"}, 1)) +// resp, err := cli.SendMessage(context.Background(), chat, cli.BuildPollCreation("meow?", []string{"yes", "no"}, 1)) func (cli *Client) BuildPollCreation(name string, optionNames []string, selectableOptionCount int) *waProto.Message { msgSecret := make([]byte, 32) _, err := rand.Read(msgSecret) diff --git a/vendor/go.mau.fi/whatsmeow/notification.go b/vendor/go.mau.fi/whatsmeow/notification.go index c55764d1..567722b5 100644 --- a/vendor/go.mau.fi/whatsmeow/notification.go +++ b/vendor/go.mau.fi/whatsmeow/notification.go @@ -11,6 +11,7 @@ import ( "go.mau.fi/whatsmeow/appstate" waBinary "go.mau.fi/whatsmeow/binary" + "go.mau.fi/whatsmeow/store" "go.mau.fi/whatsmeow/types" "go.mau.fi/whatsmeow/types/events" ) @@ -135,7 +136,12 @@ func (cli *Client) handleDeviceNotification(node *waBinary.Node) { func (cli *Client) handleOwnDevicesNotification(node *waBinary.Node) { cli.userDevicesCacheLock.Lock() defer cli.userDevicesCacheLock.Unlock() - cached, ok := cli.userDevicesCache[cli.Store.ID.ToNonAD()] + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { + cli.Log.Debugf("Ignoring own device change notification, session was deleted") + return + } + cached, ok := cli.userDevicesCache[ownID] if !ok { cli.Log.Debugf("Ignoring own device change notification, device list not cached") return @@ -153,10 +159,10 @@ func (cli *Client) handleOwnDevicesNotification(node *waBinary.Node) { newHash := participantListHashV2(newDeviceList) if newHash != expectedNewHash { cli.Log.Debugf("Received own device list change notification %s -> %s, but expected hash was %s", oldHash, newHash, expectedNewHash) - delete(cli.userDevicesCache, cli.Store.ID.ToNonAD()) + delete(cli.userDevicesCache, ownID) } else { cli.Log.Debugf("Received own device list change notification %s -> %s", oldHash, newHash) - cli.userDevicesCache[cli.Store.ID.ToNonAD()] = newDeviceList + cli.userDevicesCache[ownID] = newDeviceList } } @@ -173,6 +179,52 @@ func (cli *Client) handleAccountSyncNotification(node *waBinary.Node) { } } +func (cli *Client) handlePrivacyTokenNotification(node *waBinary.Node) { + ownID := cli.getOwnID().ToNonAD() + if ownID.IsEmpty() { + cli.Log.Debugf("Ignoring privacy token notification, session was deleted") + return + } + tokens := node.GetChildByTag("tokens") + if tokens.Tag != "tokens" { + cli.Log.Warnf("privacy_token notification didn't contain tag") + return + } + parentAG := node.AttrGetter() + sender := parentAG.JID("from") + if !parentAG.OK() { + cli.Log.Warnf("privacy_token notification didn't have a sender (%v)", parentAG.Error()) + return + } + for _, child := range tokens.GetChildren() { + ag := child.AttrGetter() + if child.Tag != "token" { + cli.Log.Warnf("privacy_token notification contained unexpected <%s> tag", child.Tag) + } else if targetUser := ag.JID("jid"); targetUser != ownID { + cli.Log.Warnf("privacy_token notification contained token for different user %s", targetUser) + } else if tokenType := ag.String("type"); tokenType != "trusted_contact" { + cli.Log.Warnf("privacy_token notification contained unexpected token type %s", tokenType) + } else if token, ok := child.Content.([]byte); !ok { + cli.Log.Warnf("privacy_token notification contained non-binary token") + } else { + timestamp := ag.UnixTime("t") + if !ag.OK() { + cli.Log.Warnf("privacy_token notification is missing some fields: %v", ag.Error()) + } + err := cli.Store.PrivacyTokens.PutPrivacyTokens(store.PrivacyToken{ + User: sender, + Token: token, + Timestamp: timestamp, + }) + if err != nil { + cli.Log.Errorf("Failed to save privacy token from %s: %v", sender, err) + } else { + cli.Log.Debugf("Stored privacy token from %s (ts: %v)", sender, timestamp) + } + } + } +} + func (cli *Client) handleNotification(node *waBinary.Node) { ag := node.AttrGetter() notifType := ag.String("type") @@ -200,7 +252,9 @@ func (cli *Client) handleNotification(node *waBinary.Node) { go cli.handlePictureNotification(node) case "mediaretry": go cli.handleMediaRetryNotification(node) - // Other types: business, disappearing_mode, server, status, pay, psa, privacy_token + case "privacy_token": + go cli.handlePrivacyTokenNotification(node) + // Other types: business, disappearing_mode, server, status, pay, psa default: cli.Log.Debugf("Unhandled notification with type %s", notifType) } diff --git a/vendor/go.mau.fi/whatsmeow/pair.go b/vendor/go.mau.fi/whatsmeow/pair.go index 41dfa086..573b0387 100644 --- a/vendor/go.mau.fi/whatsmeow/pair.go +++ b/vendor/go.mau.fi/whatsmeow/pair.go @@ -13,11 +13,9 @@ import ( "encoding/base64" "fmt" "strings" - "time" - - "google.golang.org/protobuf/proto" "go.mau.fi/libsignal/ecc" + "google.golang.org/protobuf/proto" waBinary "go.mau.fi/whatsmeow/binary" waProto "go.mau.fi/whatsmeow/binary/proto" @@ -26,8 +24,6 @@ import ( "go.mau.fi/whatsmeow/util/keys" ) -const qrScanTimeout = 30 * time.Second - func (cli *Client) handleIQ(node *waBinary.Node) { children := node.GetChildren() if len(children) != 1 || node.Attrs["from"] != types.ServerJID { @@ -105,28 +101,28 @@ func (cli *Client) handlePair(deviceIdentityBytes []byte, reqID, businessName, p var deviceIdentityContainer waProto.ADVSignedDeviceIdentityHMAC err := proto.Unmarshal(deviceIdentityBytes, &deviceIdentityContainer) if err != nil { - cli.sendIQError(reqID, 500, "internal-error") - return fmt.Errorf("failed to parse device identity container in pair success message: %w", err) + cli.sendPairError(reqID, 500, "internal-error") + return &PairProtoError{"failed to parse device identity container in pair success message", err} } h := hmac.New(sha256.New, cli.Store.AdvSecretKey) h.Write(deviceIdentityContainer.Details) if !bytes.Equal(h.Sum(nil), deviceIdentityContainer.Hmac) { cli.Log.Warnf("Invalid HMAC from pair success message") - cli.sendIQError(reqID, 401, "not-authorized") - return fmt.Errorf("invalid device identity HMAC in pair success message") + cli.sendPairError(reqID, 401, "not-authorized") + return ErrPairInvalidDeviceIdentityHMAC } var deviceIdentity waProto.ADVSignedDeviceIdentity err = proto.Unmarshal(deviceIdentityContainer.Details, &deviceIdentity) if err != nil { - cli.sendIQError(reqID, 500, "internal-error") - return fmt.Errorf("failed to parse signed device identity in pair success message: %w", err) + cli.sendPairError(reqID, 500, "internal-error") + return &PairProtoError{"failed to parse signed device identity in pair success message", err} } if !verifyDeviceIdentityAccountSignature(&deviceIdentity, cli.Store.IdentityKey) { - cli.sendIQError(reqID, 401, "not-authorized") - return fmt.Errorf("invalid device signature in pair success message") + cli.sendPairError(reqID, 401, "not-authorized") + return ErrPairInvalidDeviceSignature } deviceIdentity.DeviceSignature = generateDeviceSignature(&deviceIdentity, cli.Store.IdentityKey)[:] @@ -134,8 +130,13 @@ func (cli *Client) handlePair(deviceIdentityBytes []byte, reqID, businessName, p var deviceIdentityDetails waProto.ADVDeviceIdentity err = proto.Unmarshal(deviceIdentity.Details, &deviceIdentityDetails) if err != nil { - cli.sendIQError(reqID, 500, "internal-error") - return fmt.Errorf("failed to parse device identity details in pair success message: %w", err) + cli.sendPairError(reqID, 500, "internal-error") + return &PairProtoError{"failed to parse device identity details in pair success message", err} + } + + if cli.PrePairCallback != nil && !cli.PrePairCallback(jid, platform, businessName) { + cli.sendPairError(reqID, 500, "internal-error") + return ErrPairRejectedLocally } cli.Store.Account = proto.Clone(&deviceIdentity).(*waProto.ADVSignedDeviceIdentity) @@ -147,8 +148,8 @@ func (cli *Client) handlePair(deviceIdentityBytes []byte, reqID, businessName, p selfSignedDeviceIdentity, err := proto.Marshal(&deviceIdentity) if err != nil { - cli.sendIQError(reqID, 500, "internal-error") - return fmt.Errorf("failed to marshal self-signed device identity: %w", err) + cli.sendPairError(reqID, 500, "internal-error") + return &PairProtoError{"failed to marshal self-signed device identity", err} } cli.Store.ID = &jid @@ -156,14 +157,14 @@ func (cli *Client) handlePair(deviceIdentityBytes []byte, reqID, businessName, p cli.Store.Platform = platform err = cli.Store.Save() if err != nil { - cli.sendIQError(reqID, 500, "internal-error") - return fmt.Errorf("failed to save device store: %w", err) + cli.sendPairError(reqID, 500, "internal-error") + return &PairDatabaseError{"failed to save device store", err} } err = cli.Store.Identities.PutIdentity(mainDeviceJID.SignalAddress().String(), mainDeviceIdentity) if err != nil { _ = cli.Store.Delete() - cli.sendIQError(reqID, 500, "internal-error") - return fmt.Errorf("failed to store main device identity: %w", err) + cli.sendPairError(reqID, 500, "internal-error") + return &PairDatabaseError{"failed to store main device identity", err} } // Expect a disconnect after this and don't dispatch the usual Disconnected event @@ -225,8 +226,8 @@ func generateDeviceSignature(deviceIdentity *waProto.ADVSignedDeviceIdentity, ik return &sig } -func (cli *Client) sendIQError(id string, code int, text string) waBinary.Node { - return waBinary.Node{ +func (cli *Client) sendPairError(id string, code int, text string) { + err := cli.sendNode(waBinary.Node{ Tag: "iq", Attrs: waBinary.Attrs{ "to": types.ServerJID, @@ -240,5 +241,8 @@ func (cli *Client) sendIQError(id string, code int, text string) waBinary.Node { "text": text, }, }}, + }) + if err != nil { + cli.Log.Errorf("Failed to send pair error node: %v", err) } } diff --git a/vendor/go.mau.fi/whatsmeow/presence.go b/vendor/go.mau.fi/whatsmeow/presence.go index bc26c21c..0ce94a70 100644 --- a/vendor/go.mau.fi/whatsmeow/presence.go +++ b/vendor/go.mau.fi/whatsmeow/presence.go @@ -7,6 +7,7 @@ package whatsmeow import ( + "fmt" "sync/atomic" waBinary "go.mau.fi/whatsmeow/binary" @@ -87,19 +88,40 @@ func (cli *Client) SendPresence(state types.Presence) error { // // cli.SendPresence(types.PresenceAvailable) func (cli *Client) SubscribePresence(jid types.JID) error { - return cli.sendNode(waBinary.Node{ + privacyToken, err := cli.Store.PrivacyTokens.GetPrivacyToken(jid) + if err != nil { + return fmt.Errorf("failed to get privacy token: %w", err) + } else if privacyToken == nil { + if cli.ErrorOnSubscribePresenceWithoutToken { + return fmt.Errorf("%w for %v", ErrNoPrivacyToken, jid.ToNonAD()) + } else { + cli.Log.Debugf("Trying to subscribe to presence of %s without privacy token", jid) + } + } + req := waBinary.Node{ Tag: "presence", Attrs: waBinary.Attrs{ "type": "subscribe", "to": jid, }, - }) + } + if privacyToken != nil { + req.Content = []waBinary.Node{{ + Tag: "tctoken", + Content: privacyToken.Token, + }} + } + return cli.sendNode(req) } // SendChatPresence updates the user's typing status in a specific chat. // // The media parameter can be set to indicate the user is recording media (like a voice message) rather than typing a text message. func (cli *Client) SendChatPresence(jid types.JID, state types.ChatPresence, media types.ChatPresenceMedia) error { + ownID := cli.getOwnID() + if ownID.IsEmpty() { + return ErrNotLoggedIn + } content := []waBinary.Node{{Tag: string(state)}} if state == types.ChatPresenceComposing && len(media) > 0 { content[0].Attrs = waBinary.Attrs{ @@ -109,7 +131,7 @@ func (cli *Client) SendChatPresence(jid types.JID, state types.ChatPresence, med return cli.sendNode(waBinary.Node{ Tag: "chatstate", Attrs: waBinary.Attrs{ - "from": *cli.Store.ID, + "from": ownID, "to": jid, }, Content: content, diff --git a/vendor/go.mau.fi/whatsmeow/qrchan.go b/vendor/go.mau.fi/whatsmeow/qrchan.go index 0aea93c9..5401ac0e 100644 --- a/vendor/go.mau.fi/whatsmeow/qrchan.go +++ b/vendor/go.mau.fi/whatsmeow/qrchan.go @@ -17,7 +17,7 @@ import ( ) type QRChannelItem struct { - // The type of event, "code" for new QR codes. + // The type of event, "code" for new QR codes (see Code field) and "error" for pairing errors (see Error) field. // For non-code/error events, you can just compare the whole item to the event variables (like QRChannelSuccess). Event string // If the item is a pair error, then this field contains the error message. @@ -28,6 +28,11 @@ type QRChannelItem struct { Timeout time.Duration } +const QRChannelEventCode = "code" +const QRChannelEventError = "error" + +// Possible final items in the QR channel. In addition to these, an `error` event may be emitted, +// in which case the Error field will have the error that occurred during pairing. var ( // QRChannelSuccess is emitted from GetQRChannel when the pairing is successful. QRChannelSuccess = QRChannelItem{Event: "success"} @@ -78,7 +83,7 @@ func (qrc *qrChannel) emitQRs(evt *events.QR) { nextCode, evt.Codes = evt.Codes[0], evt.Codes[1:] qrc.log.Debugf("Emitting QR code %s", nextCode) select { - case qrc.output <- QRChannelItem{Code: nextCode, Timeout: timeout, Event: "code"}: + case qrc.output <- QRChannelItem{Code: nextCode, Timeout: timeout, Event: QRChannelEventCode}: default: qrc.log.Debugf("Output channel didn't accept code, exiting QR emitter") if atomic.CompareAndSwapUint32(&qrc.closed, 0, 1) { @@ -125,7 +130,7 @@ func (qrc *qrChannel) handleEvent(rawEvt interface{}) { outputType = QRChannelSuccess case *events.PairError: outputType = QRChannelItem{ - Event: "error", + Event: QRChannelEventError, Error: evt.Error, } case *events.Disconnected: @@ -151,7 +156,7 @@ func (qrc *qrChannel) handleEvent(rawEvt interface{}) { // // This must be called *before* Connect(). It will then listen to all the relevant events from the client. // -// The last value to be emitted will be a special string, either "success", "timeout" or "err-already-have-id", +// The last value to be emitted will be a special event like "success", "timeout" or another error code // depending on the result of the pairing. The channel will be closed immediately after one of those. func (cli *Client) GetQRChannel(ctx context.Context) (<-chan QRChannelItem, error) { if cli.IsConnected() { diff --git a/vendor/go.mau.fi/whatsmeow/retry.go b/vendor/go.mau.fi/whatsmeow/retry.go index 26940b13..95104c8f 100644 --- a/vendor/go.mau.fi/whatsmeow/retry.go +++ b/vendor/go.mau.fi/whatsmeow/retry.go @@ -111,10 +111,14 @@ func (cli *Client) handleRetryReceipt(receipt *events.Receipt, node *waBinary.No if err != nil { return err } + ownID := cli.getOwnID() + if ownID.IsEmpty() { + return ErrNotLoggedIn + } if receipt.IsGroup { builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer) - senderKeyName := protocol.NewSenderKeyName(receipt.Chat.String(), cli.Store.ID.SignalAddress()) + senderKeyName := protocol.NewSenderKeyName(receipt.Chat.String(), ownID.SignalAddress()) signalSKDMessage, err := builder.Create(senderKeyName) if err != nil { cli.Log.Warnf("Failed to create sender key distribution message to include in retry of %s in %s to %s: %v", messageID, receipt.Chat, receipt.Sender, err) diff --git a/vendor/go.mau.fi/whatsmeow/send.go b/vendor/go.mau.fi/whatsmeow/send.go index ab754f8f..96d888be 100644 --- a/vendor/go.mau.fi/whatsmeow/send.go +++ b/vendor/go.mau.fi/whatsmeow/send.go @@ -35,7 +35,7 @@ import ( // GenerateMessageID generates a random string that can be used as a message ID on WhatsApp. // // msgID := whatsmeow.GenerateMessageID() -// cli.SendMessage(context.Background(), targetJID, msgID, &waProto.Message{...}) +// cli.SendMessage(context.Background(), targetJID, &waProto.Message{...}, whatsmeow.SendRequestExtra{ID: msgID}) func GenerateMessageID() types.MessageID { id := make([]byte, 8) _, err := rand.Read(id) @@ -71,17 +71,36 @@ type SendResponse struct { DebugTimings MessageDebugTimings } -// SendMessage sends the given message. +// SendRequestExtra contains the optional parameters for SendMessage. // -// If the message ID is not provided, a random message ID will be generated. +// By default, optional parameters don't have to be provided at all, e.g. +// +// cli.SendMessage(ctx, to, message) +// +// When providing optional parameters, add a single instance of this struct as the last parameter: +// +// cli.SendMessage(ctx, to, message, whatsmeow.SendRequestExtra{...}) +// +// Trying to add multiple extra parameters will return an error. +type SendRequestExtra struct { + // The message ID to use when sending. If this is not provided, a random message ID will be generated + ID types.MessageID + // Should the message be sent as a peer message (protocol messages to your own devices, e.g. app state key requests) + Peer bool +} + +// SendMessage sends the given message. // // This method will wait for the server to acknowledge the message before returning. // The return value is the timestamp of the message from the server. // +// Optional parameters like the message ID can be specified with the SendRequestExtra struct. +// Only one extra parameter is allowed, put all necessary parameters in the same struct. +// // The message itself can contain anything you want (within the protobuf schema). // e.g. for a simple text message, use the Conversation field: // -// cli.SendMessage(context.Background(), targetJID, "", &waProto.Message{ +// cli.SendMessage(context.Background(), targetJID, &waProto.Message{ // Conversation: proto.String("Hello, World!"), // }) // @@ -91,18 +110,31 @@ type SendResponse struct { // For uploading and sending media/attachments, see the Upload method. // // For other message types, you'll have to figure it out yourself. Looking at the protobuf schema -// in binary/proto/def.proto may be useful to find out all the allowed fields. -func (cli *Client) SendMessage(ctx context.Context, to types.JID, id types.MessageID, message *waProto.Message) (resp SendResponse, err error) { - isPeerMessage := to.User == cli.Store.ID.User - if to.AD && !isPeerMessage { +// in binary/proto/def.proto may be useful to find out all the allowed fields. Printing the RawMessage +// field in incoming message events to figure out what it contains is also a good way to learn how to +// send the same kind of message. +func (cli *Client) SendMessage(ctx context.Context, to types.JID, message *waProto.Message, extra ...SendRequestExtra) (resp SendResponse, err error) { + var req SendRequestExtra + if len(extra) > 1 { + err = errors.New("only one extra parameter may be provided to SendMessage") + return + } else if len(extra) == 1 { + req = extra[0] + } + if to.AD && !req.Peer { err = ErrRecipientADJID return } - - if len(id) == 0 { - id = GenerateMessageID() + ownID := cli.getOwnID() + if ownID.IsEmpty() { + err = ErrNotLoggedIn + return } - resp.ID = id + + if len(req.ID) == 0 { + req.ID = GenerateMessageID() + } + resp.ID = req.ID start := time.Now() // Sending multiple messages at a time can cause weird issues and makes it harder to retry safely @@ -110,36 +142,36 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, id types.Messa resp.DebugTimings.Queue = time.Since(start) defer cli.messageSendLock.Unlock() - respChan := cli.waitResponse(id) + respChan := cli.waitResponse(req.ID) // Peer message retries aren't implemented yet - if !isPeerMessage { - cli.addRecentMessage(to, id, message) + if !req.Peer { + cli.addRecentMessage(to, req.ID, message) } if message.GetMessageContextInfo().GetMessageSecret() != nil { - err = cli.Store.MsgSecrets.PutMessageSecret(to, *cli.Store.ID, id, message.GetMessageContextInfo().GetMessageSecret()) + err = cli.Store.MsgSecrets.PutMessageSecret(to, ownID, req.ID, message.GetMessageContextInfo().GetMessageSecret()) if err != nil { - cli.Log.Warnf("Failed to store message secret key for outgoing message %s: %v", id, err) + cli.Log.Warnf("Failed to store message secret key for outgoing message %s: %v", req.ID, err) } else { - cli.Log.Debugf("Stored message secret key for outgoing message %s", id) + cli.Log.Debugf("Stored message secret key for outgoing message %s", req.ID) } } var phash string var data []byte switch to.Server { case types.GroupServer, types.BroadcastServer: - phash, data, err = cli.sendGroup(ctx, to, id, message, &resp.DebugTimings) + phash, data, err = cli.sendGroup(ctx, to, ownID, req.ID, message, &resp.DebugTimings) case types.DefaultUserServer: - if isPeerMessage { - data, err = cli.sendPeerMessage(to, id, message, &resp.DebugTimings) + if req.Peer { + data, err = cli.sendPeerMessage(to, req.ID, message, &resp.DebugTimings) } else { - data, err = cli.sendDM(ctx, to, id, message, &resp.DebugTimings) + data, err = cli.sendDM(ctx, to, ownID, req.ID, message, &resp.DebugTimings) } default: err = fmt.Errorf("%w %s", ErrUnknownServer, to.Server) } start = time.Now() if err != nil { - cli.cancelResponse(id, respChan) + cli.cancelResponse(req.ID, respChan) return } var respNode *waBinary.Node @@ -152,7 +184,7 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, id types.Messa resp.DebugTimings.Resp = time.Since(start) if isDisconnectNode(respNode) { start = time.Now() - respNode, err = cli.retryFrame("message send", id, data, respNode, ctx, 0) + respNode, err = cli.retryFrame("message send", req.ID, data, respNode, ctx, 0) resp.DebugTimings.Retry = time.Since(start) if err != nil { return @@ -160,6 +192,9 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, id types.Messa } ag := respNode.AttrGetter() resp.Timestamp = ag.UnixTime("t") + if errorCode := ag.Int("error"); errorCode != 0 { + err = fmt.Errorf("%w %d", ErrServerReturnedError, errorCode) + } expectedPHash := ag.OptionalString("phash") if len(expectedPHash) > 0 && phash != expectedPHash { cli.Log.Warnf("Server returned different participant list hash when sending to %s. Some devices may not have received the message.", to) @@ -178,7 +213,7 @@ func (cli *Client) SendMessage(ctx context.Context, to types.JID, id types.Messa // // Deprecated: This method is deprecated in favor of BuildRevoke func (cli *Client) RevokeMessage(chat types.JID, id types.MessageID) (SendResponse, error) { - return cli.SendMessage(context.TODO(), chat, "", cli.BuildRevoke(chat, types.EmptyJID, id)) + return cli.SendMessage(context.TODO(), chat, cli.BuildRevoke(chat, types.EmptyJID, id)) } // BuildRevoke builds a message revocation message using the given variables. @@ -186,18 +221,18 @@ func (cli *Client) RevokeMessage(chat types.JID, id types.MessageID) (SendRespon // // To revoke your own messages, pass your JID or an empty JID as the second parameter (sender). // -// resp, err := cli.SendMessage(context.Background(), chat, "", cli.BuildRevoke(chat, types.EmptyJID, originalMessageID) +// resp, err := cli.SendMessage(context.Background(), chat, cli.BuildRevoke(chat, types.EmptyJID, originalMessageID) // // To revoke someone else's messages when you are group admin, pass the message sender's JID as the second parameter. // -// resp, err := cli.SendMessage(context.Background(), chat, "", cli.BuildRevoke(chat, senderJID, originalMessageID) +// resp, err := cli.SendMessage(context.Background(), chat, cli.BuildRevoke(chat, senderJID, originalMessageID) func (cli *Client) BuildRevoke(chat, sender types.JID, id types.MessageID) *waProto.Message { key := &waProto.MessageKey{ FromMe: proto.Bool(true), Id: proto.String(id), RemoteJid: proto.String(chat.String()), } - if !sender.IsEmpty() && sender.User != cli.Store.ID.User { + if !sender.IsEmpty() && sender.User != cli.getOwnID().User { key.FromMe = proto.Bool(false) if chat.Server != types.DefaultUserServer { key.Participant = proto.String(sender.ToNonAD().String()) @@ -214,7 +249,7 @@ func (cli *Client) BuildRevoke(chat, sender types.JID, id types.MessageID) *waPr // BuildEdit builds a message edit message using the given variables. // The built message can be sent normally using Client.SendMessage. // -// resp, err := cli.SendMessage(context.Background(), chat, "", cli.BuildEdit(chat, originalMessageID, &waProto.Message{ +// resp, err := cli.SendMessage(context.Background(), chat, cli.BuildEdit(chat, originalMessageID, &waProto.Message{ // Conversation: proto.String("edited message"), // }) func (cli *Client) BuildEdit(chat types.JID, id types.MessageID, newContent *waProto.Message) *waProto.Message { @@ -270,7 +305,7 @@ func ParseDisappearingTimerString(val string) (time.Duration, bool) { func (cli *Client) SetDisappearingTimer(chat types.JID, timer time.Duration) (err error) { switch chat.Server { case types.DefaultUserServer: - _, err = cli.SendMessage(context.TODO(), chat, "", &waProto.Message{ + _, err = cli.SendMessage(context.TODO(), chat, &waProto.Message{ ProtocolMessage: &waProto.ProtocolMessage{ Type: waProto.ProtocolMessage_EPHEMERAL_SETTING.Enum(), EphemeralExpiration: proto.Uint32(uint32(timer.Seconds())), @@ -307,7 +342,7 @@ func participantListHashV2(participants []types.JID) string { return fmt.Sprintf("2:%s", base64.RawStdEncoding.EncodeToString(hash[:6])) } -func (cli *Client) sendGroup(ctx context.Context, to types.JID, id types.MessageID, message *waProto.Message, timings *MessageDebugTimings) (string, []byte, error) { +func (cli *Client) sendGroup(ctx context.Context, to, ownID types.JID, id types.MessageID, message *waProto.Message, timings *MessageDebugTimings) (string, []byte, error) { var participants []types.JID var err error start := time.Now() @@ -333,7 +368,7 @@ func (cli *Client) sendGroup(ctx context.Context, to types.JID, id types.Message start = time.Now() builder := groups.NewGroupSessionBuilder(cli.Store, pbSerializer) - senderKeyName := protocol.NewSenderKeyName(to.String(), cli.Store.ID.SignalAddress()) + senderKeyName := protocol.NewSenderKeyName(to.String(), ownID.SignalAddress()) signalSKDMessage, err := builder.Create(senderKeyName) if err != nil { return "", nil, fmt.Errorf("failed to create sender key distribution message to send %s to %s: %w", id, to, err) @@ -357,7 +392,7 @@ func (cli *Client) sendGroup(ctx context.Context, to types.JID, id types.Message ciphertext := encrypted.SignedSerialize() timings.GroupEncrypt = time.Since(start) - node, allDevices, err := cli.prepareMessageNode(ctx, to, id, message, participants, skdPlaintext, nil, timings) + node, allDevices, err := cli.prepareMessageNode(ctx, to, ownID, id, message, participants, skdPlaintext, nil, timings) if err != nil { return "", nil, err } @@ -393,7 +428,7 @@ func (cli *Client) sendPeerMessage(to types.JID, id types.MessageID, message *wa return data, nil } -func (cli *Client) sendDM(ctx context.Context, to types.JID, id types.MessageID, message *waProto.Message, timings *MessageDebugTimings) ([]byte, error) { +func (cli *Client) sendDM(ctx context.Context, to, ownID types.JID, id types.MessageID, message *waProto.Message, timings *MessageDebugTimings) ([]byte, error) { start := time.Now() messagePlaintext, deviceSentMessagePlaintext, err := marshalMessage(to, message) timings.Marshal = time.Since(start) @@ -401,7 +436,7 @@ func (cli *Client) sendDM(ctx context.Context, to types.JID, id types.MessageID, return nil, err } - node, _, err := cli.prepareMessageNode(ctx, to, id, message, []types.JID{to, cli.Store.ID.ToNonAD()}, messagePlaintext, deviceSentMessagePlaintext, timings) + node, _, err := cli.prepareMessageNode(ctx, to, ownID, id, message, []types.JID{to, ownID.ToNonAD()}, messagePlaintext, deviceSentMessagePlaintext, timings) if err != nil { return nil, err } @@ -504,7 +539,7 @@ func (cli *Client) preparePeerMessageNode(to types.JID, id types.MessageID, mess }, nil } -func (cli *Client) prepareMessageNode(ctx context.Context, to types.JID, id types.MessageID, message *waProto.Message, participants []types.JID, plaintext, dsmPlaintext []byte, timings *MessageDebugTimings) (*waBinary.Node, []types.JID, error) { +func (cli *Client) prepareMessageNode(ctx context.Context, to, ownID types.JID, id types.MessageID, message *waProto.Message, participants []types.JID, plaintext, dsmPlaintext []byte, timings *MessageDebugTimings) (*waBinary.Node, []types.JID, error) { start := time.Now() allDevices, err := cli.GetUserDevicesContext(ctx, participants) timings.GetDevices = time.Since(start) @@ -522,7 +557,7 @@ func (cli *Client) prepareMessageNode(ctx context.Context, to types.JID, id type } start = time.Now() - participantNodes, includeIdentity := cli.encryptMessageForDevices(ctx, allDevices, id, plaintext, dsmPlaintext) + participantNodes, includeIdentity := cli.encryptMessageForDevices(ctx, allDevices, ownID, id, plaintext, dsmPlaintext) timings.PeerEncrypt = time.Since(start) content := []waBinary.Node{{ Tag: "participants", @@ -584,14 +619,14 @@ func (cli *Client) makeDeviceIdentityNode() waBinary.Node { } } -func (cli *Client) encryptMessageForDevices(ctx context.Context, allDevices []types.JID, id string, msgPlaintext, dsmPlaintext []byte) ([]waBinary.Node, bool) { +func (cli *Client) encryptMessageForDevices(ctx context.Context, allDevices []types.JID, ownID types.JID, id string, msgPlaintext, dsmPlaintext []byte) ([]waBinary.Node, bool) { includeIdentity := false participantNodes := make([]waBinary.Node, 0, len(allDevices)) var retryDevices []types.JID for _, jid := range allDevices { plaintext := msgPlaintext - if jid.User == cli.Store.ID.User && dsmPlaintext != nil { - if jid == *cli.Store.ID { + if jid.User == ownID.User && dsmPlaintext != nil { + if jid == ownID { continue } plaintext = dsmPlaintext @@ -621,7 +656,7 @@ func (cli *Client) encryptMessageForDevices(ctx context.Context, allDevices []ty continue } plaintext := msgPlaintext - if jid.User == cli.Store.ID.User && dsmPlaintext != nil { + if jid.User == ownID.User && dsmPlaintext != nil { plaintext = dsmPlaintext } encrypted, isPreKey, err := cli.encryptMessageForDeviceAndWrap(plaintext, jid, resp.bundle) diff --git a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go index 6c683eed..08a3d280 100644 --- a/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +++ b/vendor/go.mau.fi/whatsmeow/store/clientpayload.go @@ -74,7 +74,7 @@ func (vc WAVersionContainer) ProtoAppVersion() *waProto.ClientPayload_UserAgent_ } // waVersion is the WhatsApp web client version -var waVersion = WAVersionContainer{2, 2245, 9} +var waVersion = WAVersionContainer{2, 2301, 6} // waVersionHash is the md5 hash of a dot-separated waVersion var waVersionHash [16]byte diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go index 136eda35..7f8c6c8f 100644 --- a/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go @@ -126,6 +126,7 @@ func (c *Container) scanDevice(row scannable) (*store.Device, error) { device.Contacts = innerStore device.ChatSettings = innerStore device.MsgSecrets = innerStore + device.PrivacyTokens = innerStore device.Container = c device.Initialized = true @@ -240,6 +241,7 @@ func (c *Container) PutDevice(device *store.Device) error { device.Contacts = innerStore device.ChatSettings = innerStore device.MsgSecrets = innerStore + device.PrivacyTokens = innerStore device.Initialized = true } return err diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go index 1261bec0..8221a4ad 100644 --- a/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go @@ -706,7 +706,7 @@ func (s *SQLStore) PutMessageSecrets(inserts []store.MessageSecretInsert) (err e return fmt.Errorf("failed to begin transaction: %w", err) } for _, insert := range inserts { - _, err = s.db.Exec(putMsgSecret, s.JID, insert.Chat.ToNonAD(), insert.Sender.ToNonAD(), insert.ID, insert.Secret) + _, err = tx.Exec(putMsgSecret, s.JID, insert.Chat.ToNonAD(), insert.Sender.ToNonAD(), insert.ID, insert.Secret) } err = tx.Commit() if err != nil { @@ -727,3 +727,42 @@ func (s *SQLStore) GetMessageSecret(chat, sender types.JID, id types.MessageID) } return } + +const ( + putPrivacyTokens = ` + INSERT INTO whatsmeow_privacy_tokens (our_jid, their_jid, token, timestamp) + VALUES ($1, $2, $3, $4) + ON CONFLICT (our_jid, their_jid) DO UPDATE SET token=EXCLUDED.token, timestamp=EXCLUDED.timestamp + ` + getPrivacyToken = `SELECT token, timestamp FROM whatsmeow_privacy_tokens WHERE our_jid=$1 AND their_jid=$2` +) + +func (s *SQLStore) PutPrivacyTokens(tokens ...store.PrivacyToken) error { + args := make([]any, 1+len(tokens)*3) + placeholders := make([]string, len(tokens)) + args[0] = s.JID + for i, token := range tokens { + args[i*3+1] = token.User.ToNonAD().String() + args[i*3+2] = token.Token + args[i*3+3] = token.Timestamp.Unix() + placeholders[i] = fmt.Sprintf("($1, $%d, $%d, $%d)", i*3+2, i*3+3, i*3+4) + } + query := strings.ReplaceAll(putPrivacyTokens, "($1, $2, $3, $4)", strings.Join(placeholders, ",")) + _, err := s.db.Exec(query, args...) + return err +} + +func (s *SQLStore) GetPrivacyToken(user types.JID) (*store.PrivacyToken, error) { + var token store.PrivacyToken + token.User = user.ToNonAD() + var ts int64 + err := s.db.QueryRow(getPrivacyToken, s.JID, token.User).Scan(&token.Token, &ts) + if errors.Is(err, sql.ErrNoRows) { + return nil, nil + } else if err != nil { + return nil, err + } else { + token.Timestamp = time.Unix(ts, 0) + return &token, nil + } +} diff --git a/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go b/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go index 70556ec3..0919ca89 100644 --- a/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +++ b/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go @@ -16,7 +16,7 @@ type upgradeFunc func(*sql.Tx, *Container) error // // This may be of use if you want to manage the database fully manually, but in most cases you // should just call Container.Upgrade to let the library handle everything. -var Upgrades = [...]upgradeFunc{upgradeV1, upgradeV2, upgradeV3} +var Upgrades = [...]upgradeFunc{upgradeV1, upgradeV2, upgradeV3, upgradeV4} func (c *Container) getVersion() (int, error) { _, err := c.db.Exec("CREATE TABLE IF NOT EXISTS whatsmeow_version (version INTEGER)") @@ -260,3 +260,14 @@ func upgradeV3(tx *sql.Tx, container *Container) error { )`) return err } + +func upgradeV4(tx *sql.Tx, container *Container) error { + _, err := tx.Exec(`CREATE TABLE whatsmeow_privacy_tokens ( + our_jid TEXT, + their_jid TEXT, + token bytea NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY (our_jid, their_jid) + )`) + return err +} diff --git a/vendor/go.mau.fi/whatsmeow/store/store.go b/vendor/go.mau.fi/whatsmeow/store/store.go index b26a28b8..36a6dce9 100644 --- a/vendor/go.mau.fi/whatsmeow/store/store.go +++ b/vendor/go.mau.fi/whatsmeow/store/store.go @@ -112,6 +112,17 @@ type MsgSecretStore interface { GetMessageSecret(chat, sender types.JID, id types.MessageID) ([]byte, error) } +type PrivacyToken struct { + User types.JID + Token []byte + Timestamp time.Time +} + +type PrivacyTokenStore interface { + PutPrivacyTokens(tokens ...PrivacyToken) error + GetPrivacyToken(user types.JID) (*PrivacyToken, error) +} + type Device struct { Log waLog.Logger @@ -127,17 +138,18 @@ type Device struct { BusinessName string PushName string - Initialized bool - Identities IdentityStore - Sessions SessionStore - PreKeys PreKeyStore - SenderKeys SenderKeyStore - AppStateKeys AppStateSyncKeyStore - AppState AppStateStore - Contacts ContactStore - ChatSettings ChatSettingsStore - MsgSecrets MsgSecretStore - Container DeviceContainer + Initialized bool + Identities IdentityStore + Sessions SessionStore + PreKeys PreKeyStore + SenderKeys SenderKeyStore + AppStateKeys AppStateSyncKeyStore + AppState AppStateStore + Contacts ContactStore + ChatSettings ChatSettingsStore + MsgSecrets MsgSecretStore + PrivacyTokens PrivacyTokenStore + Container DeviceContainer DatabaseErrorHandler func(device *Device, action string, attemptIndex int, err error) (retry bool) } diff --git a/vendor/go.mau.fi/whatsmeow/types/events/events.go b/vendor/go.mau.fi/whatsmeow/types/events/events.go index 48766575..dc8e0ada 100644 --- a/vendor/go.mau.fi/whatsmeow/types/events/events.go +++ b/vendor/go.mau.fi/whatsmeow/types/events/events.go @@ -92,16 +92,16 @@ type StreamReplaced struct{} type TempBanReason int const ( - TempBanBlockedByUsers TempBanReason = 101 - TempBanSentToTooManyPeople TempBanReason = 102 + TempBanSentToTooManyPeople TempBanReason = 101 + TempBanBlockedByUsers TempBanReason = 102 TempBanCreatedTooManyGroups TempBanReason = 103 TempBanSentTooManySameMessage TempBanReason = 104 TempBanBroadcastList TempBanReason = 106 ) var tempBanReasonMessage = map[TempBanReason]string{ - TempBanBlockedByUsers: "too many people blocked you", TempBanSentToTooManyPeople: "you sent too many messages to people who don't have you in their address books", + TempBanBlockedByUsers: "too many people blocked you", TempBanCreatedTooManyGroups: "you created too many groups with people who don't have you in their address books", TempBanSentTooManySameMessage: "you sent the same message to too many people", TempBanBroadcastList: "you sent too many messages to a broadcast list", @@ -119,14 +119,14 @@ func (tbr TempBanReason) String() string { // TemporaryBan is emitted when there's a connection failure with the ConnectFailureTempBanned reason code. type TemporaryBan struct { Code TempBanReason - Expire time.Time + Expire time.Duration } func (tb *TemporaryBan) String() string { - if tb.Expire.IsZero() { + if tb.Expire == 0 { return fmt.Sprintf("You've been temporarily banned: %v", tb.Code) } - return fmt.Sprintf("You've been temporarily banned: %v. The ban expires at %v", tb.Code, tb.Expire) + return fmt.Sprintf("You've been temporarily banned: %v. The ban expires in %v", tb.Code, tb.Expire) } // ConnectFailureReason is an error code included in connection failure events. @@ -352,6 +352,11 @@ type GroupInfo struct { Announce *types.GroupAnnounce // Group announce status change (can only admins send messages?) Ephemeral *types.GroupEphemeral // Disappearing messages change + Delete *types.GroupDelete + + Link *types.GroupLinkChange + Unlink *types.GroupLinkChange + NewInviteLink *string // Group invite link change PrevParticipantVersionID string diff --git a/vendor/go.mau.fi/whatsmeow/types/group.go b/vendor/go.mau.fi/whatsmeow/types/group.go index 5c635f8e..eaf21ce0 100644 --- a/vendor/go.mau.fi/whatsmeow/types/group.go +++ b/vendor/go.mau.fi/whatsmeow/types/group.go @@ -27,6 +27,10 @@ type GroupInfo struct { GroupAnnounce GroupEphemeral + GroupParent + GroupLinkedParent + GroupIsDefaultSub + GroupCreated time.Time ParticipantVersionID string @@ -35,6 +39,19 @@ type GroupInfo struct { MemberAddMode GroupMemberAddMode } +type GroupParent struct { + IsParent bool + DefaultMembershipApprovalMode string // request_required +} + +type GroupLinkedParent struct { + LinkedParentJID JID +} + +type GroupIsDefaultSub struct { + IsDefaultSubGroup bool +} + // GroupName contains the name of a group along with metadata of who set it and when. type GroupName struct { Name string @@ -67,6 +84,16 @@ type GroupParticipant struct { JID JID IsAdmin bool IsSuperAdmin bool + + // When creating groups, adding some participants may fail. + // In such cases, the error code will be here. + Error int + AddRequest *GroupParticipantAddRequest +} + +type GroupParticipantAddRequest struct { + Code string + Expiration time.Time } // GroupEphemeral contains the group's disappearing messages settings. @@ -74,3 +101,35 @@ type GroupEphemeral struct { IsEphemeral bool DisappearingTimer uint32 } + +type GroupDelete struct { + Deleted bool + DeleteReason string +} + +type GroupLinkChangeType string + +const ( + GroupLinkChangeTypeParent GroupLinkChangeType = "parent_group" + GroupLinkChangeTypeSub GroupLinkChangeType = "sub_group" + GroupLinkChangeTypeSibling GroupLinkChangeType = "sibling_group" +) + +type GroupUnlinkReason string + +const ( + GroupUnlinkReasonDefault GroupUnlinkReason = "unlink_group" + GroupUnlinkReasonDelete GroupUnlinkReason = "delete_parent" +) + +type GroupLinkTarget struct { + JID JID + GroupName + GroupIsDefaultSub +} + +type GroupLinkChange struct { + Type GroupLinkChangeType + UnlinkReason GroupUnlinkReason + Group GroupLinkTarget +} diff --git a/vendor/go.mau.fi/whatsmeow/upload.go b/vendor/go.mau.fi/whatsmeow/upload.go index 4556077e..c72025f0 100644 --- a/vendor/go.mau.fi/whatsmeow/upload.go +++ b/vendor/go.mau.fi/whatsmeow/upload.go @@ -54,7 +54,7 @@ type UploadResponse struct { // FileSha256: resp.FileSha256, // FileLength: &resp.FileLength, // } -// _, err = cli.SendMessage(context.Background(), targetJID, "", &waProto.Message{ +// _, err = cli.SendMessage(context.Background(), targetJID, &waProto.Message{ // ImageMessage: imageMsg, // }) // // handle error again diff --git a/vendor/go.mau.fi/whatsmeow/user.go b/vendor/go.mau.fi/whatsmeow/user.go index fe7b0971..dae86406 100644 --- a/vendor/go.mau.fi/whatsmeow/user.go +++ b/vendor/go.mau.fi/whatsmeow/user.go @@ -270,29 +270,53 @@ func (cli *Client) GetUserDevicesContext(ctx context.Context, jids []types.JID) return devices, nil } +type GetProfilePictureParams struct { + Preview bool + ExistingID string + IsCommunity bool +} + // GetProfilePictureInfo gets the URL where you can download a WhatsApp user's profile picture or group's photo. // // Optionally, you can pass the last known profile picture ID. // If the profile picture hasn't changed, this will return nil with no error. -func (cli *Client) GetProfilePictureInfo(jid types.JID, preview bool, existingID string) (*types.ProfilePictureInfo, error) { +// +// To get a community photo, you should pass `IsCommunity: true`, as otherwise you may get a 401 error. +func (cli *Client) GetProfilePictureInfo(jid types.JID, params *GetProfilePictureParams) (*types.ProfilePictureInfo, error) { attrs := waBinary.Attrs{ "query": "url", } - if preview { + if params == nil { + params = &GetProfilePictureParams{} + } + if params.Preview { attrs["type"] = "preview" } else { attrs["type"] = "image" } - if existingID != "" { - attrs["id"] = existingID + if params.ExistingID != "" { + attrs["id"] = params.ExistingID + } + var pictureContent []waBinary.Node + namespace := "w:profile:picture" + if params.IsCommunity { + namespace = "w:g2" + pictureContent = []waBinary.Node{{ + Tag: "query_linked", + Attrs: waBinary.Attrs{ + "type": "parent_group", + "jid": jid, + }, + }} } resp, err := cli.sendIQ(infoQuery{ - Namespace: "w:profile:picture", + Namespace: namespace, Type: "get", To: jid, Content: []waBinary.Node{{ - Tag: "picture", - Attrs: attrs, + Tag: "picture", + Attrs: attrs, + Content: pictureContent, }}, }) if errors.Is(err, ErrIQNotAuthorized) { @@ -304,7 +328,7 @@ func (cli *Client) GetProfilePictureInfo(jid types.JID, preview bool, existingID } picture, ok := resp.GetOptionalChildByTag("picture") if !ok { - if existingID != "" { + if params.ExistingID != "" { return nil, nil } return nil, &ElementMissingError{Tag: "picture", In: "response to profile picture query"} diff --git a/vendor/go.uber.org/multierr/CHANGELOG.md b/vendor/go.uber.org/multierr/CHANGELOG.md index b0814e7c..3ba05276 100644 --- a/vendor/go.uber.org/multierr/CHANGELOG.md +++ b/vendor/go.uber.org/multierr/CHANGELOG.md @@ -1,6 +1,12 @@ Releases ======== +v1.8.0 (2022-02-28) +=================== + +- `Combine`: perform zero allocations when there are no errors. + + v1.7.0 (2021-05-06) =================== diff --git a/vendor/go.uber.org/multierr/error.go b/vendor/go.uber.org/multierr/error.go index faa0a059..f45af149 100644 --- a/vendor/go.uber.org/multierr/error.go +++ b/vendor/go.uber.org/multierr/error.go @@ -103,7 +103,7 @@ // if err != nil { // return err // } -// defer multierr.AppendInvoke(err, multierr.Close(conn)) +// defer multierr.AppendInvoke(&err, multierr.Close(conn)) // // ... // } // @@ -372,6 +372,14 @@ func inspect(errors []error) (res inspectResult) { // fromSlice converts the given list of errors into a single error. func fromSlice(errors []error) error { + // Don't pay to inspect small slices. + switch len(errors) { + case 0: + return nil + case 1: + return errors[0] + } + res := inspect(errors) switch res.Count { case 0: @@ -381,8 +389,13 @@ func fromSlice(errors []error) error { return errors[res.FirstErrorIdx] case len(errors): if !res.ContainsMultiError { - // already flat - return &multiError{errors: errors} + // Error list is flat. Make a copy of it + // Otherwise "errors" escapes to the heap + // unconditionally for all other cases. + // This lets us optimize for the "no errors" case. + out := make([]error, len(errors)) + copy(out, errors) + return &multiError{errors: out} } } diff --git a/vendor/go.uber.org/zap/.readme.tmpl b/vendor/go.uber.org/zap/.readme.tmpl index 3154a1e6..92aa65d6 100644 --- a/vendor/go.uber.org/zap/.readme.tmpl +++ b/vendor/go.uber.org/zap/.readme.tmpl @@ -96,14 +96,14 @@ Released under the [MIT License](LICENSE.txt). 1 In particular, keep in mind that we may be benchmarking against slightly older versions of other packages. Versions are -pinned in zap's [glide.lock][] file. [↩](#anchor-versions) +pinned in the [benchmarks/go.mod][] file. [↩](#anchor-versions) -[doc-img]: https://godoc.org/go.uber.org/zap?status.svg -[doc]: https://godoc.org/go.uber.org/zap -[ci-img]: https://travis-ci.com/uber-go/zap.svg?branch=master -[ci]: https://travis-ci.com/uber-go/zap +[doc-img]: https://pkg.go.dev/badge/go.uber.org/zap +[doc]: https://pkg.go.dev/go.uber.org/zap +[ci-img]: https://github.com/uber-go/zap/actions/workflows/go.yml/badge.svg +[ci]: https://github.com/uber-go/zap/actions/workflows/go.yml [cov-img]: https://codecov.io/gh/uber-go/zap/branch/master/graph/badge.svg [cov]: https://codecov.io/gh/uber-go/zap [benchmarking suite]: https://github.com/uber-go/zap/tree/master/benchmarks -[glide.lock]: https://github.com/uber-go/zap/blob/master/glide.lock +[benchmarks/go.mod]: https://github.com/uber-go/zap/blob/master/benchmarks/go.mod diff --git a/vendor/go.uber.org/zap/CHANGELOG.md b/vendor/go.uber.org/zap/CHANGELOG.md index 3b99bf0a..1793b08c 100644 --- a/vendor/go.uber.org/zap/CHANGELOG.md +++ b/vendor/go.uber.org/zap/CHANGELOG.md @@ -1,4 +1,108 @@ # Changelog +All notable changes to this project will be documented in this file. + +This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## 1.21.0 (7 Feb 2022) + +Enhancements: +* [#1047][]: Add `zapcore.ParseLevel` to parse a `Level` from a string. +* [#1048][]: Add `zap.ParseAtomicLevel` to parse an `AtomicLevel` from a + string. + +Bugfixes: +* [#1058][]: Fix panic in JSON encoder when `EncodeLevel` is unset. + +Other changes: +* [#1052][]: Improve encoding performance when the `AddCaller` and + `AddStacktrace` options are used together. + +[#1047]: https://github.com/uber-go/zap/pull/1047 +[#1048]: https://github.com/uber-go/zap/pull/1048 +[#1052]: https://github.com/uber-go/zap/pull/1052 +[#1058]: https://github.com/uber-go/zap/pull/1058 + +Thanks to @aerosol and @Techassi for their contributions to this release. + +## 1.20.0 (4 Jan 2022) + +Enhancements: +* [#989][]: Add `EncoderConfig.SkipLineEnding` flag to disable adding newline + characters between log statements. +* [#1039][]: Add `EncoderConfig.NewReflectedEncoder` field to customize JSON + encoding of reflected log fields. + +Bugfixes: +* [#1011][]: Fix inaccurate precision when encoding complex64 as JSON. +* [#554][], [#1017][]: Close JSON namespaces opened in `MarshalLogObject` + methods when the methods return. +* [#1033][]: Avoid panicking in Sampler core if `thereafter` is zero. + +Other changes: +* [#1028][]: Drop support for Go < 1.15. + +[#554]: https://github.com/uber-go/zap/pull/554 +[#989]: https://github.com/uber-go/zap/pull/989 +[#1011]: https://github.com/uber-go/zap/pull/1011 +[#1017]: https://github.com/uber-go/zap/pull/1017 +[#1028]: https://github.com/uber-go/zap/pull/1028 +[#1033]: https://github.com/uber-go/zap/pull/1033 +[#1039]: https://github.com/uber-go/zap/pull/1039 + +Thanks to @psrajat, @lruggieri, @sammyrnycreal for their contributions to this release. + +## 1.19.1 (8 Sep 2021) + +Bugfixes: +* [#1001][]: JSON: Fix complex number encoding with negative imaginary part. Thanks to @hemantjadon. +* [#1003][]: JSON: Fix inaccurate precision when encoding float32. + +[#1001]: https://github.com/uber-go/zap/pull/1001 +[#1003]: https://github.com/uber-go/zap/pull/1003 + +## 1.19.0 (9 Aug 2021) + +Enhancements: +* [#975][]: Avoid panicking in Sampler core if the level is out of bounds. +* [#984][]: Reduce the size of BufferedWriteSyncer by aligning the fields + better. + +[#975]: https://github.com/uber-go/zap/pull/975 +[#984]: https://github.com/uber-go/zap/pull/984 + +Thanks to @lancoLiu and @thockin for their contributions to this release. + +## 1.18.1 (28 Jun 2021) + +Bugfixes: +* [#974][]: Fix nil dereference in logger constructed by `zap.NewNop`. + +[#974]: https://github.com/uber-go/zap/pull/974 + +## 1.18.0 (28 Jun 2021) + +Enhancements: +* [#961][]: Add `zapcore.BufferedWriteSyncer`, a new `WriteSyncer` that buffers + messages in-memory and flushes them periodically. +* [#971][]: Add `zapio.Writer` to use a Zap logger as an `io.Writer`. +* [#897][]: Add `zap.WithClock` option to control the source of time via the + new `zapcore.Clock` interface. +* [#949][]: Avoid panicking in `zap.SugaredLogger` when arguments of `*w` + methods don't match expectations. +* [#943][]: Add support for filtering by level or arbitrary matcher function to + `zaptest/observer`. +* [#691][]: Comply with `io.StringWriter` and `io.ByteWriter` in Zap's + `buffer.Buffer`. + +Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee +for their contributions to this release. + +[#691]: https://github.com/uber-go/zap/pull/691 +[#897]: https://github.com/uber-go/zap/pull/897 +[#943]: https://github.com/uber-go/zap/pull/943 +[#949]: https://github.com/uber-go/zap/pull/949 +[#961]: https://github.com/uber-go/zap/pull/961 +[#971]: https://github.com/uber-go/zap/pull/971 ## 1.17.0 (25 May 2021) diff --git a/vendor/go.uber.org/zap/README.md b/vendor/go.uber.org/zap/README.md index 1e64d6cf..9c9dfe1e 100644 --- a/vendor/go.uber.org/zap/README.md +++ b/vendor/go.uber.org/zap/README.md @@ -66,38 +66,38 @@ Log a message and 10 fields: | Package | Time | Time % to zap | Objects Allocated | | :------ | :--: | :-----------: | :---------------: | -| :zap: zap | 862 ns/op | +0% | 5 allocs/op -| :zap: zap (sugared) | 1250 ns/op | +45% | 11 allocs/op -| zerolog | 4021 ns/op | +366% | 76 allocs/op -| go-kit | 4542 ns/op | +427% | 105 allocs/op -| apex/log | 26785 ns/op | +3007% | 115 allocs/op -| logrus | 29501 ns/op | +3322% | 125 allocs/op -| log15 | 29906 ns/op | +3369% | 122 allocs/op +| :zap: zap | 2900 ns/op | +0% | 5 allocs/op +| :zap: zap (sugared) | 3475 ns/op | +20% | 10 allocs/op +| zerolog | 10639 ns/op | +267% | 32 allocs/op +| go-kit | 14434 ns/op | +398% | 59 allocs/op +| logrus | 17104 ns/op | +490% | 81 allocs/op +| apex/log | 32424 ns/op | +1018% | 66 allocs/op +| log15 | 33579 ns/op | +1058% | 76 allocs/op Log a message with a logger that already has 10 fields of context: | Package | Time | Time % to zap | Objects Allocated | | :------ | :--: | :-----------: | :---------------: | -| :zap: zap | 126 ns/op | +0% | 0 allocs/op -| :zap: zap (sugared) | 187 ns/op | +48% | 2 allocs/op -| zerolog | 88 ns/op | -30% | 0 allocs/op -| go-kit | 5087 ns/op | +3937% | 103 allocs/op -| log15 | 18548 ns/op | +14621% | 73 allocs/op -| apex/log | 26012 ns/op | +20544% | 104 allocs/op -| logrus | 27236 ns/op | +21516% | 113 allocs/op +| :zap: zap | 373 ns/op | +0% | 0 allocs/op +| :zap: zap (sugared) | 452 ns/op | +21% | 1 allocs/op +| zerolog | 288 ns/op | -23% | 0 allocs/op +| go-kit | 11785 ns/op | +3060% | 58 allocs/op +| logrus | 19629 ns/op | +5162% | 70 allocs/op +| log15 | 21866 ns/op | +5762% | 72 allocs/op +| apex/log | 30890 ns/op | +8182% | 55 allocs/op Log a static string, without any context or `printf`-style templating: | Package | Time | Time % to zap | Objects Allocated | | :------ | :--: | :-----------: | :---------------: | -| :zap: zap | 118 ns/op | +0% | 0 allocs/op -| :zap: zap (sugared) | 191 ns/op | +62% | 2 allocs/op -| zerolog | 93 ns/op | -21% | 0 allocs/op -| go-kit | 280 ns/op | +137% | 11 allocs/op -| standard library | 499 ns/op | +323% | 2 allocs/op -| apex/log | 1990 ns/op | +1586% | 10 allocs/op -| logrus | 3129 ns/op | +2552% | 24 allocs/op -| log15 | 3887 ns/op | +3194% | 23 allocs/op +| :zap: zap | 381 ns/op | +0% | 0 allocs/op +| :zap: zap (sugared) | 410 ns/op | +8% | 1 allocs/op +| zerolog | 369 ns/op | -3% | 0 allocs/op +| standard library | 385 ns/op | +1% | 2 allocs/op +| go-kit | 606 ns/op | +59% | 11 allocs/op +| logrus | 1730 ns/op | +354% | 25 allocs/op +| apex/log | 1998 ns/op | +424% | 7 allocs/op +| log15 | 4546 ns/op | +1093% | 22 allocs/op ## Development Status: Stable diff --git a/vendor/go.uber.org/zap/buffer/buffer.go b/vendor/go.uber.org/zap/buffer/buffer.go index 3f4b86e0..9e929cd9 100644 --- a/vendor/go.uber.org/zap/buffer/buffer.go +++ b/vendor/go.uber.org/zap/buffer/buffer.go @@ -106,6 +106,24 @@ func (b *Buffer) Write(bs []byte) (int, error) { return len(bs), nil } +// WriteByte writes a single byte to the Buffer. +// +// Error returned is always nil, function signature is compatible +// with bytes.Buffer and bufio.Writer +func (b *Buffer) WriteByte(v byte) error { + b.AppendByte(v) + return nil +} + +// WriteString writes a string to the Buffer. +// +// Error returned is always nil, function signature is compatible +// with bytes.Buffer and bufio.Writer +func (b *Buffer) WriteString(s string) (int, error) { + b.AppendString(s) + return len(s), nil +} + // TrimNewline trims any final "\n" byte from the end of the buffer. func (b *Buffer) TrimNewline() { if i := len(b.bs) - 1; i >= 0 { diff --git a/vendor/go.uber.org/zap/global.go b/vendor/go.uber.org/zap/global.go index c1ac0507..3cb46c9e 100644 --- a/vendor/go.uber.org/zap/global.go +++ b/vendor/go.uber.org/zap/global.go @@ -31,6 +31,7 @@ import ( ) const ( + _stdLogDefaultDepth = 1 _loggerWriterDepth = 2 _programmerErrorTemplate = "You've found a bug in zap! Please file a bug at " + "https://github.com/uber-go/zap/issues/new and reference this error: %v" diff --git a/vendor/go.uber.org/zap/level.go b/vendor/go.uber.org/zap/level.go index 3567a9a1..8f86c430 100644 --- a/vendor/go.uber.org/zap/level.go +++ b/vendor/go.uber.org/zap/level.go @@ -86,6 +86,23 @@ func NewAtomicLevelAt(l zapcore.Level) AtomicLevel { return a } +// ParseAtomicLevel parses an AtomicLevel based on a lowercase or all-caps ASCII +// representation of the log level. If the provided ASCII representation is +// invalid an error is returned. +// +// This is particularly useful when dealing with text input to configure log +// levels. +func ParseAtomicLevel(text string) (AtomicLevel, error) { + a := NewAtomicLevel() + l, err := zapcore.ParseLevel(text) + if err != nil { + return a, err + } + + a.SetLevel(l) + return a, nil +} + // Enabled implements the zapcore.LevelEnabler interface, which allows the // AtomicLevel to be used in place of traditional static levels. func (lvl AtomicLevel) Enabled(l zapcore.Level) bool { diff --git a/vendor/go.uber.org/zap/logger.go b/vendor/go.uber.org/zap/logger.go index 553f258e..087c7422 100644 --- a/vendor/go.uber.org/zap/logger.go +++ b/vendor/go.uber.org/zap/logger.go @@ -24,10 +24,9 @@ import ( "fmt" "io/ioutil" "os" - "runtime" "strings" - "time" + "go.uber.org/zap/internal/bufferpool" "go.uber.org/zap/zapcore" ) @@ -51,6 +50,8 @@ type Logger struct { addStack zapcore.LevelEnabler callerSkip int + + clock zapcore.Clock } // New constructs a new Logger from the provided zapcore.Core and Options. If @@ -71,6 +72,7 @@ func New(core zapcore.Core, options ...Option) *Logger { core: core, errorOutput: zapcore.Lock(os.Stderr), addStack: zapcore.FatalLevel + 1, + clock: zapcore.DefaultClock, } return log.WithOptions(options...) } @@ -85,6 +87,7 @@ func NewNop() *Logger { core: zapcore.NewNopCore(), errorOutput: zapcore.AddSync(ioutil.Discard), addStack: zapcore.FatalLevel + 1, + clock: zapcore.DefaultClock, } } @@ -256,8 +259,10 @@ func (log *Logger) clone() *Logger { } func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { - // check must always be called directly by a method in the Logger interface - // (e.g., Check, Info, Fatal). + // Logger.check must always be called directly by a method in the + // Logger interface (e.g., Check, Info, Fatal). + // This skips Logger.check and the Info/Fatal/Check/etc. method that + // called it. const callerSkipOffset = 2 // Check the level first to reduce the cost of disabled log calls. @@ -270,7 +275,7 @@ func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { // log message will actually be written somewhere. ent := zapcore.Entry{ LoggerName: log.name, - Time: time.Now(), + Time: log.clock.Now(), Level: lvl, Message: msg, } @@ -304,42 +309,55 @@ func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { // Thread the error output through to the CheckedEntry. ce.ErrorOutput = log.errorOutput - if log.addCaller { - frame, defined := getCallerFrame(log.callerSkip + callerSkipOffset) - if !defined { - fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", time.Now().UTC()) + + addStack := log.addStack.Enabled(ce.Level) + if !log.addCaller && !addStack { + return ce + } + + // Adding the caller or stack trace requires capturing the callers of + // this function. We'll share information between these two. + stackDepth := stacktraceFirst + if addStack { + stackDepth = stacktraceFull + } + stack := captureStacktrace(log.callerSkip+callerSkipOffset, stackDepth) + defer stack.Free() + + if stack.Count() == 0 { + if log.addCaller { + fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", ent.Time.UTC()) log.errorOutput.Sync() } + return ce + } - ce.Entry.Caller = zapcore.EntryCaller{ - Defined: defined, + frame, more := stack.Next() + + if log.addCaller { + ce.Caller = zapcore.EntryCaller{ + Defined: frame.PC != 0, PC: frame.PC, File: frame.File, Line: frame.Line, Function: frame.Function, } } - if log.addStack.Enabled(ce.Entry.Level) { - ce.Entry.Stack = StackSkip("", log.callerSkip+callerSkipOffset).String + + if addStack { + buffer := bufferpool.Get() + defer buffer.Free() + + stackfmt := newStackFormatter(buffer) + + // We've already extracted the first frame, so format that + // separately and defer to stackfmt for the rest. + stackfmt.FormatFrame(frame) + if more { + stackfmt.FormatStack(stack) + } + ce.Stack = buffer.String() } return ce } - -// getCallerFrame gets caller frame. The argument skip is the number of stack -// frames to ascend, with 0 identifying the caller of getCallerFrame. The -// boolean ok is false if it was not possible to recover the information. -// -// Note: This implementation is similar to runtime.Caller, but it returns the whole frame. -func getCallerFrame(skip int) (frame runtime.Frame, ok bool) { - const skipOffset = 2 // skip getCallerFrame and Callers - - pc := make([]uintptr, 1) - numFrames := runtime.Callers(skip+skipOffset, pc) - if numFrames < 1 { - return - } - - frame, _ = runtime.CallersFrames(pc).Next() - return frame, frame.PC != 0 -} diff --git a/vendor/go.uber.org/zap/options.go b/vendor/go.uber.org/zap/options.go index 0135c209..e9e66161 100644 --- a/vendor/go.uber.org/zap/options.go +++ b/vendor/go.uber.org/zap/options.go @@ -138,3 +138,11 @@ func OnFatal(action zapcore.CheckWriteAction) Option { log.onFatal = action }) } + +// WithClock specifies the clock used by the logger to determine the current +// time for logged entries. Defaults to the system clock with time.Now. +func WithClock(clock zapcore.Clock) Option { + return optionFunc(func(log *Logger) { + log.clock = clock + }) +} diff --git a/vendor/go.uber.org/zap/stacktrace.go b/vendor/go.uber.org/zap/stacktrace.go index 0cf8c1dd..3d187fa5 100644 --- a/vendor/go.uber.org/zap/stacktrace.go +++ b/vendor/go.uber.org/zap/stacktrace.go @@ -24,62 +24,153 @@ import ( "runtime" "sync" + "go.uber.org/zap/buffer" "go.uber.org/zap/internal/bufferpool" ) -var ( - _stacktracePool = sync.Pool{ - New: func() interface{} { - return newProgramCounters(64) - }, - } +var _stacktracePool = sync.Pool{ + New: func() interface{} { + return &stacktrace{ + storage: make([]uintptr, 64), + } + }, +} + +type stacktrace struct { + pcs []uintptr // program counters; always a subslice of storage + frames *runtime.Frames + + // The size of pcs varies depending on requirements: + // it will be one if the only the first frame was requested, + // and otherwise it will reflect the depth of the call stack. + // + // storage decouples the slice we need (pcs) from the slice we pool. + // We will always allocate a reasonably large storage, but we'll use + // only as much of it as we need. + storage []uintptr +} + +// stacktraceDepth specifies how deep of a stack trace should be captured. +type stacktraceDepth int + +const ( + // stacktraceFirst captures only the first frame. + stacktraceFirst stacktraceDepth = iota + + // stacktraceFull captures the entire call stack, allocating more + // storage for it if needed. + stacktraceFull ) +// captureStacktrace captures a stack trace of the specified depth, skipping +// the provided number of frames. skip=0 identifies the caller of +// captureStacktrace. +// +// The caller must call Free on the returned stacktrace after using it. +func captureStacktrace(skip int, depth stacktraceDepth) *stacktrace { + stack := _stacktracePool.Get().(*stacktrace) + + switch depth { + case stacktraceFirst: + stack.pcs = stack.storage[:1] + case stacktraceFull: + stack.pcs = stack.storage + } + + // Unlike other "skip"-based APIs, skip=0 identifies runtime.Callers + // itself. +2 to skip captureStacktrace and runtime.Callers. + numFrames := runtime.Callers( + skip+2, + stack.pcs, + ) + + // runtime.Callers truncates the recorded stacktrace if there is no + // room in the provided slice. For the full stack trace, keep expanding + // storage until there are fewer frames than there is room. + if depth == stacktraceFull { + pcs := stack.pcs + for numFrames == len(pcs) { + pcs = make([]uintptr, len(pcs)*2) + numFrames = runtime.Callers(skip+2, pcs) + } + + // Discard old storage instead of returning it to the pool. + // This will adjust the pool size over time if stack traces are + // consistently very deep. + stack.storage = pcs + stack.pcs = pcs[:numFrames] + } else { + stack.pcs = stack.pcs[:numFrames] + } + + stack.frames = runtime.CallersFrames(stack.pcs) + return stack +} + +// Free releases resources associated with this stacktrace +// and returns it back to the pool. +func (st *stacktrace) Free() { + st.frames = nil + st.pcs = nil + _stacktracePool.Put(st) +} + +// Count reports the total number of frames in this stacktrace. +// Count DOES NOT change as Next is called. +func (st *stacktrace) Count() int { + return len(st.pcs) +} + +// Next returns the next frame in the stack trace, +// and a boolean indicating whether there are more after it. +func (st *stacktrace) Next() (_ runtime.Frame, more bool) { + return st.frames.Next() +} + func takeStacktrace(skip int) string { + stack := captureStacktrace(skip+1, stacktraceFull) + defer stack.Free() + buffer := bufferpool.Get() defer buffer.Free() - programCounters := _stacktracePool.Get().(*programCounters) - defer _stacktracePool.Put(programCounters) - - var numFrames int - for { - // Skip the call to runtime.Callers and takeStacktrace so that the - // program counters start at the caller of takeStacktrace. - numFrames = runtime.Callers(skip+2, programCounters.pcs) - if numFrames < len(programCounters.pcs) { - break - } - // Don't put the too-short counter slice back into the pool; this lets - // the pool adjust if we consistently take deep stacktraces. - programCounters = newProgramCounters(len(programCounters.pcs) * 2) - } - - i := 0 - frames := runtime.CallersFrames(programCounters.pcs[:numFrames]) - - // Note: On the last iteration, frames.Next() returns false, with a valid - // frame, but we ignore this frame. The last frame is a a runtime frame which - // adds noise, since it's only either runtime.main or runtime.goexit. - for frame, more := frames.Next(); more; frame, more = frames.Next() { - if i != 0 { - buffer.AppendByte('\n') - } - i++ - buffer.AppendString(frame.Function) - buffer.AppendByte('\n') - buffer.AppendByte('\t') - buffer.AppendString(frame.File) - buffer.AppendByte(':') - buffer.AppendInt(int64(frame.Line)) - } + stackfmt := newStackFormatter(buffer) + stackfmt.FormatStack(stack) return buffer.String() } -type programCounters struct { - pcs []uintptr +// stackFormatter formats a stack trace into a readable string representation. +type stackFormatter struct { + b *buffer.Buffer + nonEmpty bool // whehther we've written at least one frame already } -func newProgramCounters(size int) *programCounters { - return &programCounters{make([]uintptr, size)} +// newStackFormatter builds a new stackFormatter. +func newStackFormatter(b *buffer.Buffer) stackFormatter { + return stackFormatter{b: b} +} + +// FormatStack formats all remaining frames in the provided stacktrace -- minus +// the final runtime.main/runtime.goexit frame. +func (sf *stackFormatter) FormatStack(stack *stacktrace) { + // Note: On the last iteration, frames.Next() returns false, with a valid + // frame, but we ignore this frame. The last frame is a a runtime frame which + // adds noise, since it's only either runtime.main or runtime.goexit. + for frame, more := stack.Next(); more; frame, more = stack.Next() { + sf.FormatFrame(frame) + } +} + +// FormatFrame formats the given frame. +func (sf *stackFormatter) FormatFrame(frame runtime.Frame) { + if sf.nonEmpty { + sf.b.AppendByte('\n') + } + sf.nonEmpty = true + sf.b.AppendString(frame.Function) + sf.b.AppendByte('\n') + sf.b.AppendByte('\t') + sf.b.AppendString(frame.File) + sf.b.AppendByte(':') + sf.b.AppendInt(int64(frame.Line)) } diff --git a/vendor/go.uber.org/zap/sugar.go b/vendor/go.uber.org/zap/sugar.go index 4084dada..0b965198 100644 --- a/vendor/go.uber.org/zap/sugar.go +++ b/vendor/go.uber.org/zap/sugar.go @@ -266,7 +266,7 @@ func (s *SugaredLogger) sweetenFields(args []interface{}) []Field { // Make sure this element isn't a dangling key. if i == len(args)-1 { - s.base.DPanic(_oddNumberErrMsg, Any("ignored", args[i])) + s.base.Error(_oddNumberErrMsg, Any("ignored", args[i])) break } @@ -287,7 +287,7 @@ func (s *SugaredLogger) sweetenFields(args []interface{}) []Field { // If we encountered any invalid key-value pairs, log an error. if len(invalid) > 0 { - s.base.DPanic(_nonStringKeyErrMsg, Array("invalid", invalid)) + s.base.Error(_nonStringKeyErrMsg, Array("invalid", invalid)) } return fields } diff --git a/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go b/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go new file mode 100644 index 00000000..ef2f7d96 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go @@ -0,0 +1,188 @@ +// Copyright (c) 2021 Uber Technologies, Inc. +// +// 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. + +package zapcore + +import ( + "bufio" + "sync" + "time" + + "go.uber.org/multierr" +) + +const ( + // _defaultBufferSize specifies the default size used by Buffer. + _defaultBufferSize = 256 * 1024 // 256 kB + + // _defaultFlushInterval specifies the default flush interval for + // Buffer. + _defaultFlushInterval = 30 * time.Second +) + +// A BufferedWriteSyncer is a WriteSyncer that buffers writes in-memory before +// flushing them to a wrapped WriteSyncer after reaching some limit, or at some +// fixed interval--whichever comes first. +// +// BufferedWriteSyncer is safe for concurrent use. You don't need to use +// zapcore.Lock for WriteSyncers with BufferedWriteSyncer. +type BufferedWriteSyncer struct { + // WS is the WriteSyncer around which BufferedWriteSyncer will buffer + // writes. + // + // This field is required. + WS WriteSyncer + + // Size specifies the maximum amount of data the writer will buffered + // before flushing. + // + // Defaults to 256 kB if unspecified. + Size int + + // FlushInterval specifies how often the writer should flush data if + // there have been no writes. + // + // Defaults to 30 seconds if unspecified. + FlushInterval time.Duration + + // Clock, if specified, provides control of the source of time for the + // writer. + // + // Defaults to the system clock. + Clock Clock + + // unexported fields for state + mu sync.Mutex + initialized bool // whether initialize() has run + stopped bool // whether Stop() has run + writer *bufio.Writer + ticker *time.Ticker + stop chan struct{} // closed when flushLoop should stop + done chan struct{} // closed when flushLoop has stopped +} + +func (s *BufferedWriteSyncer) initialize() { + size := s.Size + if size == 0 { + size = _defaultBufferSize + } + + flushInterval := s.FlushInterval + if flushInterval == 0 { + flushInterval = _defaultFlushInterval + } + + if s.Clock == nil { + s.Clock = DefaultClock + } + + s.ticker = s.Clock.NewTicker(flushInterval) + s.writer = bufio.NewWriterSize(s.WS, size) + s.stop = make(chan struct{}) + s.done = make(chan struct{}) + s.initialized = true + go s.flushLoop() +} + +// Write writes log data into buffer syncer directly, multiple Write calls will be batched, +// and log data will be flushed to disk when the buffer is full or periodically. +func (s *BufferedWriteSyncer) Write(bs []byte) (int, error) { + s.mu.Lock() + defer s.mu.Unlock() + + if !s.initialized { + s.initialize() + } + + // To avoid partial writes from being flushed, we manually flush the existing buffer if: + // * The current write doesn't fit into the buffer fully, and + // * The buffer is not empty (since bufio will not split large writes when the buffer is empty) + if len(bs) > s.writer.Available() && s.writer.Buffered() > 0 { + if err := s.writer.Flush(); err != nil { + return 0, err + } + } + + return s.writer.Write(bs) +} + +// Sync flushes buffered log data into disk directly. +func (s *BufferedWriteSyncer) Sync() error { + s.mu.Lock() + defer s.mu.Unlock() + + var err error + if s.initialized { + err = s.writer.Flush() + } + + return multierr.Append(err, s.WS.Sync()) +} + +// flushLoop flushes the buffer at the configured interval until Stop is +// called. +func (s *BufferedWriteSyncer) flushLoop() { + defer close(s.done) + + for { + select { + case <-s.ticker.C: + // we just simply ignore error here + // because the underlying bufio writer stores any errors + // and we return any error from Sync() as part of the close + _ = s.Sync() + case <-s.stop: + return + } + } +} + +// Stop closes the buffer, cleans up background goroutines, and flushes +// remaining unwritten data. +func (s *BufferedWriteSyncer) Stop() (err error) { + var stopped bool + + // Critical section. + func() { + s.mu.Lock() + defer s.mu.Unlock() + + if !s.initialized { + return + } + + stopped = s.stopped + if stopped { + return + } + s.stopped = true + + s.ticker.Stop() + close(s.stop) // tell flushLoop to stop + <-s.done // and wait until it has + }() + + // Don't call Sync on consecutive Stops. + if !stopped { + err = s.Sync() + } + + return err +} diff --git a/vendor/go.uber.org/zap/global_prego112.go b/vendor/go.uber.org/zap/zapcore/clock.go similarity index 58% rename from vendor/go.uber.org/zap/global_prego112.go rename to vendor/go.uber.org/zap/zapcore/clock.go index d3ab9af9..422fd82a 100644 --- a/vendor/go.uber.org/zap/global_prego112.go +++ b/vendor/go.uber.org/zap/zapcore/clock.go @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -18,9 +18,31 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -// See #682 for more information. -// +build !go1.12 +package zapcore -package zap +import "time" -const _stdLogDefaultDepth = 2 +// DefaultClock is the default clock used by Zap in operations that require +// time. This clock uses the system clock for all operations. +var DefaultClock = systemClock{} + +// Clock is a source of time for logged entries. +type Clock interface { + // Now returns the current local time. + Now() time.Time + + // NewTicker returns *time.Ticker that holds a channel + // that delivers "ticks" of a clock. + NewTicker(time.Duration) *time.Ticker +} + +// systemClock implements default Clock that uses system time. +type systemClock struct{} + +func (systemClock) Now() time.Time { + return time.Now() +} + +func (systemClock) NewTicker(duration time.Duration) *time.Ticker { + return time.NewTicker(duration) +} diff --git a/vendor/go.uber.org/zap/zapcore/console_encoder.go b/vendor/go.uber.org/zap/zapcore/console_encoder.go index 2307af40..1aa5dc36 100644 --- a/vendor/go.uber.org/zap/zapcore/console_encoder.go +++ b/vendor/go.uber.org/zap/zapcore/console_encoder.go @@ -125,11 +125,7 @@ func (c consoleEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, line.AppendString(ent.Stack) } - if c.LineEnding != "" { - line.AppendString(c.LineEnding) - } else { - line.AppendString(DefaultLineEnding) - } + line.AppendString(c.LineEnding) return line, nil } diff --git a/vendor/go.uber.org/zap/zapcore/encoder.go b/vendor/go.uber.org/zap/zapcore/encoder.go index 6601ca16..6e5fd565 100644 --- a/vendor/go.uber.org/zap/zapcore/encoder.go +++ b/vendor/go.uber.org/zap/zapcore/encoder.go @@ -22,6 +22,7 @@ package zapcore import ( "encoding/json" + "io" "time" "go.uber.org/zap/buffer" @@ -312,14 +313,15 @@ func (e *NameEncoder) UnmarshalText(text []byte) error { type EncoderConfig struct { // Set the keys used for each log entry. If any key is empty, that portion // of the entry is omitted. - MessageKey string `json:"messageKey" yaml:"messageKey"` - LevelKey string `json:"levelKey" yaml:"levelKey"` - TimeKey string `json:"timeKey" yaml:"timeKey"` - NameKey string `json:"nameKey" yaml:"nameKey"` - CallerKey string `json:"callerKey" yaml:"callerKey"` - FunctionKey string `json:"functionKey" yaml:"functionKey"` - StacktraceKey string `json:"stacktraceKey" yaml:"stacktraceKey"` - LineEnding string `json:"lineEnding" yaml:"lineEnding"` + MessageKey string `json:"messageKey" yaml:"messageKey"` + LevelKey string `json:"levelKey" yaml:"levelKey"` + TimeKey string `json:"timeKey" yaml:"timeKey"` + NameKey string `json:"nameKey" yaml:"nameKey"` + CallerKey string `json:"callerKey" yaml:"callerKey"` + FunctionKey string `json:"functionKey" yaml:"functionKey"` + StacktraceKey string `json:"stacktraceKey" yaml:"stacktraceKey"` + SkipLineEnding bool `json:"skipLineEnding" yaml:"skipLineEnding"` + LineEnding string `json:"lineEnding" yaml:"lineEnding"` // Configure the primitive representations of common complex types. For // example, some users may want all time.Times serialized as floating-point // seconds since epoch, while others may prefer ISO8601 strings. @@ -330,6 +332,9 @@ type EncoderConfig struct { // Unlike the other primitive type encoders, EncodeName is optional. The // zero value falls back to FullNameEncoder. EncodeName NameEncoder `json:"nameEncoder" yaml:"nameEncoder"` + // Configure the encoder for interface{} type objects. + // If not provided, objects are encoded using json.Encoder + NewReflectedEncoder func(io.Writer) ReflectedEncoder `json:"-" yaml:"-"` // Configures the field separator used by the console encoder. Defaults // to tab. ConsoleSeparator string `json:"consoleSeparator" yaml:"consoleSeparator"` diff --git a/vendor/go.uber.org/zap/zapcore/entry.go b/vendor/go.uber.org/zap/zapcore/entry.go index 4aa8b4f9..0885505b 100644 --- a/vendor/go.uber.org/zap/zapcore/entry.go +++ b/vendor/go.uber.org/zap/zapcore/entry.go @@ -208,7 +208,7 @@ func (ce *CheckedEntry) Write(fields ...Field) { // If the entry is dirty, log an internal error; because the // CheckedEntry is being used after it was returned to the pool, // the message may be an amalgamation from multiple call sites. - fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", time.Now(), ce.Entry) + fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", ce.Time, ce.Entry) ce.ErrorOutput.Sync() } return @@ -219,11 +219,9 @@ func (ce *CheckedEntry) Write(fields ...Field) { for i := range ce.cores { err = multierr.Append(err, ce.cores[i].Write(ce.Entry, fields)) } - if ce.ErrorOutput != nil { - if err != nil { - fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", time.Now(), err) - ce.ErrorOutput.Sync() - } + if err != nil && ce.ErrorOutput != nil { + fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", ce.Time, err) + ce.ErrorOutput.Sync() } should, msg := ce.should, ce.Message diff --git a/vendor/go.uber.org/zap/zapcore/error.go b/vendor/go.uber.org/zap/zapcore/error.go index f2a07d78..74919b0c 100644 --- a/vendor/go.uber.org/zap/zapcore/error.go +++ b/vendor/go.uber.org/zap/zapcore/error.go @@ -83,7 +83,7 @@ type errorGroup interface { Errors() []error } -// Note that errArry and errArrayElem are very similar to the version +// Note that errArray and errArrayElem are very similar to the version // implemented in the top-level error.go file. We can't re-use this because // that would require exporting errArray as part of the zapcore API. diff --git a/vendor/go.uber.org/zap/zapcore/json_encoder.go b/vendor/go.uber.org/zap/zapcore/json_encoder.go index 5cf7d917..c5d751b8 100644 --- a/vendor/go.uber.org/zap/zapcore/json_encoder.go +++ b/vendor/go.uber.org/zap/zapcore/json_encoder.go @@ -22,7 +22,6 @@ package zapcore import ( "encoding/base64" - "encoding/json" "math" "sync" "time" @@ -64,7 +63,7 @@ type jsonEncoder struct { // for encoding generic values by reflection reflectBuf *buffer.Buffer - reflectEnc *json.Encoder + reflectEnc ReflectedEncoder } // NewJSONEncoder creates a fast, low-allocation JSON encoder. The encoder @@ -82,6 +81,17 @@ func NewJSONEncoder(cfg EncoderConfig) Encoder { } func newJSONEncoder(cfg EncoderConfig, spaced bool) *jsonEncoder { + if cfg.SkipLineEnding { + cfg.LineEnding = "" + } else if cfg.LineEnding == "" { + cfg.LineEnding = DefaultLineEnding + } + + // If no EncoderConfig.NewReflectedEncoder is provided by the user, then use default + if cfg.NewReflectedEncoder == nil { + cfg.NewReflectedEncoder = defaultReflectedEncoder + } + return &jsonEncoder{ EncoderConfig: &cfg, buf: bufferpool.Get(), @@ -118,6 +128,11 @@ func (enc *jsonEncoder) AddComplex128(key string, val complex128) { enc.AppendComplex128(val) } +func (enc *jsonEncoder) AddComplex64(key string, val complex64) { + enc.addKey(key) + enc.AppendComplex64(val) +} + func (enc *jsonEncoder) AddDuration(key string, val time.Duration) { enc.addKey(key) enc.AppendDuration(val) @@ -128,6 +143,11 @@ func (enc *jsonEncoder) AddFloat64(key string, val float64) { enc.AppendFloat64(val) } +func (enc *jsonEncoder) AddFloat32(key string, val float32) { + enc.addKey(key) + enc.AppendFloat32(val) +} + func (enc *jsonEncoder) AddInt64(key string, val int64) { enc.addKey(key) enc.AppendInt64(val) @@ -136,10 +156,7 @@ func (enc *jsonEncoder) AddInt64(key string, val int64) { func (enc *jsonEncoder) resetReflectBuf() { if enc.reflectBuf == nil { enc.reflectBuf = bufferpool.Get() - enc.reflectEnc = json.NewEncoder(enc.reflectBuf) - - // For consistency with our custom JSON encoder. - enc.reflectEnc.SetEscapeHTML(false) + enc.reflectEnc = enc.NewReflectedEncoder(enc.reflectBuf) } else { enc.reflectBuf.Reset() } @@ -201,10 +218,16 @@ func (enc *jsonEncoder) AppendArray(arr ArrayMarshaler) error { } func (enc *jsonEncoder) AppendObject(obj ObjectMarshaler) error { + // Close ONLY new openNamespaces that are created during + // AppendObject(). + old := enc.openNamespaces + enc.openNamespaces = 0 enc.addElementSeparator() enc.buf.AppendByte('{') err := obj.MarshalLogObject(enc) enc.buf.AppendByte('}') + enc.closeOpenNamespaces() + enc.openNamespaces = old return err } @@ -220,16 +243,23 @@ func (enc *jsonEncoder) AppendByteString(val []byte) { enc.buf.AppendByte('"') } -func (enc *jsonEncoder) AppendComplex128(val complex128) { +// appendComplex appends the encoded form of the provided complex128 value. +// precision specifies the encoding precision for the real and imaginary +// components of the complex number. +func (enc *jsonEncoder) appendComplex(val complex128, precision int) { enc.addElementSeparator() // Cast to a platform-independent, fixed-size type. r, i := float64(real(val)), float64(imag(val)) enc.buf.AppendByte('"') // Because we're always in a quoted string, we can use strconv without // special-casing NaN and +/-Inf. - enc.buf.AppendFloat(r, 64) - enc.buf.AppendByte('+') - enc.buf.AppendFloat(i, 64) + enc.buf.AppendFloat(r, precision) + // If imaginary part is less than 0, minus (-) sign is added by default + // by AppendFloat. + if i >= 0 { + enc.buf.AppendByte('+') + } + enc.buf.AppendFloat(i, precision) enc.buf.AppendByte('i') enc.buf.AppendByte('"') } @@ -292,29 +322,28 @@ func (enc *jsonEncoder) AppendUint64(val uint64) { enc.buf.AppendUint(val) } -func (enc *jsonEncoder) AddComplex64(k string, v complex64) { enc.AddComplex128(k, complex128(v)) } -func (enc *jsonEncoder) AddFloat32(k string, v float32) { enc.AddFloat64(k, float64(v)) } -func (enc *jsonEncoder) AddInt(k string, v int) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddInt32(k string, v int32) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddInt16(k string, v int16) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddInt8(k string, v int8) { enc.AddInt64(k, int64(v)) } -func (enc *jsonEncoder) AddUint(k string, v uint) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUint32(k string, v uint32) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUint16(k string, v uint16) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUint8(k string, v uint8) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AddUintptr(k string, v uintptr) { enc.AddUint64(k, uint64(v)) } -func (enc *jsonEncoder) AppendComplex64(v complex64) { enc.AppendComplex128(complex128(v)) } -func (enc *jsonEncoder) AppendFloat64(v float64) { enc.appendFloat(v, 64) } -func (enc *jsonEncoder) AppendFloat32(v float32) { enc.appendFloat(float64(v), 32) } -func (enc *jsonEncoder) AppendInt(v int) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendInt32(v int32) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendInt16(v int16) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendInt8(v int8) { enc.AppendInt64(int64(v)) } -func (enc *jsonEncoder) AppendUint(v uint) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUint32(v uint32) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUint16(v uint16) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUint8(v uint8) { enc.AppendUint64(uint64(v)) } -func (enc *jsonEncoder) AppendUintptr(v uintptr) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AddInt(k string, v int) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddInt32(k string, v int32) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddInt16(k string, v int16) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddInt8(k string, v int8) { enc.AddInt64(k, int64(v)) } +func (enc *jsonEncoder) AddUint(k string, v uint) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUint32(k string, v uint32) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUint16(k string, v uint16) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUint8(k string, v uint8) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AddUintptr(k string, v uintptr) { enc.AddUint64(k, uint64(v)) } +func (enc *jsonEncoder) AppendComplex64(v complex64) { enc.appendComplex(complex128(v), 32) } +func (enc *jsonEncoder) AppendComplex128(v complex128) { enc.appendComplex(complex128(v), 64) } +func (enc *jsonEncoder) AppendFloat64(v float64) { enc.appendFloat(v, 64) } +func (enc *jsonEncoder) AppendFloat32(v float32) { enc.appendFloat(float64(v), 32) } +func (enc *jsonEncoder) AppendInt(v int) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendInt32(v int32) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendInt16(v int16) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendInt8(v int8) { enc.AppendInt64(int64(v)) } +func (enc *jsonEncoder) AppendUint(v uint) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUint32(v uint32) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUint16(v uint16) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUint8(v uint8) { enc.AppendUint64(uint64(v)) } +func (enc *jsonEncoder) AppendUintptr(v uintptr) { enc.AppendUint64(uint64(v)) } func (enc *jsonEncoder) Clone() Encoder { clone := enc.clone() @@ -335,7 +364,7 @@ func (enc *jsonEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, final := enc.clone() final.buf.AppendByte('{') - if final.LevelKey != "" { + if final.LevelKey != "" && final.EncodeLevel != nil { final.addKey(final.LevelKey) cur := final.buf.Len() final.EncodeLevel(ent.Level, final) @@ -396,11 +425,7 @@ func (enc *jsonEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer, final.AddString(final.StacktraceKey, ent.Stack) } final.buf.AppendByte('}') - if final.LineEnding != "" { - final.buf.AppendString(final.LineEnding) - } else { - final.buf.AppendString(DefaultLineEnding) - } + final.buf.AppendString(final.LineEnding) ret := final.buf putJSONEncoder(final) @@ -415,6 +440,7 @@ func (enc *jsonEncoder) closeOpenNamespaces() { for i := 0; i < enc.openNamespaces; i++ { enc.buf.AppendByte('}') } + enc.openNamespaces = 0 } func (enc *jsonEncoder) addKey(key string) { diff --git a/vendor/go.uber.org/zap/zapcore/level.go b/vendor/go.uber.org/zap/zapcore/level.go index e575c9f4..56e88dc0 100644 --- a/vendor/go.uber.org/zap/zapcore/level.go +++ b/vendor/go.uber.org/zap/zapcore/level.go @@ -55,6 +55,18 @@ const ( _maxLevel = FatalLevel ) +// ParseLevel parses a level based on the lower-case or all-caps ASCII +// representation of the log level. If the provided ASCII representation is +// invalid an error is returned. +// +// This is particularly useful when dealing with text input to configure log +// levels. +func ParseLevel(text string) (Level, error) { + var level Level + err := level.UnmarshalText([]byte(text)) + return level, err +} + // String returns a lower-case ASCII representation of the log level. func (l Level) String() string { switch l { diff --git a/vendor/go.uber.org/zap/global_go112.go b/vendor/go.uber.org/zap/zapcore/reflected_encoder.go similarity index 64% rename from vendor/go.uber.org/zap/global_go112.go rename to vendor/go.uber.org/zap/zapcore/reflected_encoder.go index 6b5dbda8..8746360e 100644 --- a/vendor/go.uber.org/zap/global_go112.go +++ b/vendor/go.uber.org/zap/zapcore/reflected_encoder.go @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Uber Technologies, Inc. +// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -18,9 +18,24 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -// See #682 for more information. -// +build go1.12 +package zapcore -package zap +import ( + "encoding/json" + "io" +) -const _stdLogDefaultDepth = 1 +// ReflectedEncoder serializes log fields that can't be serialized with Zap's +// JSON encoder. These have the ReflectType field type. +// Use EncoderConfig.NewReflectedEncoder to set this. +type ReflectedEncoder interface { + // Encode encodes and writes to the underlying data stream. + Encode(interface{}) error +} + +func defaultReflectedEncoder(w io.Writer) ReflectedEncoder { + enc := json.NewEncoder(w) + // For consistency with our custom JSON encoder. + enc.SetEscapeHTML(false) + return enc +} diff --git a/vendor/go.uber.org/zap/zapcore/sampler.go b/vendor/go.uber.org/zap/zapcore/sampler.go index 25f10ca1..8c116049 100644 --- a/vendor/go.uber.org/zap/zapcore/sampler.go +++ b/vendor/go.uber.org/zap/zapcore/sampler.go @@ -133,10 +133,21 @@ func SamplerHook(hook func(entry Entry, dec SamplingDecision)) SamplerOption { // each tick. If more Entries with the same level and message are seen during // the same interval, every Mth message is logged and the rest are dropped. // +// For example, +// +// core = NewSamplerWithOptions(core, time.Second, 10, 5) +// +// This will log the first 10 log entries with the same level and message +// in a one second interval as-is. Following that, it will allow through +// every 5th log entry with the same level and message in that interval. +// +// If thereafter is zero, the Core will drop all log entries after the first N +// in that interval. +// // Sampler can be configured to report sampling decisions with the SamplerHook // option. // -// Keep in mind that zap's sampling implementation is optimized for speed over +// Keep in mind that Zap's sampling implementation is optimized for speed over // absolute precision; under load, each tick may be slightly over- or // under-sampled. func NewSamplerWithOptions(core Core, tick time.Duration, first, thereafter int, opts ...SamplerOption) Core { @@ -197,12 +208,14 @@ func (s *sampler) Check(ent Entry, ce *CheckedEntry) *CheckedEntry { return ce } - counter := s.counts.get(ent.Level, ent.Message) - n := counter.IncCheckReset(ent.Time, s.tick) - if n > s.first && (n-s.first)%s.thereafter != 0 { - s.hook(ent, LogDropped) - return ce + if ent.Level >= _minLevel && ent.Level <= _maxLevel { + counter := s.counts.get(ent.Level, ent.Message) + n := counter.IncCheckReset(ent.Time, s.tick) + if n > s.first && (s.thereafter == 0 || (n-s.first)%s.thereafter != 0) { + s.hook(ent, LogDropped) + return ce + } + s.hook(ent, LogSampled) } - s.hook(ent, LogSampled) return s.Core.Check(ent, ce) } diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index aeb73f81..addf56b4 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -50,7 +50,7 @@ func (ih InvalidHashPrefixError) Error() string { type InvalidCostError int func (ic InvalidCostError) Error() string { - return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), int(MinCost), int(MaxCost)) + return fmt.Sprintf("crypto/bcrypt: cost %d is outside allowed range (%d,%d)", int(ic), MinCost, MaxCost) } const ( diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go index 4c96147c..3fd05b27 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go @@ -5,6 +5,8 @@ // Package salsa provides low-level access to functions in the Salsa family. package salsa // import "golang.org/x/crypto/salsa20/salsa" +import "math/bits" + // Sigma is the Salsa20 constant for 256-bit keys. var Sigma = [16]byte{'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'} @@ -31,76 +33,76 @@ func HSalsa20(out *[32]byte, in *[16]byte, k *[32]byte, c *[16]byte) { for i := 0; i < 20; i += 2 { u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) + x4 ^= bits.RotateLeft32(u, 7) u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) + x8 ^= bits.RotateLeft32(u, 9) u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) + x12 ^= bits.RotateLeft32(u, 13) u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) + x0 ^= bits.RotateLeft32(u, 18) u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) + x9 ^= bits.RotateLeft32(u, 7) u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) + x13 ^= bits.RotateLeft32(u, 9) u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) + x1 ^= bits.RotateLeft32(u, 13) u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) + x5 ^= bits.RotateLeft32(u, 18) u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) + x14 ^= bits.RotateLeft32(u, 7) u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) + x2 ^= bits.RotateLeft32(u, 9) u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) + x6 ^= bits.RotateLeft32(u, 13) u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) + x10 ^= bits.RotateLeft32(u, 18) u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) + x3 ^= bits.RotateLeft32(u, 7) u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) + x7 ^= bits.RotateLeft32(u, 9) u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) + x11 ^= bits.RotateLeft32(u, 13) u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) + x15 ^= bits.RotateLeft32(u, 18) u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) + x1 ^= bits.RotateLeft32(u, 7) u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) + x2 ^= bits.RotateLeft32(u, 9) u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) + x3 ^= bits.RotateLeft32(u, 13) u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) + x0 ^= bits.RotateLeft32(u, 18) u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) + x6 ^= bits.RotateLeft32(u, 7) u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) + x7 ^= bits.RotateLeft32(u, 9) u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) + x4 ^= bits.RotateLeft32(u, 13) u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) + x5 ^= bits.RotateLeft32(u, 18) u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) + x11 ^= bits.RotateLeft32(u, 7) u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) + x8 ^= bits.RotateLeft32(u, 9) u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) + x9 ^= bits.RotateLeft32(u, 13) u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) + x10 ^= bits.RotateLeft32(u, 18) u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) + x12 ^= bits.RotateLeft32(u, 7) u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) + x13 ^= bits.RotateLeft32(u, 9) u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) + x14 ^= bits.RotateLeft32(u, 13) u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) + x15 ^= bits.RotateLeft32(u, 18) } out[0] = byte(x0) out[1] = byte(x0 >> 8) diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go index 9bfc0927..7ec7bb39 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go @@ -4,6 +4,8 @@ package salsa +import "math/bits" + // Core208 applies the Salsa20/8 core function to the 64-byte array in and puts // the result into the 64-byte array out. The input and output may be the same array. func Core208(out *[64]byte, in *[64]byte) { @@ -29,76 +31,76 @@ func Core208(out *[64]byte, in *[64]byte) { for i := 0; i < 8; i += 2 { u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) + x4 ^= bits.RotateLeft32(u, 7) u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) + x8 ^= bits.RotateLeft32(u, 9) u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) + x12 ^= bits.RotateLeft32(u, 13) u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) + x0 ^= bits.RotateLeft32(u, 18) u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) + x9 ^= bits.RotateLeft32(u, 7) u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) + x13 ^= bits.RotateLeft32(u, 9) u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) + x1 ^= bits.RotateLeft32(u, 13) u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) + x5 ^= bits.RotateLeft32(u, 18) u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) + x14 ^= bits.RotateLeft32(u, 7) u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) + x2 ^= bits.RotateLeft32(u, 9) u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) + x6 ^= bits.RotateLeft32(u, 13) u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) + x10 ^= bits.RotateLeft32(u, 18) u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) + x3 ^= bits.RotateLeft32(u, 7) u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) + x7 ^= bits.RotateLeft32(u, 9) u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) + x11 ^= bits.RotateLeft32(u, 13) u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) + x15 ^= bits.RotateLeft32(u, 18) u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) + x1 ^= bits.RotateLeft32(u, 7) u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) + x2 ^= bits.RotateLeft32(u, 9) u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) + x3 ^= bits.RotateLeft32(u, 13) u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) + x0 ^= bits.RotateLeft32(u, 18) u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) + x6 ^= bits.RotateLeft32(u, 7) u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) + x7 ^= bits.RotateLeft32(u, 9) u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) + x4 ^= bits.RotateLeft32(u, 13) u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) + x5 ^= bits.RotateLeft32(u, 18) u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) + x11 ^= bits.RotateLeft32(u, 7) u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) + x8 ^= bits.RotateLeft32(u, 9) u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) + x9 ^= bits.RotateLeft32(u, 13) u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) + x10 ^= bits.RotateLeft32(u, 18) u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) + x12 ^= bits.RotateLeft32(u, 7) u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) + x13 ^= bits.RotateLeft32(u, 9) u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) + x14 ^= bits.RotateLeft32(u, 13) u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) + x15 ^= bits.RotateLeft32(u, 18) } x0 += j0 x1 += j1 diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go index 68169c6d..e5cdb9a2 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go @@ -4,6 +4,8 @@ package salsa +import "math/bits" + const rounds = 20 // core applies the Salsa20 core function to 16-byte input in, 32-byte key k, @@ -31,76 +33,76 @@ func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) { for i := 0; i < rounds; i += 2 { u := x0 + x12 - x4 ^= u<<7 | u>>(32-7) + x4 ^= bits.RotateLeft32(u, 7) u = x4 + x0 - x8 ^= u<<9 | u>>(32-9) + x8 ^= bits.RotateLeft32(u, 9) u = x8 + x4 - x12 ^= u<<13 | u>>(32-13) + x12 ^= bits.RotateLeft32(u, 13) u = x12 + x8 - x0 ^= u<<18 | u>>(32-18) + x0 ^= bits.RotateLeft32(u, 18) u = x5 + x1 - x9 ^= u<<7 | u>>(32-7) + x9 ^= bits.RotateLeft32(u, 7) u = x9 + x5 - x13 ^= u<<9 | u>>(32-9) + x13 ^= bits.RotateLeft32(u, 9) u = x13 + x9 - x1 ^= u<<13 | u>>(32-13) + x1 ^= bits.RotateLeft32(u, 13) u = x1 + x13 - x5 ^= u<<18 | u>>(32-18) + x5 ^= bits.RotateLeft32(u, 18) u = x10 + x6 - x14 ^= u<<7 | u>>(32-7) + x14 ^= bits.RotateLeft32(u, 7) u = x14 + x10 - x2 ^= u<<9 | u>>(32-9) + x2 ^= bits.RotateLeft32(u, 9) u = x2 + x14 - x6 ^= u<<13 | u>>(32-13) + x6 ^= bits.RotateLeft32(u, 13) u = x6 + x2 - x10 ^= u<<18 | u>>(32-18) + x10 ^= bits.RotateLeft32(u, 18) u = x15 + x11 - x3 ^= u<<7 | u>>(32-7) + x3 ^= bits.RotateLeft32(u, 7) u = x3 + x15 - x7 ^= u<<9 | u>>(32-9) + x7 ^= bits.RotateLeft32(u, 9) u = x7 + x3 - x11 ^= u<<13 | u>>(32-13) + x11 ^= bits.RotateLeft32(u, 13) u = x11 + x7 - x15 ^= u<<18 | u>>(32-18) + x15 ^= bits.RotateLeft32(u, 18) u = x0 + x3 - x1 ^= u<<7 | u>>(32-7) + x1 ^= bits.RotateLeft32(u, 7) u = x1 + x0 - x2 ^= u<<9 | u>>(32-9) + x2 ^= bits.RotateLeft32(u, 9) u = x2 + x1 - x3 ^= u<<13 | u>>(32-13) + x3 ^= bits.RotateLeft32(u, 13) u = x3 + x2 - x0 ^= u<<18 | u>>(32-18) + x0 ^= bits.RotateLeft32(u, 18) u = x5 + x4 - x6 ^= u<<7 | u>>(32-7) + x6 ^= bits.RotateLeft32(u, 7) u = x6 + x5 - x7 ^= u<<9 | u>>(32-9) + x7 ^= bits.RotateLeft32(u, 9) u = x7 + x6 - x4 ^= u<<13 | u>>(32-13) + x4 ^= bits.RotateLeft32(u, 13) u = x4 + x7 - x5 ^= u<<18 | u>>(32-18) + x5 ^= bits.RotateLeft32(u, 18) u = x10 + x9 - x11 ^= u<<7 | u>>(32-7) + x11 ^= bits.RotateLeft32(u, 7) u = x11 + x10 - x8 ^= u<<9 | u>>(32-9) + x8 ^= bits.RotateLeft32(u, 9) u = x8 + x11 - x9 ^= u<<13 | u>>(32-13) + x9 ^= bits.RotateLeft32(u, 13) u = x9 + x8 - x10 ^= u<<18 | u>>(32-18) + x10 ^= bits.RotateLeft32(u, 18) u = x15 + x14 - x12 ^= u<<7 | u>>(32-7) + x12 ^= bits.RotateLeft32(u, 7) u = x12 + x15 - x13 ^= u<<9 | u>>(32-9) + x13 ^= bits.RotateLeft32(u, 9) u = x13 + x12 - x14 ^= u<<13 | u>>(32-13) + x14 ^= bits.RotateLeft32(u, 13) u = x14 + x13 - x15 ^= u<<18 | u>>(32-18) + x15 ^= bits.RotateLeft32(u, 18) } x0 += j0 x1 += j1 diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go index 7a5ff2d2..c7964275 100644 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -10,6 +10,7 @@ import ( "fmt" "io" "math" + "strings" "sync" _ "crypto/sha1" @@ -118,6 +119,20 @@ func algorithmsForKeyFormat(keyFormat string) []string { } } +// supportedPubKeyAuthAlgos specifies the supported client public key +// authentication algorithms. Note that this doesn't include certificate types +// since those use the underlying algorithm. This list is sent to the client if +// it supports the server-sig-algs extension. Order is irrelevant. +var supportedPubKeyAuthAlgos = []string{ + KeyAlgoED25519, + KeyAlgoSKED25519, KeyAlgoSKECDSA256, + KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, + KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoRSA, + KeyAlgoDSA, +} + +var supportedPubKeyAuthAlgosList = strings.Join(supportedPubKeyAuthAlgos, ",") + // unexpectedMessageError results when the SSH message that we received didn't // match what we wanted. func unexpectedMessageError(expected, got uint8) error { diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go index 653dc4d2..2b84c357 100644 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -615,7 +615,8 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { return err } - if t.sessionID == nil { + firstKeyExchange := t.sessionID == nil + if firstKeyExchange { t.sessionID = result.H } result.SessionID = t.sessionID @@ -626,6 +627,24 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil { return err } + + // On the server side, after the first SSH_MSG_NEWKEYS, send a SSH_MSG_EXT_INFO + // message with the server-sig-algs extension if the client supports it. See + // RFC 8308, Sections 2.4 and 3.1. + if !isClient && firstKeyExchange && contains(clientInit.KexAlgos, "ext-info-c") { + extInfo := &extInfoMsg{ + NumExtensions: 1, + Payload: make([]byte, 0, 4+15+4+len(supportedPubKeyAuthAlgosList)), + } + extInfo.Payload = appendInt(extInfo.Payload, len("server-sig-algs")) + extInfo.Payload = append(extInfo.Payload, "server-sig-algs"...) + extInfo.Payload = appendInt(extInfo.Payload, len(supportedPubKeyAuthAlgosList)) + extInfo.Payload = append(extInfo.Payload, supportedPubKeyAuthAlgosList...) + if err := t.conn.writePacket(Marshal(extInfo)); err != nil { + return err + } + } + if packet, err := t.conn.readPacket(); err != nil { return err } else if packet[0] != msgNewKeys { diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go index 19bc67c4..922032d9 100644 --- a/vendor/golang.org/x/crypto/ssh/messages.go +++ b/vendor/golang.org/x/crypto/ssh/messages.go @@ -68,7 +68,7 @@ type kexInitMsg struct { // See RFC 4253, section 8. -// Diffie-Helman +// Diffie-Hellman const msgKexDHInit = 30 type kexDHInitMsg struct { diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 2260b20a..9e387029 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -291,15 +291,6 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) return perms, err } -func isAcceptableAlgo(algo string) bool { - switch algo { - case KeyAlgoRSA, KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoSKECDSA256, KeyAlgoED25519, KeyAlgoSKED25519, - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoSKECDSA256v01, CertAlgoED25519v01, CertAlgoSKED25519v01: - return true - } - return false -} - func checkSourceAddress(addr net.Addr, sourceAddrs string) error { if addr == nil { return errors.New("ssh: no address known for client, but source-address match required") @@ -514,7 +505,7 @@ userAuthLoop: return nil, parseError(msgUserAuthRequest) } algo := string(algoBytes) - if !isAcceptableAlgo(algo) { + if !contains(supportedPubKeyAuthAlgos, underlyingAlgo(algo)) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) break } @@ -572,7 +563,7 @@ userAuthLoop: // algorithm name that corresponds to algo with // sig.Format. This is usually the same, but // for certs, the names differ. - if !isAcceptableAlgo(sig.Format) { + if !contains(supportedPubKeyAuthAlgos, sig.Format) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index be3c7541..ae24a6fd 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -605,7 +605,10 @@ func (z *Tokenizer) readComment() { z.data.end = z.data.start } }() - for dashCount := 2; ; { + + var dashCount int + beginning := true + for { c := z.readByte() if z.err != nil { // Ignore up to two dashes at EOF. @@ -620,7 +623,7 @@ func (z *Tokenizer) readComment() { dashCount++ continue case '>': - if dashCount >= 2 { + if dashCount >= 2 || beginning { z.data.end = z.raw.end - len("-->") return } @@ -638,6 +641,7 @@ func (z *Tokenizer) readComment() { } } dashCount = 0 + beginning = false } } diff --git a/vendor/golang.org/x/net/http2/flow.go b/vendor/golang.org/x/net/http2/flow.go index b51f0e0c..750ac52f 100644 --- a/vendor/golang.org/x/net/http2/flow.go +++ b/vendor/golang.org/x/net/http2/flow.go @@ -6,23 +6,91 @@ package http2 -// flow is the flow control window's size. -type flow struct { +// inflowMinRefresh is the minimum number of bytes we'll send for a +// flow control window update. +const inflowMinRefresh = 4 << 10 + +// inflow accounts for an inbound flow control window. +// It tracks both the latest window sent to the peer (used for enforcement) +// and the accumulated unsent window. +type inflow struct { + avail int32 + unsent int32 +} + +// set sets the initial window. +func (f *inflow) init(n int32) { + f.avail = n +} + +// add adds n bytes to the window, with a maximum window size of max, +// indicating that the peer can now send us more data. +// For example, the user read from a {Request,Response} body and consumed +// some of the buffered data, so the peer can now send more. +// It returns the number of bytes to send in a WINDOW_UPDATE frame to the peer. +// Window updates are accumulated and sent when the unsent capacity +// is at least inflowMinRefresh or will at least double the peer's available window. +func (f *inflow) add(n int) (connAdd int32) { + if n < 0 { + panic("negative update") + } + unsent := int64(f.unsent) + int64(n) + // "A sender MUST NOT allow a flow-control window to exceed 2^31-1 octets." + // RFC 7540 Section 6.9.1. + const maxWindow = 1<<31 - 1 + if unsent+int64(f.avail) > maxWindow { + panic("flow control update exceeds maximum window size") + } + f.unsent = int32(unsent) + if f.unsent < inflowMinRefresh && f.unsent < f.avail { + // If there aren't at least inflowMinRefresh bytes of window to send, + // and this update won't at least double the window, buffer the update for later. + return 0 + } + f.avail += f.unsent + f.unsent = 0 + return int32(unsent) +} + +// take attempts to take n bytes from the peer's flow control window. +// It reports whether the window has available capacity. +func (f *inflow) take(n uint32) bool { + if n > uint32(f.avail) { + return false + } + f.avail -= int32(n) + return true +} + +// takeInflows attempts to take n bytes from two inflows, +// typically connection-level and stream-level flows. +// It reports whether both windows have available capacity. +func takeInflows(f1, f2 *inflow, n uint32) bool { + if n > uint32(f1.avail) || n > uint32(f2.avail) { + return false + } + f1.avail -= int32(n) + f2.avail -= int32(n) + return true +} + +// outflow is the outbound flow control window's size. +type outflow struct { _ incomparable // n is the number of DATA bytes we're allowed to send. - // A flow is kept both on a conn and a per-stream. + // An outflow is kept both on a conn and a per-stream. n int32 - // conn points to the shared connection-level flow that is - // shared by all streams on that conn. It is nil for the flow + // conn points to the shared connection-level outflow that is + // shared by all streams on that conn. It is nil for the outflow // that's on the conn directly. - conn *flow + conn *outflow } -func (f *flow) setConnFlow(cf *flow) { f.conn = cf } +func (f *outflow) setConnFlow(cf *outflow) { f.conn = cf } -func (f *flow) available() int32 { +func (f *outflow) available() int32 { n := f.n if f.conn != nil && f.conn.n < n { n = f.conn.n @@ -30,7 +98,7 @@ func (f *flow) available() int32 { return n } -func (f *flow) take(n int32) { +func (f *outflow) take(n int32) { if n > f.available() { panic("internal error: took too much") } @@ -42,7 +110,7 @@ func (f *flow) take(n int32) { // add adds n bytes (positive or negative) to the flow control window. // It returns false if the sum would exceed 2^31-1. -func (f *flow) add(n int32) bool { +func (f *outflow) add(n int32) bool { sum := f.n + n if (sum > n) == (f.n > 0) { f.n = sum diff --git a/vendor/golang.org/x/net/http2/h2c/h2c.go b/vendor/golang.org/x/net/http2/h2c/h2c.go index 2b77ffda..a72bbed1 100644 --- a/vendor/golang.org/x/net/http2/h2c/h2c.go +++ b/vendor/golang.org/x/net/http2/h2c/h2c.go @@ -109,6 +109,7 @@ func (s h2cHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if http2VerboseLogs { log.Printf("h2c: error h2c upgrade: %v", err) } + w.WriteHeader(http.StatusInternalServerError) return } defer conn.Close() @@ -167,7 +168,10 @@ func h2cUpgrade(w http.ResponseWriter, r *http.Request) (_ net.Conn, settings [] return nil, nil, errors.New("h2c: connection does not support Hijack") } - body, _ := io.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) + if err != nil { + return nil, nil, err + } r.Body = io.NopCloser(bytes.NewBuffer(body)) conn, rw, err := hijacker.Hijack() diff --git a/vendor/golang.org/x/net/http2/headermap.go b/vendor/golang.org/x/net/http2/headermap.go index 9e12941d..149b3dd2 100644 --- a/vendor/golang.org/x/net/http2/headermap.go +++ b/vendor/golang.org/x/net/http2/headermap.go @@ -27,7 +27,14 @@ func buildCommonHeaderMaps() { "accept-language", "accept-ranges", "age", + "access-control-allow-credentials", + "access-control-allow-headers", + "access-control-allow-methods", "access-control-allow-origin", + "access-control-expose-headers", + "access-control-max-age", + "access-control-request-headers", + "access-control-request-method", "allow", "authorization", "cache-control", @@ -53,6 +60,7 @@ func buildCommonHeaderMaps() { "link", "location", "max-forwards", + "origin", "proxy-authenticate", "proxy-authorization", "range", @@ -68,6 +76,8 @@ func buildCommonHeaderMaps() { "vary", "via", "www-authenticate", + "x-forwarded-for", + "x-forwarded-proto", } commonLowerHeader = make(map[string]string, len(common)) commonCanonHeader = make(map[string]string, len(common)) @@ -85,3 +95,11 @@ func lowerHeader(v string) (lower string, ascii bool) { } return asciiToLower(v) } + +func canonicalHeader(v string) string { + buildCommonHeaderMapsOnce() + if s, ok := commonCanonHeader[v]; ok { + return s + } + return http.CanonicalHeaderKey(v) +} diff --git a/vendor/golang.org/x/net/http2/hpack/encode.go b/vendor/golang.org/x/net/http2/hpack/encode.go index 6886dc16..46219da2 100644 --- a/vendor/golang.org/x/net/http2/hpack/encode.go +++ b/vendor/golang.org/x/net/http2/hpack/encode.go @@ -116,6 +116,11 @@ func (e *Encoder) SetMaxDynamicTableSize(v uint32) { e.dynTab.setMaxSize(v) } +// MaxDynamicTableSize returns the current dynamic header table size. +func (e *Encoder) MaxDynamicTableSize() (v uint32) { + return e.dynTab.maxSize +} + // SetMaxDynamicTableSizeLimit changes the maximum value that can be // specified in SetMaxDynamicTableSize to v. By default, it is set to // 4096, which is the same size of the default dynamic header table diff --git a/vendor/golang.org/x/net/http2/hpack/static_table.go b/vendor/golang.org/x/net/http2/hpack/static_table.go new file mode 100644 index 00000000..754a1eb9 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/static_table.go @@ -0,0 +1,188 @@ +// go generate gen.go +// Code generated by the command above; DO NOT EDIT. + +package hpack + +var staticTable = &headerFieldTable{ + evictCount: 0, + byName: map[string]uint64{ + ":authority": 1, + ":method": 3, + ":path": 5, + ":scheme": 7, + ":status": 14, + "accept-charset": 15, + "accept-encoding": 16, + "accept-language": 17, + "accept-ranges": 18, + "accept": 19, + "access-control-allow-origin": 20, + "age": 21, + "allow": 22, + "authorization": 23, + "cache-control": 24, + "content-disposition": 25, + "content-encoding": 26, + "content-language": 27, + "content-length": 28, + "content-location": 29, + "content-range": 30, + "content-type": 31, + "cookie": 32, + "date": 33, + "etag": 34, + "expect": 35, + "expires": 36, + "from": 37, + "host": 38, + "if-match": 39, + "if-modified-since": 40, + "if-none-match": 41, + "if-range": 42, + "if-unmodified-since": 43, + "last-modified": 44, + "link": 45, + "location": 46, + "max-forwards": 47, + "proxy-authenticate": 48, + "proxy-authorization": 49, + "range": 50, + "referer": 51, + "refresh": 52, + "retry-after": 53, + "server": 54, + "set-cookie": 55, + "strict-transport-security": 56, + "transfer-encoding": 57, + "user-agent": 58, + "vary": 59, + "via": 60, + "www-authenticate": 61, + }, + byNameValue: map[pairNameValue]uint64{ + {name: ":authority", value: ""}: 1, + {name: ":method", value: "GET"}: 2, + {name: ":method", value: "POST"}: 3, + {name: ":path", value: "/"}: 4, + {name: ":path", value: "/index.html"}: 5, + {name: ":scheme", value: "http"}: 6, + {name: ":scheme", value: "https"}: 7, + {name: ":status", value: "200"}: 8, + {name: ":status", value: "204"}: 9, + {name: ":status", value: "206"}: 10, + {name: ":status", value: "304"}: 11, + {name: ":status", value: "400"}: 12, + {name: ":status", value: "404"}: 13, + {name: ":status", value: "500"}: 14, + {name: "accept-charset", value: ""}: 15, + {name: "accept-encoding", value: "gzip, deflate"}: 16, + {name: "accept-language", value: ""}: 17, + {name: "accept-ranges", value: ""}: 18, + {name: "accept", value: ""}: 19, + {name: "access-control-allow-origin", value: ""}: 20, + {name: "age", value: ""}: 21, + {name: "allow", value: ""}: 22, + {name: "authorization", value: ""}: 23, + {name: "cache-control", value: ""}: 24, + {name: "content-disposition", value: ""}: 25, + {name: "content-encoding", value: ""}: 26, + {name: "content-language", value: ""}: 27, + {name: "content-length", value: ""}: 28, + {name: "content-location", value: ""}: 29, + {name: "content-range", value: ""}: 30, + {name: "content-type", value: ""}: 31, + {name: "cookie", value: ""}: 32, + {name: "date", value: ""}: 33, + {name: "etag", value: ""}: 34, + {name: "expect", value: ""}: 35, + {name: "expires", value: ""}: 36, + {name: "from", value: ""}: 37, + {name: "host", value: ""}: 38, + {name: "if-match", value: ""}: 39, + {name: "if-modified-since", value: ""}: 40, + {name: "if-none-match", value: ""}: 41, + {name: "if-range", value: ""}: 42, + {name: "if-unmodified-since", value: ""}: 43, + {name: "last-modified", value: ""}: 44, + {name: "link", value: ""}: 45, + {name: "location", value: ""}: 46, + {name: "max-forwards", value: ""}: 47, + {name: "proxy-authenticate", value: ""}: 48, + {name: "proxy-authorization", value: ""}: 49, + {name: "range", value: ""}: 50, + {name: "referer", value: ""}: 51, + {name: "refresh", value: ""}: 52, + {name: "retry-after", value: ""}: 53, + {name: "server", value: ""}: 54, + {name: "set-cookie", value: ""}: 55, + {name: "strict-transport-security", value: ""}: 56, + {name: "transfer-encoding", value: ""}: 57, + {name: "user-agent", value: ""}: 58, + {name: "vary", value: ""}: 59, + {name: "via", value: ""}: 60, + {name: "www-authenticate", value: ""}: 61, + }, + ents: []HeaderField{ + {Name: ":authority", Value: "", Sensitive: false}, + {Name: ":method", Value: "GET", Sensitive: false}, + {Name: ":method", Value: "POST", Sensitive: false}, + {Name: ":path", Value: "/", Sensitive: false}, + {Name: ":path", Value: "/index.html", Sensitive: false}, + {Name: ":scheme", Value: "http", Sensitive: false}, + {Name: ":scheme", Value: "https", Sensitive: false}, + {Name: ":status", Value: "200", Sensitive: false}, + {Name: ":status", Value: "204", Sensitive: false}, + {Name: ":status", Value: "206", Sensitive: false}, + {Name: ":status", Value: "304", Sensitive: false}, + {Name: ":status", Value: "400", Sensitive: false}, + {Name: ":status", Value: "404", Sensitive: false}, + {Name: ":status", Value: "500", Sensitive: false}, + {Name: "accept-charset", Value: "", Sensitive: false}, + {Name: "accept-encoding", Value: "gzip, deflate", Sensitive: false}, + {Name: "accept-language", Value: "", Sensitive: false}, + {Name: "accept-ranges", Value: "", Sensitive: false}, + {Name: "accept", Value: "", Sensitive: false}, + {Name: "access-control-allow-origin", Value: "", Sensitive: false}, + {Name: "age", Value: "", Sensitive: false}, + {Name: "allow", Value: "", Sensitive: false}, + {Name: "authorization", Value: "", Sensitive: false}, + {Name: "cache-control", Value: "", Sensitive: false}, + {Name: "content-disposition", Value: "", Sensitive: false}, + {Name: "content-encoding", Value: "", Sensitive: false}, + {Name: "content-language", Value: "", Sensitive: false}, + {Name: "content-length", Value: "", Sensitive: false}, + {Name: "content-location", Value: "", Sensitive: false}, + {Name: "content-range", Value: "", Sensitive: false}, + {Name: "content-type", Value: "", Sensitive: false}, + {Name: "cookie", Value: "", Sensitive: false}, + {Name: "date", Value: "", Sensitive: false}, + {Name: "etag", Value: "", Sensitive: false}, + {Name: "expect", Value: "", Sensitive: false}, + {Name: "expires", Value: "", Sensitive: false}, + {Name: "from", Value: "", Sensitive: false}, + {Name: "host", Value: "", Sensitive: false}, + {Name: "if-match", Value: "", Sensitive: false}, + {Name: "if-modified-since", Value: "", Sensitive: false}, + {Name: "if-none-match", Value: "", Sensitive: false}, + {Name: "if-range", Value: "", Sensitive: false}, + {Name: "if-unmodified-since", Value: "", Sensitive: false}, + {Name: "last-modified", Value: "", Sensitive: false}, + {Name: "link", Value: "", Sensitive: false}, + {Name: "location", Value: "", Sensitive: false}, + {Name: "max-forwards", Value: "", Sensitive: false}, + {Name: "proxy-authenticate", Value: "", Sensitive: false}, + {Name: "proxy-authorization", Value: "", Sensitive: false}, + {Name: "range", Value: "", Sensitive: false}, + {Name: "referer", Value: "", Sensitive: false}, + {Name: "refresh", Value: "", Sensitive: false}, + {Name: "retry-after", Value: "", Sensitive: false}, + {Name: "server", Value: "", Sensitive: false}, + {Name: "set-cookie", Value: "", Sensitive: false}, + {Name: "strict-transport-security", Value: "", Sensitive: false}, + {Name: "transfer-encoding", Value: "", Sensitive: false}, + {Name: "user-agent", Value: "", Sensitive: false}, + {Name: "vary", Value: "", Sensitive: false}, + {Name: "via", Value: "", Sensitive: false}, + {Name: "www-authenticate", Value: "", Sensitive: false}, + }, +} diff --git a/vendor/golang.org/x/net/http2/hpack/tables.go b/vendor/golang.org/x/net/http2/hpack/tables.go index a66cfbea..8cbdf3f0 100644 --- a/vendor/golang.org/x/net/http2/hpack/tables.go +++ b/vendor/golang.org/x/net/http2/hpack/tables.go @@ -96,8 +96,7 @@ func (t *headerFieldTable) evictOldest(n int) { // meaning t.ents is reversed for dynamic tables. Hence, when t is a dynamic // table, the return value i actually refers to the entry t.ents[t.len()-i]. // -// All tables are assumed to be a dynamic tables except for the global -// staticTable pointer. +// All tables are assumed to be a dynamic tables except for the global staticTable. // // See Section 2.3.3. func (t *headerFieldTable) search(f HeaderField) (i uint64, nameValueMatch bool) { @@ -125,81 +124,6 @@ func (t *headerFieldTable) idToIndex(id uint64) uint64 { return k + 1 } -// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B -var staticTable = newStaticTable() -var staticTableEntries = [...]HeaderField{ - {Name: ":authority"}, - {Name: ":method", Value: "GET"}, - {Name: ":method", Value: "POST"}, - {Name: ":path", Value: "/"}, - {Name: ":path", Value: "/index.html"}, - {Name: ":scheme", Value: "http"}, - {Name: ":scheme", Value: "https"}, - {Name: ":status", Value: "200"}, - {Name: ":status", Value: "204"}, - {Name: ":status", Value: "206"}, - {Name: ":status", Value: "304"}, - {Name: ":status", Value: "400"}, - {Name: ":status", Value: "404"}, - {Name: ":status", Value: "500"}, - {Name: "accept-charset"}, - {Name: "accept-encoding", Value: "gzip, deflate"}, - {Name: "accept-language"}, - {Name: "accept-ranges"}, - {Name: "accept"}, - {Name: "access-control-allow-origin"}, - {Name: "age"}, - {Name: "allow"}, - {Name: "authorization"}, - {Name: "cache-control"}, - {Name: "content-disposition"}, - {Name: "content-encoding"}, - {Name: "content-language"}, - {Name: "content-length"}, - {Name: "content-location"}, - {Name: "content-range"}, - {Name: "content-type"}, - {Name: "cookie"}, - {Name: "date"}, - {Name: "etag"}, - {Name: "expect"}, - {Name: "expires"}, - {Name: "from"}, - {Name: "host"}, - {Name: "if-match"}, - {Name: "if-modified-since"}, - {Name: "if-none-match"}, - {Name: "if-range"}, - {Name: "if-unmodified-since"}, - {Name: "last-modified"}, - {Name: "link"}, - {Name: "location"}, - {Name: "max-forwards"}, - {Name: "proxy-authenticate"}, - {Name: "proxy-authorization"}, - {Name: "range"}, - {Name: "referer"}, - {Name: "refresh"}, - {Name: "retry-after"}, - {Name: "server"}, - {Name: "set-cookie"}, - {Name: "strict-transport-security"}, - {Name: "transfer-encoding"}, - {Name: "user-agent"}, - {Name: "vary"}, - {Name: "via"}, - {Name: "www-authenticate"}, -} - -func newStaticTable() *headerFieldTable { - t := &headerFieldTable{} - t.init() - for _, e := range staticTableEntries[:] { - t.addEntry(e) - } - return t -} - var huffmanCodes = [256]uint32{ 0x1ff8, 0x7fffd8, diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 43cc2a34..b624dc0a 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -98,6 +98,19 @@ type Server struct { // the HTTP/2 spec's recommendations. MaxConcurrentStreams uint32 + // MaxDecoderHeaderTableSize optionally specifies the http2 + // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It + // informs the remote endpoint of the maximum size of the header compression + // table used to decode header blocks, in octets. If zero, the default value + // of 4096 is used. + MaxDecoderHeaderTableSize uint32 + + // MaxEncoderHeaderTableSize optionally specifies an upper limit for the + // header compression table used for encoding request headers. Received + // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero, + // the default value of 4096 is used. + MaxEncoderHeaderTableSize uint32 + // MaxReadFrameSize optionally specifies the largest frame // this server is willing to read. A valid value is between // 16k and 16M, inclusive. If zero or otherwise invalid, a @@ -170,6 +183,20 @@ func (s *Server) maxConcurrentStreams() uint32 { return defaultMaxStreams } +func (s *Server) maxDecoderHeaderTableSize() uint32 { + if v := s.MaxDecoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + +func (s *Server) maxEncoderHeaderTableSize() uint32 { + if v := s.MaxEncoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + // maxQueuedControlFrames is the maximum number of control frames like // SETTINGS, PING and RST_STREAM that will be queued for writing before // the connection is closed to prevent memory exhaustion attacks. @@ -394,7 +421,6 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { advMaxStreams: s.maxConcurrentStreams(), initialStreamSendWindowSize: initialWindowSize, maxFrameSize: initialMaxFrameSize, - headerTableSize: initialHeaderTableSize, serveG: newGoroutineLock(), pushEnabled: true, sawClientPreface: opts.SawClientPreface, @@ -422,14 +448,15 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { // configured value for inflow, that will be updated when we send a // WINDOW_UPDATE shortly after sending SETTINGS. sc.flow.add(initialWindowSize) - sc.inflow.add(initialWindowSize) + sc.inflow.init(initialWindowSize) sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) + sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize()) fr := NewFramer(sc.bw, c) if s.CountError != nil { fr.countError = s.CountError } - fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil) fr.MaxHeaderListSize = sc.maxHeaderListSize() fr.SetMaxReadFrameSize(s.maxReadFrameSize()) sc.framer = fr @@ -536,8 +563,8 @@ type serverConn struct { wroteFrameCh chan frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes bodyReadCh chan bodyReadMsg // from handlers -> serve serveMsgCh chan interface{} // misc messages & code to send to / run on the serve loop - flow flow // conn-wide (not stream-specific) outbound flow control - inflow flow // conn-wide inbound flow control + flow outflow // conn-wide (not stream-specific) outbound flow control + inflow inflow // conn-wide inbound flow control tlsState *tls.ConnectionState // shared by all handlers, like net/http remoteAddrStr string writeSched WriteScheduler @@ -559,9 +586,9 @@ type serverConn struct { streams map[uint32]*stream initialStreamSendWindowSize int32 maxFrameSize int32 - headerTableSize uint32 peerMaxHeaderListSize uint32 // zero means unknown (default) canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case + canonHeaderKeysSize int // canonHeader keys size in bytes writingFrame bool // started writing a frame (on serve goroutine or separate) writingFrameAsync bool // started a frame on its own goroutine but haven't heard back on wroteFrameCh needsFrameFlush bool // last frame write wasn't a flush @@ -614,15 +641,17 @@ type stream struct { cancelCtx func() // owned by serverConn's serve loop: - bodyBytes int64 // body bytes seen so far - declBodyBytes int64 // or -1 if undeclared - flow flow // limits writing from Handler to client - inflow flow // what the client is allowed to POST/etc to us + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow outflow // limits writing from Handler to client + inflow inflow // what the client is allowed to POST/etc to us state streamState resetQueued bool // RST_STREAM queued for write; set by sc.resetStream gotTrailerHeader bool // HEADER frame for trailers was seen wroteHeaders bool // whether we wrote headers (not status 100) + readDeadline *time.Timer // nil if unused writeDeadline *time.Timer // nil if unused + closeErr error // set before cw is closed trailer http.Header // accumulated trailers reqTrailer http.Header // handler's Request.Trailer @@ -738,6 +767,13 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) { } } +// maxCachedCanonicalHeadersKeysSize is an arbitrarily-chosen limit on the size +// of the entries in the canonHeader cache. +// This should be larger than the size of unique, uncommon header keys likely to +// be sent by the peer, while not so high as to permit unreasonable memory usage +// if the peer sends an unbounded number of unique header keys. +const maxCachedCanonicalHeadersKeysSize = 2048 + func (sc *serverConn) canonicalHeader(v string) string { sc.serveG.check() buildCommonHeaderMapsOnce() @@ -753,14 +789,10 @@ func (sc *serverConn) canonicalHeader(v string) string { sc.canonHeader = make(map[string]string) } cv = http.CanonicalHeaderKey(v) - // maxCachedCanonicalHeaders is an arbitrarily-chosen limit on the number of - // entries in the canonHeader cache. This should be larger than the number - // of unique, uncommon header keys likely to be sent by the peer, while not - // so high as to permit unreasonable memory usage if the peer sends an unbounded - // number of unique header keys. - const maxCachedCanonicalHeaders = 32 - if len(sc.canonHeader) < maxCachedCanonicalHeaders { + size := 100 + len(v)*2 // 100 bytes of map overhead + key + value + if sc.canonHeaderKeysSize+size <= maxCachedCanonicalHeadersKeysSize { sc.canonHeader[v] = cv + sc.canonHeaderKeysSize += size } return cv } @@ -862,6 +894,7 @@ func (sc *serverConn) serve() { {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, {SettingMaxConcurrentStreams, sc.advMaxStreams}, {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, + {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()}, {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())}, }, }) @@ -869,7 +902,9 @@ func (sc *serverConn) serve() { // Each connection starts with initialWindowSize inflow tokens. // If a higher value is configured, we add more tokens. - sc.sendWindowUpdate(nil) + if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 { + sc.sendWindowUpdate(nil, int(diff)) + } if err := sc.readPreface(); err != nil { sc.condlogf(err, "http2: server: error reading preface from client %v: %v", sc.conn.RemoteAddr(), err) @@ -946,6 +981,8 @@ func (sc *serverConn) serve() { } case *startPushRequest: sc.startPush(v) + case func(*serverConn): + v(sc) default: panic(fmt.Sprintf("unexpected type %T", v)) } @@ -1459,6 +1496,21 @@ func (sc *serverConn) processFrame(f Frame) error { sc.sawFirstSettings = true } + // Discard frames for streams initiated after the identified last + // stream sent in a GOAWAY, or all frames after sending an error. + // We still need to return connection-level flow control for DATA frames. + // RFC 9113 Section 6.8. + if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || f.Header().StreamID > sc.maxClientStreamID) { + + if f, ok := f.(*DataFrame); ok { + if !sc.inflow.take(f.Length) { + return sc.countError("data_flow", streamError(f.Header().StreamID, ErrCodeFlowControl)) + } + sc.sendWindowUpdate(nil, int(f.Length)) // conn-level + } + return nil + } + switch f := f.(type) { case *SettingsFrame: return sc.processSettings(f) @@ -1501,9 +1553,6 @@ func (sc *serverConn) processPing(f *PingFrame) error { // PROTOCOL_ERROR." return sc.countError("ping_on_stream", ConnectionError(ErrCodeProtocol)) } - if sc.inGoAway && sc.goAwayCode != ErrCodeNo { - return nil - } sc.writeFrame(FrameWriteRequest{write: writePingAck{f}}) return nil } @@ -1565,6 +1614,9 @@ func (sc *serverConn) closeStream(st *stream, err error) { panic(fmt.Sprintf("invariant; can't close stream in state %v", st.state)) } st.state = stateClosed + if st.readDeadline != nil { + st.readDeadline.Stop() + } if st.writeDeadline != nil { st.writeDeadline.Stop() } @@ -1586,10 +1638,18 @@ func (sc *serverConn) closeStream(st *stream, err error) { if p := st.body; p != nil { // Return any buffered unread bytes worth of conn-level flow control. // See golang.org/issue/16481 - sc.sendWindowUpdate(nil) + sc.sendWindowUpdate(nil, p.Len()) p.CloseWithError(err) } + if e, ok := err.(StreamError); ok { + if e.Cause != nil { + err = e.Cause + } else { + err = errStreamClosed + } + } + st.closeErr = err st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc sc.writeSched.CloseStream(st.id) } @@ -1632,7 +1692,6 @@ func (sc *serverConn) processSetting(s Setting) error { } switch s.ID { case SettingHeaderTableSize: - sc.headerTableSize = s.Val sc.hpackEncoder.SetMaxDynamicTableSize(s.Val) case SettingEnablePush: sc.pushEnabled = s.Val != 0 @@ -1686,16 +1745,6 @@ func (sc *serverConn) processSettingInitialWindowSize(val uint32) error { func (sc *serverConn) processData(f *DataFrame) error { sc.serveG.check() id := f.Header().StreamID - if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || id > sc.maxClientStreamID) { - // Discard all DATA frames if the GOAWAY is due to an - // error, or: - // - // Section 6.8: After sending a GOAWAY frame, the sender - // can discard frames for streams initiated by the - // receiver with identifiers higher than the identified - // last stream. - return nil - } data := f.Data() state, st := sc.state(id) @@ -1726,15 +1775,10 @@ func (sc *serverConn) processData(f *DataFrame) error { // But still enforce their connection-level flow control, // and return any flow control bytes since we're not going // to consume them. - if sc.inflow.available() < int32(f.Length) { + if !sc.inflow.take(f.Length) { return sc.countError("data_flow", streamError(id, ErrCodeFlowControl)) } - // Deduct the flow control from inflow, since we're - // going to immediately add it back in - // sendWindowUpdate, which also schedules sending the - // frames. - sc.inflow.take(int32(f.Length)) - sc.sendWindowUpdate(nil) // conn-level + sc.sendWindowUpdate(nil, int(f.Length)) // conn-level if st != nil && st.resetQueued { // Already have a stream error in flight. Don't send another. @@ -1748,11 +1792,10 @@ func (sc *serverConn) processData(f *DataFrame) error { // Sender sending more than they'd declared? if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes { - if sc.inflow.available() < int32(f.Length) { + if !sc.inflow.take(f.Length) { return sc.countError("data_flow", streamError(id, ErrCodeFlowControl)) } - sc.inflow.take(int32(f.Length)) - sc.sendWindowUpdate(nil) // conn-level + sc.sendWindowUpdate(nil, int(f.Length)) // conn-level st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes)) // RFC 7540, sec 8.1.2.6: A request or response is also malformed if the @@ -1762,15 +1805,14 @@ func (sc *serverConn) processData(f *DataFrame) error { } if f.Length > 0 { // Check whether the client has flow control quota. - if st.inflow.available() < int32(f.Length) { + if !takeInflows(&sc.inflow, &st.inflow, f.Length) { return sc.countError("flow_on_data_length", streamError(id, ErrCodeFlowControl)) } - st.inflow.take(int32(f.Length)) if len(data) > 0 { wrote, err := st.body.Write(data) if err != nil { - sc.sendWindowUpdate32(nil, int32(f.Length)-int32(wrote)) + sc.sendWindowUpdate(nil, int(f.Length)-wrote) return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed)) } if wrote != len(data) { @@ -1781,10 +1823,12 @@ func (sc *serverConn) processData(f *DataFrame) error { // Return any padded flow control now, since we won't // refund it later on body reads. - if pad := int32(f.Length) - int32(len(data)); pad > 0 { - sc.sendWindowUpdate32(nil, pad) - sc.sendWindowUpdate32(st, pad) - } + // Call sendWindowUpdate even if there is no padding, + // to return buffered flow control credit if the sent + // window has shrunk. + pad := int32(f.Length) - int32(len(data)) + sc.sendWindowUpdate32(nil, pad) + sc.sendWindowUpdate32(st, pad) } if f.StreamEnded() { st.endStream() @@ -1838,19 +1882,27 @@ func (st *stream) copyTrailersToHandlerRequest() { } } +// onReadTimeout is run on its own goroutine (from time.AfterFunc) +// when the stream's ReadTimeout has fired. +func (st *stream) onReadTimeout() { + // Wrap the ErrDeadlineExceeded to avoid callers depending on us + // returning the bare error. + st.body.CloseWithError(fmt.Errorf("%w", os.ErrDeadlineExceeded)) +} + // onWriteTimeout is run on its own goroutine (from time.AfterFunc) // when the stream's WriteTimeout has fired. func (st *stream) onWriteTimeout() { - st.sc.writeFrameFromHandler(FrameWriteRequest{write: streamError(st.id, ErrCodeInternal)}) + st.sc.writeFrameFromHandler(FrameWriteRequest{write: StreamError{ + StreamID: st.id, + Code: ErrCodeInternal, + Cause: os.ErrDeadlineExceeded, + }}) } func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { sc.serveG.check() id := f.StreamID - if sc.inGoAway { - // Ignore. - return nil - } // http://tools.ietf.org/html/rfc7540#section-5.1.1 // Streams initiated by a client MUST use odd-numbered stream // identifiers. [...] An endpoint that receives an unexpected @@ -1953,6 +2005,9 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // (in Go 1.8), though. That's a more sane option anyway. if sc.hs.ReadTimeout != 0 { sc.conn.SetReadDeadline(time.Time{}) + if st.body != nil { + st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) + } } go sc.runHandler(rw, req, handler) @@ -2021,9 +2076,6 @@ func (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error { } func (sc *serverConn) processPriority(f *PriorityFrame) error { - if sc.inGoAway { - return nil - } if err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil { return err } @@ -2048,8 +2100,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.cw.Init() st.flow.conn = &sc.flow // link to conn-level counter st.flow.add(sc.initialStreamSendWindowSize) - st.inflow.conn = &sc.inflow // link to conn-level counter - st.inflow.add(sc.srv.initialStreamRecvWindowSize()) + st.inflow.init(sc.srv.initialStreamRecvWindowSize()) if sc.hs.WriteTimeout != 0 { st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } @@ -2322,71 +2373,37 @@ func (sc *serverConn) noteBodyReadFromHandler(st *stream, n int, err error) { func (sc *serverConn) noteBodyRead(st *stream, n int) { sc.serveG.check() - sc.sendWindowUpdate(nil) // conn-level + sc.sendWindowUpdate(nil, n) // conn-level if st.state != stateHalfClosedRemote && st.state != stateClosed { // Don't send this WINDOW_UPDATE if the stream is closed // remotely. - sc.sendWindowUpdate(st) + sc.sendWindowUpdate(st, n) } } -// st may be nil for conn-level -func (sc *serverConn) sendWindowUpdate(st *stream) { - sc.serveG.check() - - var n int32 - if st == nil { - if avail, windowSize := sc.inflow.available(), sc.srv.initialConnRecvWindowSize(); avail > windowSize/2 { - return - } else { - n = windowSize - avail - } - } else { - if avail, windowSize := st.inflow.available(), sc.srv.initialStreamRecvWindowSize(); avail > windowSize/2 { - return - } else { - n = windowSize - avail - } - } - // "The legal range for the increment to the flow control - // window is 1 to 2^31-1 (2,147,483,647) octets." - // A Go Read call on 64-bit machines could in theory read - // a larger Read than this. Very unlikely, but we handle it here - // rather than elsewhere for now. - const maxUint31 = 1<<31 - 1 - for n >= maxUint31 { - sc.sendWindowUpdate32(st, maxUint31) - n -= maxUint31 - } - sc.sendWindowUpdate32(st, int32(n)) -} - // st may be nil for conn-level func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) { + sc.sendWindowUpdate(st, int(n)) +} + +// st may be nil for conn-level +func (sc *serverConn) sendWindowUpdate(st *stream, n int) { sc.serveG.check() - if n == 0 { + var streamID uint32 + var send int32 + if st == nil { + send = sc.inflow.add(n) + } else { + streamID = st.id + send = st.inflow.add(n) + } + if send == 0 { return } - if n < 0 { - panic("negative update") - } - var streamID uint32 - if st != nil { - streamID = st.id - } sc.writeFrame(FrameWriteRequest{ - write: writeWindowUpdate{streamID: streamID, n: uint32(n)}, + write: writeWindowUpdate{streamID: streamID, n: uint32(send)}, stream: st, }) - var ok bool - if st == nil { - ok = sc.inflow.add(n) - } else { - ok = st.inflow.add(n) - } - if !ok { - panic("internal error; sent too many window updates without decrements?") - } } // requestBody is the Handler's Request.Body type. @@ -2474,7 +2491,15 @@ type responseWriterState struct { type chunkWriter struct{ rws *responseWriterState } -func (cw chunkWriter) Write(p []byte) (n int, err error) { return cw.rws.writeChunk(p) } +func (cw chunkWriter) Write(p []byte) (n int, err error) { + n, err = cw.rws.writeChunk(p) + if err == errStreamClosed { + // If writing failed because the stream has been closed, + // return the reason it was closed. + err = cw.rws.stream.closeErr + } + return n, err +} func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) > 0 } @@ -2668,23 +2693,85 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() { } } +func (w *responseWriter) SetReadDeadline(deadline time.Time) error { + st := w.rws.stream + if !deadline.IsZero() && deadline.Before(time.Now()) { + // If we're setting a deadline in the past, reset the stream immediately + // so writes after SetWriteDeadline returns will fail. + st.onReadTimeout() + return nil + } + w.rws.conn.sendServeMsg(func(sc *serverConn) { + if st.readDeadline != nil { + if !st.readDeadline.Stop() { + // Deadline already exceeded, or stream has been closed. + return + } + } + if deadline.IsZero() { + st.readDeadline = nil + } else if st.readDeadline == nil { + st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout) + } else { + st.readDeadline.Reset(deadline.Sub(time.Now())) + } + }) + return nil +} + +func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { + st := w.rws.stream + if !deadline.IsZero() && deadline.Before(time.Now()) { + // If we're setting a deadline in the past, reset the stream immediately + // so writes after SetWriteDeadline returns will fail. + st.onWriteTimeout() + return nil + } + w.rws.conn.sendServeMsg(func(sc *serverConn) { + if st.writeDeadline != nil { + if !st.writeDeadline.Stop() { + // Deadline already exceeded, or stream has been closed. + return + } + } + if deadline.IsZero() { + st.writeDeadline = nil + } else if st.writeDeadline == nil { + st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout) + } else { + st.writeDeadline.Reset(deadline.Sub(time.Now())) + } + }) + return nil +} + func (w *responseWriter) Flush() { + w.FlushError() +} + +func (w *responseWriter) FlushError() error { rws := w.rws if rws == nil { panic("Header called after Handler finished") } + var err error if rws.bw.Buffered() > 0 { - if err := rws.bw.Flush(); err != nil { - // Ignore the error. The frame writer already knows. - return - } + err = rws.bw.Flush() } else { // The bufio.Writer won't call chunkWriter.Write // (writeChunk with zero bytes, so we have to do it // ourselves to force the HTTP response header and/or // final DATA frame (with END_STREAM) to be sent. - rws.writeChunk(nil) + _, err = chunkWriter{rws}.Write(nil) + if err == nil { + select { + case <-rws.stream.cw: + err = rws.stream.closeErr + default: + } + } } + return err } func (w *responseWriter) CloseNotify() <-chan bool { diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index c5d005bb..b43ec10c 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -16,6 +16,7 @@ import ( "errors" "fmt" "io" + "io/fs" "log" "math" mathrand "math/rand" @@ -46,10 +47,6 @@ const ( // we buffer per stream. transportDefaultStreamFlow = 4 << 20 - // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send - // a stream-level WINDOW_UPDATE for at a time. - transportDefaultStreamMinRefresh = 4 << 10 - defaultUserAgent = "Go-http-client/2.0" // initialMaxConcurrentStreams is a connections maxConcurrentStreams until @@ -117,6 +114,28 @@ type Transport struct { // to mean no limit. MaxHeaderListSize uint32 + // MaxReadFrameSize is the http2 SETTINGS_MAX_FRAME_SIZE to send in the + // initial settings frame. It is the size in bytes of the largest frame + // payload that the sender is willing to receive. If 0, no setting is + // sent, and the value is provided by the peer, which should be 16384 + // according to the spec: + // https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2. + // Values are bounded in the range 16k to 16M. + MaxReadFrameSize uint32 + + // MaxDecoderHeaderTableSize optionally specifies the http2 + // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It + // informs the remote endpoint of the maximum size of the header compression + // table used to decode header blocks, in octets. If zero, the default value + // of 4096 is used. + MaxDecoderHeaderTableSize uint32 + + // MaxEncoderHeaderTableSize optionally specifies an upper limit for the + // header compression table used for encoding request headers. Received + // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero, + // the default value of 4096 is used. + MaxEncoderHeaderTableSize uint32 + // StrictMaxConcurrentStreams controls whether the server's // SETTINGS_MAX_CONCURRENT_STREAMS should be respected // globally. If false, new TCP connections are created to the @@ -170,6 +189,19 @@ func (t *Transport) maxHeaderListSize() uint32 { return t.MaxHeaderListSize } +func (t *Transport) maxFrameReadSize() uint32 { + if t.MaxReadFrameSize == 0 { + return 0 // use the default provided by the peer + } + if t.MaxReadFrameSize < minMaxFrameSize { + return minMaxFrameSize + } + if t.MaxReadFrameSize > maxFrameSize { + return maxFrameSize + } + return t.MaxReadFrameSize +} + func (t *Transport) disableCompression() bool { return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) } @@ -274,8 +306,8 @@ type ClientConn struct { mu sync.Mutex // guards following cond *sync.Cond // hold mu; broadcast on flow/closed changes - flow flow // our conn-level flow control quota (cs.flow is per stream) - inflow flow // peer's conn-level flow control + flow outflow // our conn-level flow control quota (cs.outflow is per stream) + inflow inflow // peer's conn-level flow control doNotReuse bool // whether conn is marked to not be reused for any future requests closing bool closed bool @@ -292,10 +324,11 @@ type ClientConn struct { lastActive time.Time lastIdle time.Time // time last idle // Settings from peer: (also guarded by wmu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - peerMaxHeaderListSize uint64 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + peerMaxHeaderListSize uint64 + peerMaxHeaderTableSize uint32 + initialWindowSize uint32 // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. // Write to reqHeaderMu to lock it, read from it to unlock. @@ -339,10 +372,10 @@ type clientStream struct { respHeaderRecv chan struct{} // closed when headers are received res *http.Response // set if respHeaderRecv is closed - flow flow // guarded by cc.mu - inflow flow // guarded by cc.mu - bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read - readErr error // sticky read error; owned by transportResponseBody.Read + flow outflow // guarded by cc.mu + inflow inflow // guarded by cc.mu + bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read + readErr error // sticky read error; owned by transportResponseBody.Read reqBody io.ReadCloser reqBodyContentLength int64 // -1 means unknown @@ -501,6 +534,15 @@ func authorityAddr(scheme string, authority string) (addr string) { return net.JoinHostPort(host, port) } +var retryBackoffHook func(time.Duration) *time.Timer + +func backoffNewTimer(d time.Duration) *time.Timer { + if retryBackoffHook != nil { + return retryBackoffHook(d) + } + return time.NewTimer(d) +} + // RoundTripOpt is like RoundTrip, but takes options. func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) { if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) { @@ -526,11 +568,14 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res } backoff := float64(uint(1) << (uint(retry) - 1)) backoff += backoff * (0.1 * mathrand.Float64()) + d := time.Second * time.Duration(backoff) + timer := backoffNewTimer(d) select { - case <-time.After(time.Second * time.Duration(backoff)): + case <-timer.C: t.vlogf("RoundTrip retrying after failure: %v", err) continue case <-req.Context().Done(): + timer.Stop() err = req.Context().Err() } } @@ -668,6 +713,20 @@ func (t *Transport) expectContinueTimeout() time.Duration { return t.t1.ExpectContinueTimeout } +func (t *Transport) maxDecoderHeaderTableSize() uint32 { + if v := t.MaxDecoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + +func (t *Transport) maxEncoderHeaderTableSize() uint32 { + if v := t.MaxEncoderHeaderTableSize; v > 0 { + return v + } + return initialHeaderTableSize +} + func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { return t.newClientConn(c, t.disableKeepAlives()) } @@ -708,15 +767,19 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro }) cc.br = bufio.NewReader(c) cc.fr = NewFramer(cc.bw, cc.br) + if t.maxFrameReadSize() != 0 { + cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize()) + } if t.CountError != nil { cc.fr.countError = t.CountError } - cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + maxHeaderTableSize := t.maxDecoderHeaderTableSize() + cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil) cc.fr.MaxHeaderListSize = t.maxHeaderListSize() - // TODO: SetMaxDynamicTableSize, SetMaxDynamicTableSizeLimit on - // henc in response to SETTINGS frames? cc.henc = hpack.NewEncoder(&cc.hbuf) + cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize()) + cc.peerMaxHeaderTableSize = initialHeaderTableSize if t.AllowHTTP { cc.nextStreamID = 3 @@ -731,14 +794,20 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro {ID: SettingEnablePush, Val: 0}, {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, } + if max := t.maxFrameReadSize(); max != 0 { + initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max}) + } if max := t.maxHeaderListSize(); max != 0 { initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max}) } + if maxHeaderTableSize != initialHeaderTableSize { + initialSettings = append(initialSettings, Setting{ID: SettingHeaderTableSize, Val: maxHeaderTableSize}) + } cc.bw.Write(clientPreface) cc.fr.WriteSettings(initialSettings...) cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) - cc.inflow.add(transportDefaultConnFlow + initialWindowSize) + cc.inflow.init(transportDefaultConnFlow + initialWindowSize) cc.bw.Flush() if cc.werr != nil { cc.Close() @@ -1075,7 +1144,7 @@ var errRequestCanceled = errors.New("net/http: request canceled") func commaSeparatedTrailers(req *http.Request) (string, error) { keys := make([]string, 0, len(req.Trailer)) for k := range req.Trailer { - k = http.CanonicalHeaderKey(k) + k = canonicalHeader(k) switch k { case "Transfer-Encoding", "Trailer", "Content-Length": return "", fmt.Errorf("invalid Trailer key %q", k) @@ -1612,7 +1681,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) { var sawEOF bool for !sawEOF { - n, err := body.Read(buf[:len(buf)]) + n, err := body.Read(buf) if hasContentLen { remainLen -= int64(n) if remainLen == 0 && err == nil { @@ -1915,7 +1984,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail // Header list size is ok. Write the headers. enumerateHeaders(func(name, value string) { - name, ascii := asciiToLower(name) + name, ascii := lowerHeader(name) if !ascii { // Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header // field names have to be ASCII characters (just as in HTTP/1.x). @@ -1968,7 +2037,7 @@ func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) { } for k, vv := range trailer { - lowKey, ascii := asciiToLower(k) + lowKey, ascii := lowerHeader(k) if !ascii { // Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header // field names have to be ASCII characters (just as in HTTP/1.x). @@ -2000,8 +2069,7 @@ type resAndError struct { func (cc *ClientConn) addStreamLocked(cs *clientStream) { cs.flow.add(int32(cc.initialWindowSize)) cs.flow.setConnFlow(&cc.flow) - cs.inflow.add(transportDefaultStreamFlow) - cs.inflow.setConnFlow(&cc.inflow) + cs.inflow.init(transportDefaultStreamFlow) cs.ID = cc.nextStreamID cc.nextStreamID += 2 cc.streams[cs.ID] = cs @@ -2301,7 +2369,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra Status: status + " " + http.StatusText(statusCode), } for _, hf := range regularFields { - key := http.CanonicalHeaderKey(hf.Name) + key := canonicalHeader(hf.Name) if key == "Trailer" { t := res.Trailer if t == nil { @@ -2309,7 +2377,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra res.Trailer = t } foreachHeaderElement(hf.Value, func(v string) { - t[http.CanonicalHeaderKey(v)] = nil + t[canonicalHeader(v)] = nil }) } else { vv := header[key] @@ -2414,7 +2482,7 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr trailer := make(http.Header) for _, hf := range f.RegularFields() { - key := http.CanonicalHeaderKey(hf.Name) + key := canonicalHeader(hf.Name) trailer[key] = append(trailer[key], hf.Value) } cs.trailer = trailer @@ -2460,21 +2528,10 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) { } cc.mu.Lock() - var connAdd, streamAdd int32 - // Check the conn-level first, before the stream-level. - if v := cc.inflow.available(); v < transportDefaultConnFlow/2 { - connAdd = transportDefaultConnFlow - v - cc.inflow.add(connAdd) - } + connAdd := cc.inflow.add(n) + var streamAdd int32 if err == nil { // No need to refresh if the stream is over or failed. - // Consider any buffered body data (read from the conn but not - // consumed by the client) when computing flow control for this - // stream. - v := int(cs.inflow.available()) + cs.bufPipe.Len() - if v < transportDefaultStreamFlow-transportDefaultStreamMinRefresh { - streamAdd = int32(transportDefaultStreamFlow - v) - cs.inflow.add(streamAdd) - } + streamAdd = cs.inflow.add(n) } cc.mu.Unlock() @@ -2502,17 +2559,15 @@ func (b transportResponseBody) Close() error { if unread > 0 { cc.mu.Lock() // Return connection-level flow control. - if unread > 0 { - cc.inflow.add(int32(unread)) - } + connAdd := cc.inflow.add(unread) cc.mu.Unlock() // TODO(dneil): Acquiring this mutex can block indefinitely. // Move flow control return to a goroutine? cc.wmu.Lock() // Return connection-level flow control. - if unread > 0 { - cc.fr.WriteWindowUpdate(0, uint32(unread)) + if connAdd > 0 { + cc.fr.WriteWindowUpdate(0, uint32(connAdd)) } cc.bw.Flush() cc.wmu.Unlock() @@ -2555,13 +2610,18 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { // But at least return their flow control: if f.Length > 0 { cc.mu.Lock() - cc.inflow.add(int32(f.Length)) + ok := cc.inflow.take(f.Length) + connAdd := cc.inflow.add(int(f.Length)) cc.mu.Unlock() - - cc.wmu.Lock() - cc.fr.WriteWindowUpdate(0, uint32(f.Length)) - cc.bw.Flush() - cc.wmu.Unlock() + if !ok { + return ConnectionError(ErrCodeFlowControl) + } + if connAdd > 0 { + cc.wmu.Lock() + cc.fr.WriteWindowUpdate(0, uint32(connAdd)) + cc.bw.Flush() + cc.wmu.Unlock() + } } return nil } @@ -2592,9 +2652,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } // Check connection-level flow control. cc.mu.Lock() - if cs.inflow.available() >= int32(f.Length) { - cs.inflow.take(int32(f.Length)) - } else { + if !takeInflows(&cc.inflow, &cs.inflow, f.Length) { cc.mu.Unlock() return ConnectionError(ErrCodeFlowControl) } @@ -2616,19 +2674,20 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } } - if refund > 0 { - cc.inflow.add(int32(refund)) - if !didReset { - cs.inflow.add(int32(refund)) - } + sendConn := cc.inflow.add(refund) + var sendStream int32 + if !didReset { + sendStream = cs.inflow.add(refund) } cc.mu.Unlock() - if refund > 0 { + if sendConn > 0 || sendStream > 0 { cc.wmu.Lock() - cc.fr.WriteWindowUpdate(0, uint32(refund)) - if !didReset { - cc.fr.WriteWindowUpdate(cs.ID, uint32(refund)) + if sendConn > 0 { + cc.fr.WriteWindowUpdate(0, uint32(sendConn)) + } + if sendStream > 0 { + cc.fr.WriteWindowUpdate(cs.ID, uint32(sendStream)) } cc.bw.Flush() cc.wmu.Unlock() @@ -2760,8 +2819,10 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { cc.cond.Broadcast() cc.initialWindowSize = s.Val + case SettingHeaderTableSize: + cc.henc.SetMaxDynamicTableSize(s.Val) + cc.peerMaxHeaderTableSize = s.Val default: - // TODO(bradfitz): handle more settings? SETTINGS_HEADER_TABLE_SIZE probably. cc.vlogf("Unhandled Setting: %v", s) } return nil @@ -2985,7 +3046,11 @@ func (gz *gzipReader) Read(p []byte) (n int, err error) { } func (gz *gzipReader) Close() error { - return gz.body.Close() + if err := gz.body.Close(); err != nil { + return err + } + gz.zerr = fs.ErrClosed + return nil } type errorReader struct{ err error } diff --git a/vendor/golang.org/x/net/publicsuffix/data/children b/vendor/golang.org/x/net/publicsuffix/data/children new file mode 100644 index 0000000000000000000000000000000000000000..1038c561ade4683e91b37e8298fc5ead7c306779 GIT binary patch literal 2876 zcmWO8`CAib0svrUzRb+`nSk6zK|{VtNTRiJd7yyG8JU16mRliLD^_b=t;%||>na8l zP!yF%fdB@t+Ui#Avu#}!)CeZrS5%ZMplz*Iv9&5~*B{>h;dOCwadCeq;GIS9q`Z^& z4zVS!huE^`0kP%QL!#hTKe0dV5pkd}k|?!C6Nl&oqRgryj?$?_d0`G=rZt2)emhZX z-9en7jfADpL|Ci`i8}faai*}0IAc9YoTX2R&&HotpS7M5e;NNJao+kBaiQ><_=2^8 zxJch1F2>u5ONGtEC2I%qt+kW*&U&Bt!TN}}690_2YJE;zx4sqEGeBIQz$5DSQiP46 z346kOMDyNYqMeyTbTF|*XM&RGx}8MyGpQt*u$=@DVW1RXU~nZTDBVa8s31KJv7}dH zBIym6lHSS`(z|gP>8ng7eGQqUP?<$eHK@s{jhpc_xP=T*Zp8tHe~|%=yGSwoHz`r> z)<_JcSPBnfsj`ez7!GR`jVH+&@Dv%`cn*ia+c-qoh(iobI27K&p-MXrH8hiA?+&y|}@M@D2V1e1j9<8#Y&blbeWd+C1_t-LV zFPDvbjVnn9e-(BZ^RUCF!FO$1e2@DG-!tapd$u+BKKC)cZ(N7__@9t{+^1xpZ3BK_ z+^BiTZN?961>`V)8y?}C@Ca9iM~sK@DE|l^HJ0O1+cErze;hwDR^UgrD*Tvl#*evb z^0Bc7|IF3mpN(JPpKV{`C;ao|6Yc_jV*C$&V*3XF!oP@r;V$8){LA<$_h0g<@jLPv z|9kS8?F#uTca40(uP4WhjpT3q7V>v~7x}x*LB6)#C*N?7@EhZgCI~j&0$~Cx8>VVw!|d%~wxAQtHFbe- z!9%dvKG>A@uAl4OuxMFt@*X#=tTqgl#u|G&m!hma509ElUken0(Qe4A9O41^* zym>KL(aeFg;#82@KJFwSYKQPHo9H~8wqhMdMH`rIA02L+E*-E#6u$9T1*vgX6*vgj8Y?a#< zwkmlmTUAoPR<-;SnBBGkbMki9T(X0$F4@V}xb0$VN_Mj~Ero1t@?N&Kq=>C;*#|7i zMsTvE6r3(O#&d6}m3X+vNIX(vB_0RjBpz+?JkPcSo_8C^Qyoait;Ej8= z@c!=nmEv{&O$k=uMdO=r+-qkyl^6me1$6X8Kq1|gj8iuh`!2qi@qvt zD`oL5pw9FhpuXujMSXw7MqTasiE8$JOSPqkQ9bF4sRu_hsnJQBsh=j5Q_m-z);~|b zNsS%7MUC~gP`~%KQhyx1PmT8uQGfQ1QGchuqUqj0X(q#uM#8D|1fhf$2<3r-j3C<0 z5ll}ME}$otN6_w$DB80;hV~LB(q0Y~?JZnNPjaNtLSZgFIU|qubLeURjP$^7w=>?-ckWN6n~%?+Tm9zH?b#7@ zXLcOjdpwDD_^k?bWakAsj;rarej55OKV9Ho*?$E7b^JBslKn>JQb8~-eI!HV02%2| z$$&qUfeL|)m*d9pDm-MoK2I5)<0Yf}Cd-%{KN(XoRR;a1$zVk!2=9l1)T!@NY+X-;H1`;(b2(Nd->H-+gk zFOzlkFK4<%sZ4k73Z~oq0n^=|ChN&fXL`(;OizCn(<{oB_2%X<3z;Ev5i^{-j~O->Ll;qr{M`oRE(3&|2mo>-j|YhX z3QnwM$KsKCQt%ZKoA40!@ zPoRImdMK*?6sq!e!VGaR%uwgSj6pTb5^G_WdNo{GlMmJ6&2qJRH`I#vKz)q~>IaX& zj|Pvz{2DX-c<>}#J9r+h6JLbu)R*7}@nyJS@Fv`(zAfKW(++pmbjWuOzJZ^M-@-4% zT<`gC~Y|LJQsx>of=8Da~Pc23Nu}8Vfv&>)<(j8lJ}&;Q65|@XF9N z_&+=buWDYxtF^D;b^Hci*Sf%ZmVoucJlMc8u;B!R4Z{=Q4VDjYX$7!}^?^-V3AAaY zuw{5AY#&}A?_d*PhgJzYhL=ExmV=HHYUmi&z`Lv#KG5pmL+xj9h%JCaS_2%>7Qr{{ zVK}aRj7au5;yIy$(s?N;i;seG`Xbsn2|=A7nqm5d_}q!P)U)ktAE zfu`$Dq8XAiXom9~de3qm&D4E^f+Uwwkn=hUw%kA=Ix7m5G@($Z9fj#y(QHXOn(gdD zb1c1RuI?V1CwYM8IR{X2h9V^|P^9xEiqgG83nj17LgzSI zWceE{){`h&N}=cxh+^vaC|2)=V(UCmoZb_~kNBVjsUK2G{ZXPc043_>XsKR-mexh0 zl#wX3LK=h8q$wy(pMlawGEurT8)fQqP?lbgvPbgKO8t7YYUDGd)^9_ax;;oI-G_Ag Z1B%rnr6^x|0)0GUL2F0Oqfew4{}2BS2s{7) literal 0 HcmV?d00001 diff --git a/vendor/golang.org/x/net/publicsuffix/data/nodes b/vendor/golang.org/x/net/publicsuffix/data/nodes new file mode 100644 index 0000000000000000000000000000000000000000..34751cd5b9d1b14c3a0977e4fa4b04db058b241d GIT binary patch literal 48280 zcmaH!2Xs``*2m9GGBc?V0-=T?iYSVxfMUZtbEnr#dJh5?RIDhrr;tup#4a`z6&1yT zVja>GniRXJ*q+b+?A`CTPk2UM?|qB4_Bv&k|K4Yxa?iaJlqxv8RVnAhWTmPq>`ImF zN)ke;Jk+67WgWf#E9&VT(xg;@k)o1}309S~=N5-jWrG7s#s9Tf$P%SoyXurOzi3d& z&dgd$%Mr_KpsoB-+7jo`R#MffZ0^%UpSwZXT8e4&-eoFP(_>e5BdtZL;zFNNZg+>W zC+5183OeXD9`FJ(+N@M~JE+WfvT_(F&|9z}@18xvrhIXFN((+_ea?XCXxs@vUeMvff|nREqPdT1qMS z;lD4aQWBrFf_@KT@vrEpXirtCiE&_Y9)w#3Uc`ch4Pd#wUZriGhz(;LF1T)Yt8^n5 z7{%vM+IvZxQogf$REA--!jgj1CHHly{>Euk12<4D8il^1QBB0}Hygy+Np(U8FfK)D zX&IQkA)m@NhNIMc*;Lt^Z*wVCz06btjp?=U9ow!3Cd$y~DM3|W8<<@^=yOl%MwSWOzy zs5uBgmG9KiTVyKho`_ZD7^i|D_#S~UP9-FjO<1eC9tHkYR70cGQ@ZG>dF@I6n- zcm=!0D{kU)l!MZb@Hvwh0OvR_&z52%2?QHz64m3k%a&$dNJtuS#Y*&*IW~g}?Hfpwj zCH9m}s>pixg3r4bmhk3eHFj6Ho`AXOaHqRrE)jjBlE8Njs@y?H{ALWfZZH{??_eo@ zqE#K3nBYtNdSSb6tW&`AhIs79|UzS~V9y zRdfC75F_AHha?U`!e5D@!tDSr{?J3#UE0W^HJ@tv%oKH~aY(zG;iAND=Gy2boDTul^^#8=zxgJdDSVr%?~`VAy6cy2oH>cA=>$+w z0+8lefHW_{xOvT1$UQOu>xJcWa>H$<3G|v z&h+%JRcE%uq~nqX$enHKY}eCNi_dANn$b!~uB2p~0U-Yz07YB9jODWs;}ZO>sc_@l zg>~v2!vIV8&3eNAJ-y*K(H9=jNMhcbg2ZC@%AO(yl|43A$D=4kciYLFH}TCs!L82k zn&4FzxK^6naywF5;zTY8)m{xamVLYE+qpgkDdti3eyVN}6Gf3jG zT9Vyycxh;umR|={|c^IwLrYwS#iX+1JoEIVzMeC3? z4mZ_BovUiq#pbu|bc9;fd?Tj?%{L)de6mf=-;A|OTDLAzmpXH;>N4XPdV^QtrLzt# z!HMWAm0T;`&hQj367mmvW9i+>nm7>V_>yOrToQ)vB)Wmv*Qt5~(ga&h1kF zFzj^r9_>+A#>!jORb{!2czLFu%(kJvygy@JFdpBWx#U4!7Qrr&kts_~Rad<^0pJlG zgZt`mbzrhu;9{he>&{M$cOx766lQm318q+d7te0mJg;=B1)GaNP%x_=eZ!^WYxulJ zBI})kQtvSiRU67=O1eK!rg~N?mALX|O!s1^L&MGVfwkZ%~qeaHE*TSTdR9Zvh^ zn5r%@A2H87VR@BQ@gJBZ1oi%Z0kZf8KOM5(2cE;4^KO&jIRf=X(*Yhl)sF1KI;>p? zNY793MP|U~`N@Xt*pYp*y9Q7)E(f!BT)nDy52#i3Z3F65gOP5f zBONWqKx~9h0fuu4HhfRFsD{K?dfij%Rb$V>TGeC>K|$H^053ZpYi2)eRBgAbro3uVe?951p^l!%fHT1dybcCk3k?`Sy_i_f$ zcQH094l~u##1vfclSs-~)uNV#c7Uq#8Q~j@AK~Hfx%V!jG?KW4CD>tqH>9!wa;}j2 zF14)nuw=E|dmf6H6fxNzo;dbPqCw5k<}<@i=`J@`uQ z^T7NJV#UKyP*n(U=ZT`~HB((}>k?M9c+h{DzRD&P1t2>N-lq%+c*?87eYQ|{4x+9U}A_eYA zChW(d%9GiFA5Tj4h9tGdC~m<)c@Bv9Y>>((a_wG$ab_!%{e1LA&aZ=9RHxP?R!}Wi zfoyRA1{PcY6<`!+RLx8(Gwb@ni73>_g)0`;1cQ>B%aQu)|`y(@}r^au8gz z0?b=m)#mMFyR|i1t6Gc$T#U^3C@or!4RfxEjWKqRx*)O39mIZKn`+tIU{$ToVK5hY zz#O}hj`BfX)!Na9jj|g+5P6|awHYO~s_oUc&=PsWP3~4NQti=>TGier0V`hEt~#PU zF4bvxQB^VpEoDPxl{%=MF!>k&qtmWBTb@CmnMH=>kH#Z!Im9?W2^X>&X&Z`|zd~$S zI#gHU?poDt?y!P6mo{%j1JEvQqH5xT=SQj)vJ-n6D8*TeyAyk0E?x;f@B5lWh)^Xd zP-tT!y01;f>2F~!lEt!cS3SLwlde;2swX@iiEzxLdRh;lBd^A*ws_>R!2LDGi|(kS zR0WH>$^$vYiwzH@{OjFnOY8Bi`0+~zs=jE)nS>3})5ZW~AQsA4s@9EqIqI1!}Cgt zdNFahRqZsc#E|=pI<@P?ATCtMEQ^1(2rUseyp%N-wjlq^(kt1_v|KRsTMW`}ZZmx5`wnIm1@<+74M{BCptpp@?6{bGXsvrT>Kx)@or z)Ks4)4xr?E9c%tCP4!tK$;wjj2__33N1|%Ahm^k)%+9Nbf%Enb^||qCt@=DM*o8^i zor9}a5|`!ln#Y>t+FD)mC~M0NE$VmUKJ-;S06ybBY?Q1>QonCL8(H(@B#ScMYN2BQ zy;XORNa1OX*!Y#$*YxWU!W1vxiyzLH>n#?evKB07wOcHSwHR`5MxSAAhrDW9tch2> zV3C^>W1X8U-fp)fRbAd_NlM6iUsZro{|7#ht^{-53t}i?T2fy;tr z){@b=fvW#5Jc`SfAC6)?e6x+wzd)08OJ?3IJJop*&%R``WQy04`Qq6~__C02|D=f^ zD0V}3qagpA21~!vsa8wBgx6~6pYV#RS@cF`gLI1r zh|9L^T*+n_pFv#WGg%qpXC(bL5(c5#_#kx$CyIU;v9om-h=cOK8lv;gXF#UEco)~_E-idT(lKl)Jd?1 z!xzd$B9t3o8Z7gmsss0ptR%}2=XywDY%K`J+bu(5-_jeEqlWixH0S^9whT?YPH*)Y z$(CW8FKMBa(*U45lP$Tf*{zn`#CnZmoj8@<%y!0I%hD;S}KQuD%H#;n&Hec3c8C`yMn`MkqWwne+9D;1PgWf8h zk5tr8$y@2itz(mk>8%|YnrO2e&=pKU%Vc2q=e0wwuVZ9bhaiag?yj?p^=xuk#wN0B zLC{WM{oN}*%gQ2#CtmbBU|2X4NFs{2PgFIns*1+2-W%BLxogN%MH0BUuk z<*RynZ4S#pi5z-e6;{hQV;^vheI`rz3G}+<2Cd}zcFVX{Ih^Dl2sHC$6a?l|ihkZ; zIoLImj=+n_mV*-+lxoJ|pmUlXYe`+O%m+cib*PHG=dp};zbjMYsWzNmipkKVR;;zu zS;i+?a3L@QrNJILoB=D=2AGyZjKi#!LlPD=mp=7a_5pFcn|z zr{nNcWcPMj4vlZIu_Ic+QZ~B-@&K9xRW{3^i3plYex{nY5`6LM4$B0;JlVv%>KX2H znjp*UmI<3*hRV;onEsNS@RK$n~!)cN489IS&lM|76xjz$8uE5beH95V?eEC zvVSh3SS|FvU`_^TJw7Wul;k@s%~({7TX`36l3(2C8P&S*rZ0 zwU(+xKNLh|t;=_|(>ugu`Yp3ll>=^IQ5~g1+VV@K?VMz+_4A_OQA+ujVJ&}Q&{7=< zqs4obhw3ehAvdEc{{iWJuo1EzX6ItNrMhLbmGM;_tQPGyMm3vo27Iu@-hn0djswlr z4MeTQ2j*L;nzwQTUL_lS)u?t$jj@o9s*jo=9q<`uo291Z&RUG;(B^%+-ZH}*bEEXF zEtvca^pVFpr39A9MoO+*TUiP|1lcME?E{MEsDR?&x^1ihFGo4jn0_qEo*$H`-R4IHNvBD3e z<8z`>_$$>SM=@kL){4rJEvlBbO|TSg>xO)f(qbfO96Ds7iimq=^@OW7bWmpRc=wghWsD>EQ# z5G#9x{j%(FOqM;H2T8;r9jGeXvJ|qNu$S%H1=&Ze%0B7``S%tf!t$*!|0r$0T+Ilo zYazBcBo*26jOCC47%CrH067x%`(~4nLb@In|gBUo6KCIXD?r zi`__k*lIZ~+EZ&eEwPri(1<3>>8?9nD3CMtaGp(-lgnUzm)84as2_t2Iqr{e5M5)D z37KG3Dy^Fc=@$xe@%DFS<44*G?-@*re#+2BrV|qPX&@~=6X5x)K~+-yBJ0(lfw=Gx z9f5~@0D1*4J+(dLWMwx~=(bccC!c`n_k#t$(BbkD67y_e#9ksU`V~&>7e=AR!yvnE z>m*F0GAY^W;ad@e+<{o{tBN70cRzw5Pd2^&30^>|HgOu?ToFL#zebzB?e>Hi54q#+ zy{Fc<(*>t3Cc4Wzuq%tX@dc{fho+&=AeHrfVsII7-B+SYUt$I1NL+O@EEOG;0vDjq zWhHc#Pi(<+d2laGrZ@gz0KU_E(6W>cL*A#9#jaybJdCAOKS;Ra@D-g5i|KEI<(WFL zbf7AhpiQ5Az4EB#m!qUU@CBMts*hmNT_7!dnb7GyIl2%9o)qF|j3MQFS9D2%KaIXT z|LTF)gRB#zHyLyaNJjLvxi(VO%%iPI`*TD0{z;$QGxTLsU;1c1*N+6pD(~(zi{)^M zuGp|lZJ<;@iW-kW@*W}e47t)XhEOs&CtB+tfJMC$R4V(|b|FL~2^}~iw^lkXRVTSQ$z10kOa7Sz^9KNTK7^{k#jt37{U!BsmZXF4)nrPO>nNSo zt}+rbIqlgQanZ;v3Lazt;jFBle z^nkjnlPC?6anqUe93bO*rIF`1*C><3bO_4`I>c^P@E+oe8wa|O zXsp{GKW(i~R;NH8vyx}sq=T`c-ujQVzWLTC))z?~KmB;)lEZOM1IhZwf}GR#&Pp{n zdV;?qGZwf zpS=Z}Fkba*GI72gyZXb9sJv&7Z9u&ibB|_rSL_V3RXzzm^HV=1d1%$Xd1k<@*B9qp zR5{OQiuWa^_XU`HmzyPwzFu?krghRLv8sLykK(r?rn9Ny+(s6Kw<5GTQXoYvmhqoq zDZ3vmMk|3ZatN6FFa|zQ(*tHnJww(%{rFJW1GE05D%h38F8&@-^RY6hs+kbO#wZkA zL`=gc0n+%amA$7QM1Mcz+$SZ;tN2DdsyG?GYIhO}TI=YLS86&q#lxu17=>G<$5Sdf zCzFHHD_x)pgFat2pbB{nShK!Wjo7SLr01n~G$D3BNry)knZhj~^%Uc!?+B`{G0XB~X!O7%`iMVpNn$hD?-3+VN$U+=GU z_}rlKonk^3K+0NatCYKI=MqTKiFJhOxF$7H&qniUdP^Rs%{UoiPLt|RNcBNPqs)^8 z=FbAySU_9;#5y&yU1H#zM29h$Hs@gC5AZO@`oEbQp5M z9(e`XXgBC}Mil3EDr-XT>`$8@7=nb;Y(-Yz2kV5|GfnkSZlc!I{wv`Orh#2jr>gCC$tm$v^WW zdP5JP%5^;?{xxEe#dW0eEF{Vvrpj#!TI4px$f3hu)=FExiOGLKf<09AmfD-FZFO|a zg5+PB1XFu$j!E~SBTsayXB72h*L7g(&n6Nr6jvS?`@-8 z8yYQA9RN|XsjCxcQ!<&9z)%8135*nh(YuWa3?(p91%?tBDf^^NU?d3)B`}o0Py!=a zU?_p11cpUm=uJr-CLIDp2@EAL{^x3@%$EPBH(4!0fh>o5Ym+tS0If;e8v#YC3UZoYkE^EJoZ1b+L}9AOkM`j=LnZvm+O}_ z^0uXSfj3%&Mb0Hod4XbBTObl4Pk*WIgM_}XRR>mi+??{Rr9i059xMrqP?_EjW^B#M($PERaG$S6xBPEj&5&Y9|O2v!z@JvR%d7LZnY+f z>fu(1Yy?UIAxFR7ji6vWb_+h`*?I3g#CrF58MnT3tPIqlZ!PmF>yppyIG6?*adNks z;45xY6ZU@QCmK8&9Tqt@NQiA+>hL=bXJPCoN0N;3eom1CL(017#>Hx4io8YcKfhZ| zyvEl>b|(4M5&lX@$JqGTc?h^4Q8blU_&in<+2SVYC}I| zWCkw>sXj?3AC;tz7NvjZ6PC$;>(F9qSqsbtAazpfgp-)|&Yr%B(>oVrWiY0=Abc-6 zb+c@I?x#?oN8c;Zy{_*ddcqpzv}qX5nY6iYwNjP6BK}0JI(C=ZN>!E--h@E1VbO03xJ;)s zf-1MVAl*n+-{I-2tBT`^o+kt9n7u`dm38@34t1S!wqVhjz;q90Fr1Nmvu0AP~HoZ(JWK4@3b`XC9)|;PI%g_ ztg~SmnT=R)i1oIJTh<17G?HEIxT_C^CG$p-L7#&3Oi}X4BgA^k4xo*^kXM(tzS2f% z56Lj3qlcV)z^YCdIh1u{G~b1*)KvgaT_wv1pEasM9Rt(}?YOG?JxMk913!Mq1OA{~ zR)O5awW?&vmrMvX4ns+4T%QaYF0=6SQp+-WE%$pNZ#O|cCD_SV0VAiIxn;?7kmHviJ6J}4@JIbo|HcYr2g4^TYw6Y* zxIgsr6jhe}cm@l=-D#@q^;41P|6>mxWl~DLy%~H#rley{7Y-`?$T^-;(il2)dMCZs zUs+dv5@Atzf%o0RUP}k_SY#~^QnK9R2bBZ2a@Ge?HJvuw*UZMW6KEUS%xDb?plZ~q zOJP}#AN}PHASr;2n@bGz(emfLtwYE1Mv9NcABpJtpKSAEZ-CJyP20fb0R>6!%cj&(osh9oJyNPun;`OBk$Sw8B0fl=kZK__h0Jz9 z&TfLp7fe}}G=}z2oX%atxFtVGTkdwUZs@oHbc|?Z**uR?$f#aSaAY6sKbokiv6Awa z!ZJucMe4T%l6DITtYp1%$PI4B#6^(f8J-M-fzK#PQ5Abe@t&#w(Os(2x1p1^rIN+V z$>Q9-sj6~wvZ!)v!l0z(Z>M)p7?9VaW#mJWK6~g$k(>O~19w6`Xa?W&C>?PmNt4z< z9;A0M$m#FoKz@ZUBfST*SW4^2oQ#d2?>}z`38LW39FjqT45TA-Jq~8Rv<(DlQOH2V z`i)!)xv~(_%-wLmmB{vcAclf(Ff{Z!@b%k?f_}e%s{i@)X0-!yz(-`*pyeUR@5`9` z(~uZ?1geH^L-VlDu3>e&7KsrT5Q7nqqblPCv}Ame2l+P=8Q;;7nM5@+)ep%)bLIpv z=dMkGJPk`$8kmRvt6No7edbqH+b$#anTuHFl4}=X@*mw)A7vO7ADyX`FBxCEL0j^* zX{tKjYG=7_&E&)HcjKxi?^70!?5|N^9g@bFf4_|j@LSXI=%0w$7A;XThDA_nU5)yo zD`DyXF0t>Aan=_fSOjENza|F$5hRjcM>gwH&}UtVTUiU?lLOz37Z>Ad*6k^fwM@T} zlbcy6t|IJ76VSo|P@NK)zeJs~dqoj0d`U-6S1QAE9O?(2f)>licrPIb*q` z1sBdE*tTn4#Kv0M?3E0>zO6{Vf`QLC4;YRkftK622+ftGZT1{OGGcfa3)wRPB;KX! z7=x>h>LrkQFgxzWuHz|K9D87KybSu3abd)MB0?FPJ0V}BF)}_)_0Q^YEG5Kz}0W2lk+T*xF?>S}WA- zx4N3~P0nj+{b13Tah6YTHM@}DTz^bhomzEd4=aB(s7~!Z)sNHX3W66Uew%#Q-GRRJ zWHAo<)3RSBm9yWJs%&@JUoKat-ElNSoAZbmn%<(UwJS|^Vo`ICIw{b#NKG$$E2>W3 zd+v7S3_jLRxr*-UQRYjv%ay0-$f)wZG;eF~L4?ytYVSeBU$t|o3M9VkQNhiYpbEWp zctAy}uSr$WSK7K&-i#x`r_YHaQ<;q;&mDmAyNFfJLNYsN5^Xv2NUo7Df^<{~NJm|b z3q#s6h=T!N<`!NB^xs5vU>zNUJ|=28JzI&|3A7D+<0hOA4kN@#uOWNrD#&rXdm1H2 zgHd}}P}G7|DjwU^t@3YsW|1l^s83ZzFKt<*iW7AKb>g0GMr)W{xTK!8T%GjS>U61| z92iEH{K2A~F$(E0x}~G<4E$FX=U-L1q-tta|4YIxO5IxNUsZWT*85*z_(a0@|HAN# zY~cU38x$>l4u<|(4NEorUrbqm4T;4Zuz z+yxc^X}x^`n~3FoZnqY_!c0*kWZC?Tbytfij&I5)YiIW3DXdMOLy~W)hh=CZ_~d-m zU)~gEtwE`!nI%ZcO|<1r?CKl!%rD>@9V8@LmDZf%LcNktsx0yrz*-MccO?;s-=x~e z9*`mrQ#muNOxT}Ug0d#EXsHWfk%wTV56ALQz5n`2p1}3nFK3aIjzz5ZnO&BD{XD22 z_Vz#2w9+fj_WD6gAN>1R^h*n0j(dM^Uq_#WN-^n`=cA-)c&Tp}inz{Perv1IW zpF_*FO`oiOP1$=VXta_W?$pdab`~Q|GiTW5{wIYE zznK~!@7@P&@RNUOoh)-tr!gM#y2~mDX6wEcn7rA?$P_Z5a%8tIYNC{}nvRs+3`O?W zZR*_m<=fSHW^S0aYiS#tLRvTu3@{C(G<=3gTuKt!zGv$lWMISgElP*~TdYlmFY9G` zt&_lFlRZ@5@#v$F?K`T22hou>wg;BU!aSJV=>N8t(#a7BXBsukw;jIU*y;Lpder%O zx6&q8LuxR;*H!%$&Sd1V@{drkSk|D=aSkMdjnukw7cAN3NMxT*?+`a%EDVWqaJ4=p z@e`uoj!5aeL=FR`lT}ZR!5fpnTt-G%jAS8bk(aE>{v{8_ix0%^pm}Umw(l9sl`~l= zZp&*{7wq^MllmpAzUI^V^zo?QbxT-UxEp~m3i3kLdfnPils?2g*TNs%>cS;oEMf$I z>0pw4!}1{SH2;)Cc6pB1AxV-O>jCn?-=FeX61Xohd*3ujmgt%C*Xyi5@kN)xqMzus zguYe#-%59jzG+F^B#`YFFZr^874tz8%yS4+pO{mw;QCDJYlmX_(zEYgUL)=Oz(TH1 zWC~qkd`rpNATf|R(Rfd*Ebz~*I60)A@z^e>zOY7 z4@Dvib=y0aEU|Cr8k4&|2 z@5yOMd}f7D1|`V>p9VhU{TLmxcIthrcjecMs$8D+z2WV<75c9clEu7lRQr-kK2gva zt8(rELBVDg8J#&*Elk~N`65{d*0~e(;a37&kG;mE8}Qob{rXbQCGT^thg8`(qYqov z!IB~F_gxcICG{s(`y9OAl9!Gyd1B5#j7J{#8BP1W>>Zw`F+T8&M(*o;OnbjvTgQ#o z-V{}N{~~I+4dRD>_b!tpcM=2eC%5#(`RlSCm(5FGE?Z+Ju|FA!KiqH3l^@Fu;j-($ zYti}qN80KT>#f82I>z-Lr6+dZ-E}Xt(f{d9+Q7K!UFh#1|6tKOaY}wbMj^!L%l7`a zsjGja@(1Sqn& z!YfnxNKt=5r|(%SP9h_!ekLcYKZLLPQ>r!hBQ|3oRW*Uw_l3Q84f~tZhrq1Au^FgH zV8;{WpZz_Y);HE^cXyGUqd=APhL^J>)#(E7|aq`y*|sVHGYRU<%{?#*)=M6(W{MDb-MAl1bq5e z_If;Aikl*=PO3+lZAm#gBk zp?1dOkpCFh-?tan!Q#0JyRvI2?;_$-IR^y#gW^AqTURG!fht}O^YG(gc6e=Q)<-`E z;2PItdV2?c3|iv3Xwl!?{c#;_UG~1Y-%CB|dY5n(yp>wBZY#PEXnHHs=div+(!oiV z4;|FJG&Cc2trpYC(8s67*3uidGGzLT07=KZmr+`f2dc8)>Che-b6u3=)urA8YHr0D zz3ys5zGIr{mA5kbU56pp%!atHt@Vz1K`m)3-;_It(A&F49N2;ueVsqB6$zO=6GQ5rj`oHX1^O3rf10%;L8?c~_cXoyf(HqmFY;-fzTMZ~t@rwt?1I^0g~-Q2 zYN5%RJ&SJ}bDmkX-z|-Pz@v-kJ)H3v_TZBJ2P#LpgHjQLocnL)WzxMpjLaO4bhZbV z((&&g2hs_|K!0;G;89Xa-{K@qLyP|K#IUzu=&58Btl++B`8Pb?jGW%cRBPR;t`B|A ztkr=XvMt0~{PYra{jOm?bwmEJpt|Ah6Y2rv$L^>`Y>b*pW?KunaTxptb|u6&23{sY zshf!IfE|>q&mxg)Fh=RmHc_nyc-ppfbz@>Rv$p@y@C}k*S>=>M(ppFmNB34Vy9tR* z`J)jAFn^%r#T2+-e)`Z0uL z!0aw{bCTgvH#hW0>41Fzvc&PtZVRbfLNytPh3LrKhevXhROxb^m1C`Aec6q^+QF!j z@AYnZeWuto9O|~%8b4U%sWR;v#v|j*9(CI*0ot->ap~0|%YHl= z^m2Xow^CnqgK@~^9H?_`px(c3F;ocd;?UI6+&*Z$M;Dp&G-TfUwZ zePX%$2yD)LLYy;&;Ea?t%ykfvtddi`kw)tILIFzh{efrI7T(E~Gv*Pw^EJ|IVNMWi z@4vXA@?6is#y5*^dOf#Xi^-?xbv{M>s*Vf8vLl_2%67yySXs2bqBnmOvWC3SieAzI z^Vgj8iw&5oJ|}916+UBX3(PGkl;o3#!bwOJUBZ#BXzJDIOSsYeNfCBuW73dqv9y@X zu9VkAm5%_j{B!(}zrv#og@WpH?UXL2sw1TTYL4-I3s~fSyz+Mu`#lbpXF=+Gmgg;J zE7tTM!g2l#i%agG<&WMd*OBNeOrUSZm=yq@$hDkn9c_9wb1fm8^k1~`K0(QIZzdgw z5m;j)&iMN8fDBv?IZNPHG9@cd$->nI#2{YBjH-5Ht+WJE)tV|UxR4!+UElZ&$OOV^ z$jjoGoW6`sO2#2V{#Zaw3uEcNSTIY(J*iEQ@jg(=dg@#av!{S8)_*dka5t`c7f0xj z)1mJz7MW-W%ri2RP&x<&W-EgdzuAREvB>r?w4R-!^wV0zisH!S9fwUn;3qPbrTl1-RA13PJ(i9TbKVA z8q0{U>FFT|0F`ipESS{vJtR1Q0l&3 zG#?0aVt#5(PfvWf+ zWJ&22$QoI+1?1OafxE02{{a$T!Jx!f;79xhsXhTQEG-y65s+q!h#gK<|AN;0xFqYF zL@iiMc18oBGA?FwSUl|zY5bokmR?K*p=&4=gX9G zONB2L9%U*dMW?dv17%wo`UfTFpcZ&ICqu25oT|{&^5TQHzuy z5xJb+${XR!zk#;+;%o+QH_Xuwt|j#{cR{AEfLu*GjEGQ#Q~`5bxPfxadb z^oJ$6l~J&ro5HmE7|o6|VM(6DoE}my!}A!iA2G+S*1r9-2hAs8Xh3%uiN|5Kufv-C z5j$dONH}&ZR`&+pZ&3Gkf8VL@3+66T_jUY$KHGV0MJj5;%cDimkqUsp_F!pEqOe$27G*Dh~*18mh9Qg6~1M zTEAsLntIrqSFaxKxv^b661u`W72?O>FI>X zaX)i;z1rYCx=wA_n$)Ns^>egWS+~G4^bE+5c>#{jN3^O(ce^{(WBKz^)MKrwjXYrt z^r^=^yhV9DF}g)Pv3WNkwx)OBbSkA3!>u-kXSb=1-S;-BC-vXANP54X(6RSCxn*So z#wTLPvc4G`FQCu*nUDexfDZA3;3gaA@exEQYYR#TTuR3Pkg5S!BawTgiI<1^3FqtL z)(WqB%6)2^dTMWJliK8-2LcB{RQ7xAYE#c)jp}K4qfI@%#q_CXO0Gvib{F~v%Ae~> zI;W0D_zzOhcPp-rtVA~Hy9V{lYtuT_v%&iosb_bLY=>oJmwGOCo=-j3Gao=1Z_}m@ zwBdr>Y4tk*^!<)R>CkKG&A!yGo-aQXLn#}n+IhTDIX{EcbsDRgTMT*nZ(%V%0a@Qx zO5sUMSRFH|7G$MEhAe^{C2dorP527pK}azpSWw9tR&dJ}$o*-oC2#hyjlIlTT=cGx z52zLggp|NiT)qS{i&E(=luGYh3|Sw7Y)FGVCe@9U$}gg~Tz+U=k+mH%2$l-@)o;ah zQhFJ_iq}#h@>p6S&&1V9^j3eq1@cV~>yZ2aw&ov8*vm4vsONjqo7D@!if;A77G5SM z^zR@?9z-;XUnES1t(9f?Ei%lRLJ+;**$KqObOa-`g=Brn-%d5;V9ZM#os=HNWb|PS zc_#TF6N#yBC#7JBQvSj1sCpIk?&c=cPiw=O_fZv_H(zFMaGO?-DCdt{-U2k2|ub%gsoJQdEG) z_S)e4kf8{tQLXk#TRlp>uftMeN3%IUjp}?ahMuM){%=Y(x1%q3o`c?Z+JW1FmVjK4 zgiU(OFSoOOJV~&F*;osnOIvXfHljti8k_5%e3*8&!p; zN_DOe&7U@7{2{air@$95Iw&2FaX0g_Hw8*xS`4!lmKdL!smKYiRA*z-lS8%0Y^3e= zWMKTjgblpgN$6M|RkQ))#d8|4cCa0#d%6L1F$e;WdvWGgX^YTS6d)~%+@wWiJE#Kp z&=J}Jmgp?1)%T#U`WE=g{{gDV0#!vJEoz25 z)CgI>h=4^pKp*#^S+djE*hRGgeFb)yi(hO9%V#Ladx9xhTniTSV>g=RU|k?Hs-mKY zNKQt=Jdmnvf&95!#C+{Q(=)|;6q)FYR3hcp#@J+a-N4D!B7X`JO>i0qQhAYsorjfd1E7DyU|zvF8X5YQ}E~#s@_Bg zN>2ozaUp!+C-9^EIgEQo(&qdX2R%b5xi=@HYKMnXA(1Tls0l+dc+MRt2);r{0uOqz zn-7b#jgUmg6R`X}^t$B>$&wWSuei!V=?dENWFhlhZW7(6(Hz)qr@D=j^CFa1cvEp& z-ou8r1qsuQsIU0J2fl5{>c5F9M-mluH$%$3*vM(zAGNTkH=oE6L?*u^ndfMO1k{r5fa}RQc;+32aP8>;@iI%yG2o zWDWe7ferb?7r|$-8$1rp5f6r385j?&L?W<~j_AkObyk8UREo*q+02Tfn=xc;qt|(e zn`*pgzccP>Fjw5%Ot9aEC3=#mf5uLj?uI$Y)}{*QHX`Ar!}kID%H`QFuoe=Ux`Ws+ zp;Ue^AWP*mTs0OF+C`YEWCR17ZD=`^-snD5g^r-A*QRJ8>I>Y!a80Kpcr9Au$D+P? zlpT<7kwZok#D7u%@*?_z_crd2ee6;sH0H>vF3E^3^uE?fV*UVgNREyEq zP1fR)!U*bbLX{!uUHqM!7~BoWz??4Jk{KWUm{Kqs5_l56NIUof8zJGB92n|IWz1(n z+!5T0H((<;!A_iCZyO&;<5g5+5loNFPm>1Zjo5{=3w$hx0wK%LW>n4(N6!&ikAl4!1?`ADo$^r z^d<^ineAw9MtxMyj`3+-$R3YuaV;!`mte>_HWkd*!xEei+`^|Q`Dgjb*lzUI+=iI@ z7?f5`LL#(*-U<)#^T<&=(gvSSW|OvGC7CO`%qR0EG;L;qP^pZuwtuw^O4 zLEh`m|ok@^7P+yzp5D@9C>bZxRyY|k^BmBZJch~OAbNuVv;^(+1~wq;GMdr1 zbrBM>pPTck7UeNoC6Btw>pUv#aSNXb2H8=*S`7~%B{MWx&Wd*$#Hy#dVL7OMKd;u?UK zko?URvl+3-(iE9i?S!NgYtb)+&qbSgRUCw0!ldA*c29~to zp`glJMZ#4{U~4uZk$*7?j3>OL&$lRb{|XlORL}lk=bdgxeGeq`5gooIKD2xab7>d_ z#Rp?IuK*WfE}o~OU)gYLCrYd3q~Q4#W|!RaN9QM_FQo^~Ly#yQD*DcBhFOj{RR_Qv z-qaRWuFd?Cre!Y=+#$E(G=SJT^(q-9V~fAY(cXF zLp5^7${5Qi7NUvrPw_%SJz^r@Co2n zUQ1i>Edo~lvklMPkn&$>3oLF0^RILmr%?4wq*PJS0bE)CjPu(ehXBYt5<~g(F;wzU zJs}QIEsbHLbSh%{jO2a>F=Gn~^x;lFOoht=0NN{>+mfuTTCo0N+omjWntAfNQ7pQ z7J18M>P~D#Hf(3e-lt@~jSHcjXpXcZTNJdR^q~k)!Wm=Mi*F~?*@TPFyjhJ<^xTHZa(U( z$h#2Zq%HtSW}Cm%Ltc>TBuqMgh3EkdIWSp$2dZ5CQDx3=NBuQ+lHn2Tnr9}1^y^02 zUP6KY9&A+KMs-HAozar#WdE%w&^uj8CctB7`7u5M=HQ5B$QDyA+>|1~z1Wark6ykC zPeeAfh8V>DEhBRvr<=Tk&>Rr;(H~)s%cDX8H?BM*LWUz zAWKWhOYj+sh`9S1FTJ~bsFK@?q8n`}m;+1oS9T(P4*2rVL5u$zY?R3F>4NV!Q~kCL zlkY9b2@CE=?Uy7kn8>@HN4WGHsgA3KfIeej1Pw_#{ z=mtv|kMtg@2Tvcj3T}frD%l=B0OQdO5V`2)&s_jA_yL)19Ezbl*?P-YqN?b(c1SE0 z%r7uq0`q`tj6@=ujYq}2=Hg9jCw|OEvvDY66nYY9=27@jGQmN$!=auiy0VG;=K)yL zpVb;q!B^nHMtB42L+4;Tn;xdA2R6h8V zcLXYshpLL38j*Oyhf?`SJ0woWFG~i&F0pYK>Z|8@Q1BgqoCjgDSRW?z%5{q$eVM2) zzYmkapqFY7F#Nl*Rv`DvHO)jQaBmaj0c^N`K|&8yNbVU*CtxTz6wM(?QC|lv{*!4d z{RJ(B{je6RLpF9ZRp0aQ#bqbaS688bBH_QG0ezpOfWD@Ssc{Ew)$?d8`34E&0P*PT zZpb~{tw$XgFU^CL-Ik7B*`3W)V3@6t&{`G+=fPMDy@g%9kw(u&m41t2?sO9?AHC6; zSPS3nWq5X@IeHvv<~$g?p*Z@&_aj>|98!D$NIgx>_>qZ8x10ox3q17753u!(Txf1P z=oc>{R!)=#S9YM~>aCF5xN8X|*hoV=QJ|0Zdg;?gwUP};lnlYR??WWaNe&cTgl1Ew zY3VH53d~IOB~jJec2t4DOo-UQ^p?MlT|H1WMk;OVFs?7?{Cn{-w35u$Cw+6BovQ4d z{uzk5U)h4v?*sUjfr9d9#X)(-@tgrEigcm$e0oE*Ot8YosphY5q$JNIt`8{{nc}Zp zy%=YE8Px_@yptPHa4H>^OmIq$C*|ycGn&yXXxj zFcjQ@$>3Ykt8XSwh#_`5w=??nfZltmq8=Rlz8M6AyHS5TC37MY?w&3>21d=2daYGP+wI_hkrHB#2!OJkEL-eeBsfU%$M)TqI)}Fk;8HH zq-L^M{$QeK78BNU1$^c^01DMZsxC%L{=-NVji)2fhWgN*_z`nD{(P`5co9RfWw;eu zj7NbLh((@3Ouq;!ksGe;zuK^?;c7ILbmiLFq;wW^vV-+$skI3`GhItp~INhO2-B5=&K@aBe&3DK8RRpLlf5SplZl03wTqA z^G7z2HU&ZOA)ZIRh3H%2s&C<&kpxSHTm0CEf*Hd*QCf+$ScMO}*Egf@JmC6o6p(tf z!nBo5b2GsTlfnE6eBtLHk?*llVPd!DtHs#3n6|tp9B4idKL4YTSZyPKR@4h2H%flR z1>-~jh2Cg`$T_y?cVHMcO8Wgwi99L<#E?~20XeB1@4{F`wi95 zHdyo#F|rUt#baqR=Gw6A_kEqy0l{EZ)v zF2`DEHxj{lpfa9-#9y}4A+Ja(d)iU;0l?$$!x!I;m)ehl-6?>SQ&r>|AE>sYG;lH= z>EnLMI5q-#_ul)SDf+c|o{Ca^jMo7R$a8#fTmUVVXmM8JrLhs>k~qiC23qvYMyg|2 zfg^H#67AQH#9g$N$c2GB7v|8n*yw#@cNba;laLM0?_k`Lfm>k1ZtvTh1k4`U#%7G9 zE&g6A9kM=0SKx=XTd>wcNzx~@5LEi0S^l~gEiPF6n;|8e>cR2=h9VDu&q!`Y%Nm&V z)1qD(3gy#heWe$Y*Rs{Cv8x|d^~VK;%*dT-oBwMZ@{ z^x-Ld1rqvYSW%d^@FfE1^bXpdZzgo<5OWDB@i8y=5pdT<|e_n72}mFZIFBE2tG-2g;GR)p*SO17e5$7HL}|q^5@M%9bTOF zL-b3oV7b7Ug-O4-75cy8&O1t~Dr@xjR(Dl(qG=jvkSG`t6N8E(>a85QsybJ7ZgfUW z7{=^i0y>e=0dp9Y?=y`f>gbFZrfHfE&<1ow5FK^U5i^L2+4tMKu#2gu^VVDIt?&J_ z*E#p>boSZzoOAa*VMQ45Bv#YNj;sM+n_PM&3x<-LizHmMcaKviOj!hzJb5X(UP`_% z(-vm2M4ojclL7nehmZwaHrdEwWD1ad4yoO7srBRO`coDsOD!cWwNO2+3d%rF7PL%Q>DqX$uO%OB{;x4z*}WpD zg346aVa}#c@B=-sFLsNQl-RH4)*c$_6M9IdCf1tpCwYgcu>s2+G#!m2FRh5Im~2shtaw{HWuWOY$;mGUW~_;^aw7tj6N zGuhxG+uOVQ9Nb*HT*+inWKUH6|f6+!B@sxx~CK$Zqji>Ldp98Z>X8nLb((5G2B*f?no&ob(f zVqld+k!JgJy9i3!jx^mBm0J0zswG`uprv*9yiNKheVO!KFk}OSDx~$$7gqNfsyTJf zkGV68C2p^yt}xwn^A+7JFxwwH%O+bRa|l^I_%_$Tv$YDkPp6-j$ zzC;CC>(Ea+54BZVdw7ngG;Kq23MJJ`rMz7`qg0z`NE|)=4HbV$QK+VBXCw2cCR6*R z1Zmdsgom|$eZhTbx2#RAnH_M3q)&<~r>eh?zwA#{RiVmTv1DWmO=dj^=fHNFwqjj? zHy}<6dYWk?Jxbp@n*#6b1p@fGtC>kl>&@U+?tJhha_o`0isx=-zLw0^n_hsT{xu3B zJ$%R4zYIlGcBSan_~43d!|&m(vU46I#IQkUW{dX9hTus(*i zGuogyRP>YCVbukUZx!;bRyLyxF2mth`v{=o3EZdTbezGe$);fK0#aw8T3J7?;u%fd ztU2iH?GMp4pM%J{A4TNvVBaA8^h$2e&0g%X4&<2 zp>D%(22qbOlqO^L-aQ|(x&qzk;qn7X(h!Y-8~;Ou@0LGB%FyK(P=v-@BKx%Xs&yal@iw>(ewI|S*C z&{Yz<@$|yp(~Dg^yM(hR3`pQF-qVogy$Pnl1d2EIppf?k6!OY+rpgN93?bP2Lg*aW z=ENEottWdqt>wz6W&AZzSZBf|a06D0#t@i@=Qo^v4WRTQtx1<&ilR`tCo9*8Ui zuZRX{EaGgXngXFX)Q-sNZulJpD{sCZ85=jCUmwr(YT}X{Y^C=T*G}xCMn6K~&&&c0 zMq2U);%Pmkru715kP7O5ji;!BtHg)g02&0UK~CNdETIxlE!n`5JitR#Kk#%rK)V0n z0W@RyNLcAjzdnyIqh0w;v z7xQj)p`WGSA5*AS^sY8%zDZni5{&mo2eh(TT`vr+ z_)RZLQNZ^?_L$avLG&39*^n)IU9Zh-e3%vpLoo>O`} z`~5201_KsCRzI9=JoR&A-^o^(Hca!O&<;}Wj20Ye6|HY=r9s`Yv^^-lT&l0hCcBwb z`61{WSWC*<1G3(U>5&mT}M4m;q z>Rd|WB?t;htL4|zv7QYIY(C&q>dZnH=axDgU+bNacqe~VAd#Au9=CYH$ z35u9K$m@48`su|l)>F{NuZApe(*kOA2f}sZS=ITFg-bV}Y14XW^FVR!hcwqU0QaTn z+;lC^+z>QOg-;{;%}nT0Tb=@j>For01RYst?I&@HRG?7EE|M; z>v&Uq>u6P<%oHlykx|+H68=1!ROD^g``dD0dKFo{tgv<%s=0G|C|!rIS#R^2)=LC3 zaT4sKp8>4A7`8fY5TG8zTAi4rY#4Y685RS#kxi_CU+r$H;F(1&gEe?lq#{6ez8wvQ zg=x3jK-OykYnJ8VDtCma`5G))e3)c6QW}4v9q@8Dc(=Bq#)?d;^$vnc?}tH9E@^6P zNBhKIeN^xS*z2`>B{w$X=r>}V#t>@g20HI|sG+yvg__W+em5wd5k1(d8rqs_Xyb>Y znp^(3N8W@?udCDlQPv-k7T%0%!T2%?UR!`6V)#|##vtlu!>_oo4XqlnefYO1*_04X zKSAfFeh2!!AnGn56&-`1^6D%=trIX?vU4ddpOXu}^=RO_6ycs8)CkCVRo+HKdV6Tb zutd~dv$9cg6{%1iT-+aEt11b_dcSJNJ71@ztMYh%tA@OT+8~ zpZsJ9jiEGl1+2WYn(>2!5UEq*)KMNft=;DXRi^eOFJg%FDZ4~=^t&hZb@y|u^fOW! zq^9R-p9RU2Oa>;~$}bHiIoTFn($r85^oon*%zWU}GVP;Kw}4xRxzSl-0Lkxw5jL_D z=3)EeyWlJ#R=KHouZ)3Ny`Dm$FI{rqqC{fcRc_;r4)%Wi!*f4|aE|NV3-oJIPyf-A zrHwPNxUC02826{e#+#kXXw~eG`;E75dj`+Rnnu=fKXP+iw8!ATd5IUa|pnVG`W*cueXYv}1$iM{*+2o!3 zDactna@ef&!SlvH^Cm51)77jfT5&|1ZRri5=sD5)mFk#4J@nX#)Pc`K9&JIc7eRJ; zyY+DAs z=yQA7P^RZF?_3P+aczK@fQJJZM`r8B95*$;i>!GJD7o_eJL*;Jl0TJac@xPd4;Ze> z0$Gj_Hl!K#+_${`T##p?!I(EOY>@|kdSWBNNzhzVNDd>`aq?qK5cH`Z; z+n~*?q?Q?1Ib#kfc&IR9(UVJYmImfGCeqC`1eqZ zJOvxr)@B?3DxHOw*e7A8;b)>+!N-&iDPhZ}9xS{6kzq_C$H|(PcN+g%zc|-;FBIN@ zZ~RDs;{>=EhhmcaPH6QslKkN)o+sPB^h{aj1=$#O6wjP@sLc75rPkXzY{abNv&_mxf=K%?@EZ90>AM8)xU82WL6U%otzY53-zrXv*3YU49{_Y$ngw6O<1c z1kbi?9iH)K6~hU-UGbREWzR z#OxC0GxRDJy){ZBXeKf~PWDLBeK{^d7h@=?WUptq$Z8x;`#Z0MS zRG=cQSJv=JvZEd7@RAWejooPHI}pH8ty0mqk!z&pQp=&wVqHUGEskAuUxQBTrWx`3 zuGdLv+loMeZ`4>*u zxSr;5oeaOo8@RH!tr^-XvUM4x!k1x^fCXOS0{FRq?SsKQbn&>`7=+uPjjqNn@h=?= za=(>=+3P`;-|p25(B4z*gY0t{R4gP_sXrLEI#I2X*Tr)TBIAcHKympZ@a3U><5hHw zQ8_53Y8y>0Og9Bbi47{z&x#}5YJ@>@;PXJ?mG42%C^%PsNvUTX>Uze(+1-en zxo>STc6J0inN|6Ej9tYiw^LdGO6}$Ap{)z=ZL*Mjnuq=_6vd*8g}=DYrYmsE@#gLm zpMz`@GNMQNF!2omY*5n&mjlr+$R=f@+Q1sFS3DR(J}$~005lwoAlECTyt0O`Y!2DT z-vNzJ@XR+J?S13hU~owmW;)vsa`s@dUk5PBE(dZSLz+8|Bl%=vT|0C>Rtr$zzY4j2 z`3DsK9F*Wis9XC~JAP1(R{k4l6#s27^~*cx-@4w|_1v%Up+F~Ucus(Q;A}hK6qp7Y z{D2n8-U3xCT!M%9ckLXwFgsHU*4cz4v_%FwP@lG_TxeDa^ zJf79xolU9CJH7IQF}TzV-f!0fZl_W7I*`~ItyuR)K)eC1>L+)j)h-{xE5Hj>^f24( z!A0w4hf#c$gUQ{86ja>{Mbm9Jd7kSh7K~w*-yduS~`ek#j?U z%Mck^A*^nof{}aufcw@XXjeC>$9Pt=9yR>4z>Du6K-~+;)=h3UKCfCyY0LxDXmKwU z97{n-26&AxQsBRqY*RgkXxd3>BtW*zPHFH8o&{cN$M&bRP!I)_Ue-qGD9Fmfw0^}& zP*g1JgUdY>MBl{uqwfmXu@LZK9&#TACH7|lPjms+gaA)306e<^uvW5NJ?L@)$kyw~ z4TL}r&h18_TtLm4aIS6TS>m%rRBJrQ{)=G{m<|Z-4B$hDW4b^Wsj@YGxO@wjguH&P zHIVrq%oO0j8t3GKcQ_)0E5UQ0nhou!Zl1Z@AzRH`5sy(z*9o9l6046Lj?NJY?KV9^ z*8e%F@>OWi_&5y83|h;-8M%SwWJC9L!_Px1x*FA@_ff&(qagGCD+-q)2V7PI8aIIA z+O{5Z(uEsddBH-zqQ}(Pbx8)o>%T^|+D{P_ls~dAS>sjtvfcQ+qqc;`YiI*B1p%j_ zU&)o-#uvUTY@{B8y?z$x0XK;+o<~WUDa4}Pa5+B*yJYp@G#{c>br9nOFQXtjH4DSK z0U_DHP<0ih9&r`x=m>S2hBSYx=-da2zdC4q(XnM7S^2#Z7k8|mv4HHCXli}bZhYw$ zv%9xp?D{7ut-N9hmA*8HpdW(9mmS0CT3mCRjXin~R(YV?*wax2zp?`{n0F-#S?`FT z`R!QkUD2b2LMAb*cSorN}g^vzP4gitMcJ43~?;9Rdc99)yu-= zMbwSI1YW2b4eEQ~5?stP_fj1w9k?VcC~9XQBkF3!E(w5-Il2+}zz&5( zw&S~`pOk2Y^|lXlRzg<#UN5OqvMvdHxaUJwlkLO?V|i93qf6~t7&MNj1*3oU<6N&o z7P*dR(Pv;9-R_l_iGo-!6qNytUG~>L-j8>vk?T1WFDVj`pcg1P70xARN_JZoVCQ-? zcsd7)VIkui%cL^prD))K64SZF!`v4F%BLXG6Gxh_A%w_#ppD+c06B9q$R!^l(mxhf z{;{BxhlFf81+^cMbzP07o|Vm%R(4Y$Tepg91h2E*_-1niR&k~VM*L1EH6PLk%0y6n z2L+99%R-{0gi1;u4#H&;Dfj3Fc*Mg#GxZ{ zu<=X=Yil`uY}r%rs~;4mzJEdk?_|tS$u96G^Q+l^476j6s02mjW(`0j`9$QbK=~&G4(diJrCcE}{5i9^ffrv{i4w zs_KIXU>CGipOcC=5$lUzL^gg8Oyd$6i$B;8=#bLq@&K=pN(@GBV(fCj1Obzu155!g zQA0x|Zh=AKc0$yNw}t?A45bBa=v?i9LAA`+s`H?zE_?w{1cT}c=vO@##j6)d_6~$s z-}^k^L8MjxO&Dxi3fNi-c!N+~wVdQ${Vp=9cP;_!7FK%%}JgjC8a%--pMm5a>+R&x8meSg5;ZobY z2+%Ii7RLZLNQ%7_Kh)mAu}ZZM!L;@X;%2oHFs*%$1DomwEdh)e44AMCP$j8q$m$wF zuDcvF)!mDrI@!8a_Yh51w|X()X~Fv&4OO>M7`!2++Xeg!&UGJ1>Bn%X&&dM}=2`vF zT)=+N)=z|U{Xt6slW@ZN<6Z{1_0Zbwk#o*1u71~Qrsp`huo0>C+&02fffri)?FbeW(m zMT4g6p9kCkS<|buOw*f4YuZ5rxNqRKS76Cnob=Q%x+ULdyogPU5VQ}n6lk{iXx_`f z5rBP4pQTg_D&@m2A&RF;Qz_+~%BE6!2&K}do@pv2NK?vLRnt%I)OUO;lA4Nq8V6%U z+ud|Q&O7PD^0)WW(;P-vqeDKg^-|p8ADVfV{QRe<(cgQn6W1|DT}-y@86TyoZ+7|e zckf3Bko+mItbgwp7=tN*soZ8t2U;@DbQxW;RIgt#}%ww9C&^LmD~fbl!!bPvZi{LkQvIPXWHtTj$jy?BIPXO??F7D^sNjr7(s`*QS4 z#u$$PMQ$xKbjgi#B4nv+C5D`YQ)h8GkKyQffz+N5LCWs|BNpM=BU+ci<)R2cW04QQ zCGWd7RFmI!gN7CZMq!OX;{;3;a1csrXj1PY(a@xxL7cxCopXQHjn$SyHtaS)foz1< zTd|XI#|J6RsAhOd#U1l!wu2%u#sUU#BUffiMH%1~`k~F~S@=^Faf%q{Xpr~0g=!=< zmpcHA!l9ztA-QID)e=}4^0%+B2#+Y7Dyd^zIbF!DM&5%rG zDa?`RJmezUt!S<^UU?X4+mMm=S0?=k`T_PSHGX!TmP9mDeOPK`VRDt34-L|~Qcp9& zRa)4&jy`b*AR<+@rey#mAeoA@CZnNqJq%voQ!W3Ulo|(-^}e4$c4#lN(kr~oullK0 zV1n{G-al+*aAlS%oA9&@l( zrs^a3`A4F2UIbmrDxYx><{CcS6zEaHGwr5je(oq&KHE`cmi%H>~v@Dxz2 z5Uj#C0wTxeFb>KBi})WXXc|Oz(BmjH=*1q?_%9!`py}A&V@InoQ{n8J4q5CDCj;p? zm|Cmt)VUuDn;j#@olw|j`mxJ5>yh@I&`M;-w+*ZLu7;w{3#&}=KV21(5Mwu92u0$n zR`|&_-@sU6_d)Z$nYKJxDgM53;wiNfq&I$WBt06V--HhrNDs zyXEIgnf#k5yF~CVqaeDZg}PnYiyvfBs&^SwJSG$);F8Egm+a#xb;);B>au}x1q=8w z@<|R=5Ou?+plL|Hn4{$mL@uyn=NM*+#lQ<)(+~SEBWOAqO@m+b!1)~181Wsc8V6iz z#%{#y6Djp)Bh8!LiXU7A=f-c)$~}yfF2Ib*7@)`I*Ni|~`9ahpaWAQ1`S6QexE_jA z5m_l;ZIvT==Gj7{G_3bidI_LhzJSV~f-F=6@QO1Oe$mA<(aL(0XYNUG8F>}74P8Ef zyav^m_fh%?J(A}_Y;TRF)6&D8>sNqWUWCrk4v=HrQt56eN*>Pu zyyWp_DB|E*PB)$?>)TzEVOqA7XEnD9`wJj*wUBj97d$zgSI^`PB|>DI;F9<=OkJ;m z=bIxGPO`z%0G3Iq_i2Fp5ojxZok78k6ojoVgvY%I+K+7c9uF3}jMC`iWGn2=07o~a z7k2LL3TzuGuxVdh;YQlP#49!bGtagoQhMsN9?p^;F4d8RYGIZ7%aiOyTjwLKO61O7 zM?L-@RlGipYo^KXzm=VOff*f5$X|N8Uqk$`g?Z-4{pya@Sp~6#| zR`i2x9SRsbhVCY<=U3$9|D*Bi=yQg9LB4%H?5Ci(s!{trGLpK8HS~~HUE`lxr$1c& zx~T?f>km?cgEIX&;fj)GA^ioWKj2do+KuSoHGC_!(!X=6pQ5C?@O^&P=`bdtzogki z*ucEC3)^p`@$|K7xLE8m8|NSVV=GhLv#_(aDooA&8vo2olAM62TtH?S%FnollzAuY zmFd_7?~x%MG47T&+~;OI){wST{cI~e=BTQ#10YL76_)Up=@e&d6d8sLe0C2`sPmWH zFDcExE{kV18O){L>o!Ntmv!MqLjZ>Kwt5B3;1f`{;Kljo=mIy|7p$bA#;_3F$dDr&ZVlbiptY1b&%>OBExCY&y>NcElN5pJ=n3PF9jzSl; zsajGUB%~vb&bdv zS#M$SUAMOi^3S?5N+Ty7^CKL|l8qtSsu{AU!LkdoV=Z7Dz_)829rsX7?AtY;XL1{b zl_jMzc^dVDw7HL_urlY;OG)6eG{KNx`Z)!b!LzEZl5&`P2UjbDRNY(5ODx-3fEdSe zy37gDn~>pse?3`gX=alhlQN`QdZ}EpZUc5M zI*A5NHkr6oQl$L;Hbw)~l3JScY!;;ht(q~-qsZm~rJWS)KOAJ;k}zyqC$z&d01in> z$E|O&-taa)=-+GIylY4edlC21(s4y>f4PNU0lE=}`@pf4GZTyFZKq$;i;>KuXb-Kz z_)P&^&jxbFtqw#?%fX8~Y0JXwW?cCWgs0Uqy@E2)OhZZTX%LI+O-O;05T52pdXvCD zuJ<*Uo~$U~z0~WP1`VQ(hVDnT(nk$(%rx5MwiX?Lq$xZr`j965kY@?~Rm#qzwxNbL zN?EiW7pTBs+Qa31L(L0XvHg&ZP>jD2YiQq8@a_ie661{@F8?s>xu6XHJv~Fg>7=yh zvdzPOj&CW=`J^4INq=RZSOT~P4>RSzf%aFKkAhcpS2y3L(rM+LLEVPQJZ$)(sB8QP zUalPQHE1gu*=|s> zTAd{M7px_3nUL4Y*n;V- z{b8WPiONtfNe(~*Z)0-k6@N(%+oIn-!{^xfaFH4Xq+7S->nZ8k1CF%MbS71|v@gDC zFwhGYleDLh)h;qzhD|Hqq#3Q<830jy?3_iUM5MkII#V6<9@$^CqBwVrX46`fUGy~)hulk5-RCD#Os!L$XHl@1-LC6=kCNSo)VNNtabWzuXw7FWIC;L5b zqhEd?r`*xCimbjB8M3v^JArY~6N4;r7Jd-vaxz5a0vdKjNL2vhi_tzL2dukVgjNDQ z(a*g!z!tJGxjrE(^K3m&UvG)g^;eNIdf+@$x&ny>c^`pGSi(T1UTUchQZrgpJc}=F zVE~t|H0d-F0V*4e8akm$$cm4KI{_{S1=bEI8iN=oSiAuln>*n=5ry=|kg^|yX$dH? zdr2AjEuSDz6!0pZ2)UE4O(|SwRAra#FDS|B3C|9f=vKz+N7Tjyx3`z z@}#=56H}4t`poI-428B#T(7jnoS`n2*G%=tmvY6$_|y3FGyXgNTdKufpyP7#ApP9^wcD|VBFE?x*($^J9R(snKcTo>CHK+GDg64@a z*>DZQiA?xJpm%K^HsPp|UQi=W4>ZfA6vhGBL3Hgxqe2C9`P zZj%j6wi~F?(B5KFpG3`*Ivj5EWR|3vCwCm=Hczp}begAhoIKC8bn!5sGN#p0;Wk~| z)MUCkk93=E%d&|Np*Xj+neNRp<8eRcF+J9|*pH~Q>FKy=9u+L4;m4G=nO@h6ou;>= zu+#KeSvJ$xQSLVV7RO-uJLCgl)a6uPPe^1Bj2XZk%|O?I^UR>-hhOfNjb^aJVKYM= zhuh3B)-}T&r*&ecRlR00Hw~G^9kp&V!sS6`r1x!`8KvhkqaC@OW{h{$jIBM!ZI)OW zoo30}(~zcHLqjjDGfO?6xy{nGhtD(1+?Lxc>v+*-mNTZ9;X zW=-f^K^-=Z_xx_E@SnA> z-x}JB;(p#k=kYoeiM1^}lW{P`H2SKrlDW6%?+gAZl( zD8*h4w$BtyW+*z#)f)Yq;)uM0Q8y)bpINThK>v8^Rl@ocNon=S1=Ze=`FKi@{*g$| zX=HektZmWuHu^+AKxuU{_LJ2psAXtNF{m#mlwBd`q*mO_2$t9&DOs6RAzwC?TL4v? z7&Yn+%@ROXZw%IZf>Rd*>jX`20Dn-{-8we*i&noaj< zJTamnK<5XMEz)_^c+Aro8~3_EaytEtb8pBoMVtK9GgfG4WB>;IK>uEAXiZx`>8AsY robrQ|owa>aoRhN_X(Mf!48lrA?l?kCzkiF4Q8iUAs#=ol_WAz{i*386 literal 0 HcmV?d00001 diff --git a/vendor/golang.org/x/net/publicsuffix/data/text b/vendor/golang.org/x/net/publicsuffix/data/text new file mode 100644 index 00000000..124dcd61 --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/data/text @@ -0,0 +1 @@ +billustrationionjukudoyamakeupowiathletajimageandsoundandvision-riopretobishimagentositecnologiabiocelotenkawabipanasonicatfoodnetworkinggroupperbirdartcenterprisecloudaccesscamdvrcampaniabirkenesoddtangenovarahkkeravjuegoshikikiraraholtalenishikatakazakindependent-revieweirbirthplaceu-1bitbucketrzynishikatsuragirlyuzawabitternidiscoverybjarkoybjerkreimdbaltimore-og-romsdalp1bjugnishikawazukamishihoronobeautydalwaysdatabaseballangenkainanaejrietisalatinabenogatabitorderblackfridaybloombergbauernishimerabloxcms3-website-us-west-2blushakotanishinomiyashironocparachutingjovikarateu-2bmoattachmentsalangenishinoomotegovtattoolforgerockartuzybmsalon-1bmwellbeingzoneu-3bnrwesteuropenairbusantiquesaltdalomzaporizhzhedmarkaratsuginamikatagamilanotairesistanceu-4bondigitaloceanspacesaludishangrilanciabonnishinoshimatsusakahoginankokubunjindianapolis-a-bloggerbookonlinewjerseyboomlahppiacenzachpomorskienishiokoppegardiskussionsbereichattanooganordkapparaglidinglassassinationalheritageu-north-1boschaefflerdalondonetskarelianceu-south-1bostik-serveronagasukevje-og-hornnesalvadordalibabalatinord-aurdalipaywhirlondrinaplesknsalzburgleezextraspace-to-rentalstomakomaibarabostonakijinsekikogentappssejnyaarparalleluxembourglitcheltenham-radio-opensocialorenskogliwicebotanicalgardeno-staginglobodoes-itcouldbeworldisrechtranakamurataiwanairforcechireadthedocsxeroxfinitybotanicgardenishitosashimizunaminamiawajikindianmarketinglogowestfalenishiwakindielddanuorrindigenamsskoganeindustriabotanyanagawallonieruchomoscienceandindustrynissandiegoddabouncemerckmsdnipropetrovskjervoyageorgeorgiabounty-fullensakerrypropertiesamegawaboutiquebecommerce-shopselectaxihuanissayokkaichintaifun-dnsaliasamnangerboutireservditchyouriparasiteboyfriendoftheinternetflixjavaldaostathellevangerbozen-sudtirolottokorozawabozen-suedtirolouvreisenissedalovepoparisor-fronisshingucciprianiigataipeidsvollovesickariyakumodumeloyalistoragebplaceducatorprojectcmembersampalermomahaccapooguybrandywinevalleybrasiliadboxosascoli-picenorddalpusercontentcp4bresciaokinawashirosatobamagazineuesamsclubartowestus2brindisibenikitagataikikuchikumagayagawalmartgorybristoloseyouriparliamentjeldsundivtasvuodnakaniikawatanagurabritishcolumbialowiezaganiyodogawabroadcastlebtimnetzlgloomy-routerbroadwaybroke-itvedestrandivttasvuotnakanojohanamakindlefrakkestadiybrokerbrothermesaverdeatnulmemergencyachtsamsungloppennebrowsersafetymarketsandnessjoenl-ams-1brumunddalublindesnesandoybrunelastxn--0trq7p7nnbrusselsandvikcoromantovalle-daostavangerbruxellesanfranciscofreakunekobayashikaoirmemorialucaniabryanskodjedugit-pagespeedmobilizeroticagliaricoharuovatlassian-dev-builderscbglugsjcbnpparibashkiriabrynewmexicoacharterbuzzwfarmerseinebwhalingmbhartiffany-2bzhitomirbzzcodyn-vpndnsantacruzsantafedjeffersoncoffeedbackdropocznordlandrudupontariobranconavstackasaokamikoaniikappudownloadurbanamexhibitioncogretakamatsukawacollectioncolognewyorkshirebungoonordre-landurhamburgrimstadynamisches-dnsantamariakecolonialwilliamsburgripeeweeklylotterycoloradoplateaudnedalncolumbusheycommunexus-3community-prochowicecomobaravendbambleborkapsicilyonagoyauthgear-stagingivestbyglandroverhallair-traffic-controlleyombomloabaths-heilbronnoysunddnslivegarsheiheijibigawaustraliaustinnfshostrolekamisatokaizukameyamatotakadaustevollivornowtv-infolldalolipopmcdircompanychipstmncomparemarkerryhotelsantoandrepbodynaliasnesoddenmarkhangelskjakdnepropetrovskiervaapsteigenflfannefrankfurtjxn--12cfi8ixb8lutskashibatakashimarshallstatebankashiharacomsecaaskimitsubatamibuildingriwatarailwaycondoshichinohealth-carereformemsettlersanukindustriesteamfamberlevagangaviikanonjinfinitigotembaixadaconferenceconstructionconsuladogadollsaobernardomniweatherchanneluxuryconsultanthropologyconsultingroks-thisayamanobeokakegawacontactkmaxxn--12co0c3b4evalled-aostamayukinsuregruhostingrondarcontagematsubaravennaharimalborkashiwaracontemporaryarteducationalchikugodonnakaiwamizawashtenawsmppl-wawdev-myqnapcloudcontrolledogawarabikomaezakirunoopschlesischesaogoncartoonartdecologiacontractorskenconventureshinodearthickashiwazakiyosatokamachilloutsystemscloudsitecookingchannelsdvrdnsdojogaszkolancashirecifedexetercoolblogdnsfor-better-thanawassamukawatarikuzentakatairavpagecooperativano-frankivskygearapparochernigovernmentksatxn--1ck2e1bananarepublic-inquiryggeebinatsukigatajimidsundevelopmentatarantours3-external-1copenhagencyclopedichiropracticatholicaxiashorokanaiecoproductionsaotomeinforumzcorporationcorsicahcesuoloanswatch-and-clockercorvettenrissagaeroclubmedecincinnativeamericanantiquest-le-patron-k3sapporomuracosenzamamidorittoeigersundynathomebuiltwithdarkasserverrankoshigayaltakasugaintelligencecosidnshome-webservercellikescandypoppdaluzerncostumedicallynxn--1ctwolominamatargets-itlon-2couchpotatofriesardegnarutomobegetmyiparsardiniacouncilvivanovoldacouponsarlcozoracq-acranbrookuwanalyticsarpsborgrongausdalcrankyowariasahikawatchandclockasukabeauxartsandcraftsarufutsunomiyawakasaikaitabashijonawatecrdyndns-at-homedepotaruinterhostsolutionsasayamatta-varjjatmpartinternationalfirearmsaseboknowsitallcreditcardyndns-at-workshoppingrossetouchigasakitahiroshimansionsaskatchewancreditunioncremonashgabadaddjaguarqcxn--1lqs03ncrewhmessinarashinomutashinaintuitoyosatoyokawacricketnedalcrimeast-kazakhstanangercrotonecrownipartsassarinuyamashinazawacrsaudacruisesauheradyndns-blogsitextilegnicapetownnews-stagingroundhandlingroznycuisinellancasterculturalcentertainmentoyotapartysvardocuneocupcakecuritibabymilk3curvallee-d-aosteinkjerusalempresashibetsurugashimaringatlantajirinvestmentsavannahgacutegirlfriendyndns-freeboxoslocalzonecymrulvikasumigaurawa-mazowszexnetlifyinzairtrafficplexus-1cyonabarumesswithdnsaveincloudyndns-homednsaves-the-whalessandria-trani-barletta-andriatranibarlettaandriacyouthruherecipescaracaltanissettaishinomakilovecollegefantasyleaguernseyfembetsukumiyamazonawsglobalacceleratorahimeshimabaridagawatchesciencecentersciencehistoryfermockasuyamegurownproviderferraraferraris-a-catererferrerotikagoshimalopolskanlandyndns-picsaxofetsundyndns-remotewdyndns-ipasadenaroyfgujoinvilleitungsenfhvalerfidontexistmein-iservschulegallocalhostrodawarafieldyndns-serverdalfigueresindevicenzaolkuszczytnoipirangalsaceofilateliafilegear-augustowhoswholdingsmall-webthingscientistordalfilegear-debianfilegear-gbizfilegear-iefilegear-jpmorganfilegear-sg-1filminamiechizenfinalfinancefineartscrapper-sitefinlandyndns-weblikes-piedmonticellocus-4finnoyfirebaseappaviancarrdyndns-wikinkobearalvahkijoetsuldalvdalaskanittedallasalleasecuritytacticschoenbrunnfirenetoystre-slidrettozawafirenzefirestonefirewebpaascrappingulenfirmdaleikangerfishingoldpoint2thisamitsukefitjarvodkafjordyndns-workangerfitnessettlementozsdellogliastradingunmanxn--1qqw23afjalerfldrvalleeaosteflekkefjordyndns1flesberguovdageaidnunjargaflickragerogerscrysecretrosnubar0flierneflirfloginlinefloppythonanywhereggio-calabriafloraflorencefloridatsunangojomedicinakamagayahabackplaneapplinzis-a-celticsfanfloripadoval-daostavalleyfloristanohatakahamalselvendrellflorokunohealthcareerscwienflowerservehalflifeinsurancefltrani-andria-barletta-trani-andriaflynnhosting-clusterfnchiryukyuragifuchungbukharanzanfndynnschokokekschokoladenfnwkaszubytemarkatowicefoolfor-ourfor-somedio-campidano-mediocampidanomediofor-theaterforexrothachijolsterforgotdnservehttpbin-butterforli-cesena-forlicesenaforlillesandefjordynservebbscholarshipschoolbusinessebyforsaleirfjordynuniversityforsandasuolodingenfortalfortefortmissoulangevagrigentomologyeonggiehtavuoatnagahamaroygardencowayfortworthachinoheavyfosneservehumourfotraniandriabarlettatraniandriafoxfordecampobassociatest-iserveblogsytemp-dnserveirchitachinakagawashingtondchernivtsiciliafozfr-par-1fr-par-2franamizuhobby-sitefrancaiseharafranziskanerimalvikatsushikabedzin-addrammenuorochesterfredrikstadtvserveminecraftranoyfreeddnsfreebox-oservemp3freedesktopfizerfreemasonryfreemyiphosteurovisionfreesitefreetlservep2pgfoggiafreiburgushikamifuranorfolkebibleksvikatsuyamarugame-hostyhostingxn--2m4a15efrenchkisshikirkeneservepicservequakefreseniuscultureggio-emilia-romagnakasatsunairguardiannakadomarinebraskaunicommbankaufentigerfribourgfriuli-v-giuliafriuli-ve-giuliafriuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgiuliafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giuliafriuliveneziagiuliafriulivgiuliafrlfroganservesarcasmatartanddesignfrognfrolandynv6from-akrehamnfrom-alfrom-arfrom-azurewebsiteshikagamiishibukawakepnoorfrom-capitalonewportransipharmacienservicesevastopolefrom-coalfrom-ctranslatedynvpnpluscountryestateofdelawareclaimschoolsztynsettsupportoyotomiyazakis-a-candidatefrom-dchitosetodayfrom-dediboxafrom-flandersevenassisienarvikautokeinoticeablewismillerfrom-gaulardalfrom-hichisochikuzenfrom-iafrom-idyroyrvikingruenoharafrom-ilfrom-in-berlindasewiiheyaizuwakamatsubushikusakadogawafrom-ksharpharmacyshawaiijimarcheapartmentshellaspeziafrom-kyfrom-lanshimokawafrom-mamurogawatsonfrom-mdfrom-medizinhistorischeshimokitayamattelekommunikationfrom-mifunefrom-mnfrom-modalenfrom-mshimonitayanagit-reposts-and-telecommunicationshimonosekikawafrom-mtnfrom-nchofunatoriginstantcloudfrontdoorfrom-ndfrom-nefrom-nhktistoryfrom-njshimosuwalkis-a-chefarsundyndns-mailfrom-nminamifuranofrom-nvalleedaostefrom-nynysagamiharafrom-ohdattorelayfrom-oketogolffanshimotsukefrom-orfrom-padualstackazoologicalfrom-pratogurafrom-ris-a-conservativegashimotsumayfirstockholmestrandfrom-schmidtre-gauldalfrom-sdscloudfrom-tnfrom-txn--2scrj9chonanbunkyonanaoshimakanegasakikugawaltervistailscaleforcefrom-utsiracusaikirovogradoyfrom-vald-aostarostwodzislawildlifestylefrom-vtransportefrom-wafrom-wiardwebview-assetshinichinanfrom-wvanylvenneslaskerrylogisticshinjournalismartlabelingfrom-wyfrosinonefrostalowa-wolawafroyal-commissionfruskydivingfujiiderafujikawaguchikonefujiminokamoenairkitapps-auction-rancherkasydneyfujinomiyadattowebhoptogakushimotoganefujiokayamandalfujisatoshonairlinedre-eikerfujisawafujishiroishidakabiratoridedyn-berlincolnfujitsuruokazakiryuohkurafujiyoshidavvenjargap-east-1fukayabeardubaiduckdnsncfdfukuchiyamadavvesiidappnodebalancertmgrazimutheworkpccwilliamhillfukudomigawafukuis-a-cpalacefukumitsubishigakisarazure-mobileirvikazteleportlligatransurlfukuokakamigaharafukuroishikarikaturindalfukusakishiwadazaifudaigokaseljordfukuyamagatakaharunusualpersonfunabashiriuchinadafunagatakahashimamakisofukushimangonnakatombetsumy-gatewayfunahashikamiamakusatsumasendaisenergyfundaciofunkfeuerfuoiskujukuriyamangyshlakasamatsudoomdnstracefuosskoczowinbar1furubirafurudonostiaafurukawajimaniwakuratefusodegaurafussaintlouis-a-anarchistoireggiocalabriafutabayamaguchinomihachimanagementrapaniizafutboldlygoingnowhere-for-morenakatsugawafuttsurutaharafuturecmshinjukumamotoyamashikefuturehostingfuturemailingfvghamurakamigoris-a-designerhandcraftedhandsonyhangglidinghangoutwentehannanmokuizumodenaklodzkochikuseihidorahannorthwesternmutualhanyuzenhapmircloudletshintokushimahappounzenharvestcelebrationhasamap-northeast-3hasaminami-alpshintomikasaharahashbangryhasudahasura-apphiladelphiaareadmyblogspotrdhasvikfh-muensterhatogayahoooshikamaishimofusartshinyoshitomiokamisunagawahatoyamazakitakatakanabeatshiojirishirifujiedahatsukaichikaiseiyoichimkentrendhostinghattfjelldalhayashimamotobusellfylkesbiblackbaudcdn-edgestackhero-networkisboringhazuminobushistoryhelplfinancialhelsinkitakyushuaiahembygdsforbundhemneshioyanaizuerichardlimanowarudahemsedalhepforgeblockshirahamatonbetsurgeonshalloffameiwamasoyheroyhetemlbfanhgtvaohigashiagatsumagoianiahigashichichibuskerudhigashihiroshimanehigashiizumozakitamigrationhigashikagawahigashikagurasoedahigashikawakitaaikitamotosunndalhigashikurumeeresinstaginghigashimatsushimarburghigashimatsuyamakitaakitadaitoigawahigashimurayamamotorcycleshirakokonoehigashinarusells-for-lesshiranukamitondabayashiogamagoriziahigashinehigashiomitamanortonsberghigashiosakasayamanakakogawahigashishirakawamatakanezawahigashisumiyoshikawaminamiaikitanakagusukumodernhigashitsunosegawahigashiurausukitashiobarahigashiyamatokoriyamanashifteditorxn--30rr7yhigashiyodogawahigashiyoshinogaris-a-doctorhippyhiraizumisatohnoshoohirakatashinagawahiranairportland-4-salernogiessennanjobojis-a-financialadvisor-aurdalhirarahiratsukaerusrcfastlylbanzaicloudappspotagerhirayaitakaokalmykiahistorichouseshiraois-a-geekhakassiahitachiomiyagildeskaliszhitachiotagonohejis-a-greenhitraeumtgeradegreehjartdalhjelmelandholeckodairaholidayholyhomegoodshiraokamitsuehomeiphilatelyhomelinkyard-cloudjiffyresdalhomelinuxn--32vp30hachiojiyahikobierzycehomeofficehomesecuritymacaparecidahomesecuritypchoseikarugamvikarlsoyhomesenseeringhomesklepphilipsynology-diskstationhomeunixn--3bst00minamiiserniahondahongooglecodebergentinghonjyoitakarazukaluganskharkivaporcloudhornindalhorsells-for-ustkanmakiwielunnerhortendofinternet-dnshiratakahagitapphoenixn--3ds443ghospitalhoteleshishikuis-a-guruhotelwithflightshisognehotmailhoyangerhoylandetakasagophonefosshisuifuettertdasnetzhumanitieshitaramahungryhurdalhurumajis-a-hard-workershizukuishimogosenhyllestadhyogoris-a-hunterhyugawarahyundaiwafuneis-into-carsiiitesilkharkovaresearchaeologicalvinklein-the-bandairtelebitbridgestoneenebakkeshibechambagricultureadymadealstahaugesunderseaportsinfolionetworkdalaheadjudygarlandis-into-cartoonsimple-urlis-into-gamesserlillyis-leetrentin-suedtirolis-lostre-toteneis-a-lawyeris-not-certifiedis-savedis-slickhersonis-uberleetrentino-a-adigeis-very-badajozis-a-liberalis-very-evillageis-very-goodyearis-very-niceis-very-sweetpepperugiais-with-thebandovre-eikerisleofmanaustdaljellybeanjenv-arubahccavuotnagaragusabaerobaticketsirdaljeonnamerikawauejetztrentino-aadigejevnakershusdecorativeartslupskhmelnytskyivarggatrentino-alto-adigejewelryjewishartgalleryjfkhplaystation-cloudyclusterjgorajlljls-sto1jls-sto2jls-sto3jmphotographysiojnjaworznospamproxyjoyentrentino-altoadigejoyokaichibajddarchitecturealtorlandjpnjprslzjurkotohiradomainstitutekotourakouhokutamamurakounosupabasembokukizunokunimilitarykouyamarylhurstjordalshalsenkouzushimasfjordenkozagawakozakis-a-llamarnardalkozowindowskrakowinnersnoasakatakkokamiminersokndalkpnkppspbarcelonagawakkanaibetsubamericanfamilyds3-fips-us-gov-west-1krasnikahokutokashikis-a-musiciankrasnodarkredstonekrelliankristiansandcatsolarssonkristiansundkrodsheradkrokstadelvalle-aostatic-accessolognekryminamiizukaminokawanishiaizubangekumanotteroykumatorinovecoregontrailroadkumejimashikis-a-nascarfankumenantokonamegatakatoris-a-nursells-itrentin-sud-tirolkunisakis-a-painteractivelvetrentin-sudtirolkunitachiaraindropilotsolundbecknx-serversellsyourhomeftphxn--3e0b707ekunitomigusukuleuvenetokigawakunneppuboliviajessheimpertrixcdn77-secureggioemiliaromagnamsosnowiechristiansburgminakamichiharakunstsammlungkunstunddesignkuokgroupimientaketomisatoolsomakurehabmerkurgankurobeeldengeluidkurogimimatakatsukis-a-patsfankuroisoftwarezzoologykuromatsunais-a-personaltrainerkuronkurotakikawasakis-a-photographerokussldkushirogawakustanais-a-playershiftcryptonomichigangwonkusupersalezajskomakiyosemitekutchanelkutnowruzhgorodeokuzumakis-a-republicanonoichinomiyakekvafjordkvalsundkvamscompute-1kvanangenkvinesdalkvinnheradkviteseidatingkvitsoykwpspdnsomnatalkzmisakis-a-soxfanmisasaguris-a-studentalmisawamisconfusedmishimasudamissilemisugitokuyamatsumaebashikshacknetrentino-sued-tirolmitakeharamitourismilemitoyoakemiuramiyazurecontainerdpolicemiyotamatsukuris-a-teacherkassyno-dshowamjondalenmonstermontrealestatefarmequipmentrentino-suedtirolmonza-brianzapposor-odalmonza-e-della-brianzaptokyotangotpantheonsitemonzabrianzaramonzaebrianzamonzaedellabrianzamoonscalebookinghostedpictetrentinoa-adigemordoviamoriyamatsumotofukemoriyoshiminamiashigaramormonmouthachirogatakamoriokakudamatsuemoroyamatsunomortgagemoscowiosor-varangermoseushimodatemosjoenmoskenesorfoldmossorocabalena-devicesorreisahayakawakamiichikawamisatottoris-a-techietis-a-landscaperspectakasakitchenmosvikomatsushimarylandmoteginowaniihamatamakinoharamoviemovimientolgamozilla-iotrentinoaadigemtranbytomaritimekeepingmuginozawaonsensiositemuikaminoyamaxunispacemukoebenhavnmulhouseoullensvanguardmunakatanemuncienciamuosattemupinbarclaycards3-sa-east-1murmanskomforbar2murotorcraftrentinoalto-adigemusashinoharamuseetrentinoaltoadigemuseumverenigingmusicargodaddyn-o-saurlandesortlandmutsuzawamy-wanggoupilemyactivedirectorymyamazeplaymyasustor-elvdalmycdmycloudnsoruminamimakis-a-rockstarachowicemydattolocalcertificationmyddnsgeekgalaxymydissentrentinos-tirolmydobissmarterthanyoumydrobofageologymydsoundcastronomy-vigorlicemyeffectrentinostirolmyfastly-terrariuminamiminowamyfirewalledreplittlestargardmyforuminamioguni5myfritzmyftpaccessouthcarolinaturalhistorymuseumcentermyhome-servermyjinomykolaivencloud66mymailermymediapchristmasakillucernemyokohamamatsudamypepinkommunalforbundmypetsouthwest1-uslivinghistorymyphotoshibalashovhadanorth-kazakhstanmypicturestaurantrentinosud-tirolmypsxn--3pxu8kommunemysecuritycamerakermyshopblocksowamyshopifymyspreadshopwarendalenugmythic-beastspectruminamisanrikubetsuppliesoomytis-a-bookkeepermaritimodspeedpartnermytuleap-partnersphinxn--41amyvnchromediatechnologymywirepaircraftingvollohmusashimurayamashikokuchuoplantationplantspjelkavikomorotsukagawaplatformsharis-a-therapistoiaplatter-appinokofuefukihaboromskogplatterpioneerplazaplcube-serversicherungplumbingoplurinacionalpodhalepodlasiellaktyubinskiptveterinairealmpmnpodzonepohlpoivronpokerpokrovskomvuxn--3hcrj9choyodobashichikashukujitawaraumalatvuopmicrosoftbankarmoypoliticarrierpolitiendapolkowicepoltavalle-d-aostaticspydebergpomorzeszowitdkongsbergponpesaro-urbino-pesarourbinopesaromasvuotnarusawapordenonepornporsangerporsangugeporsgrunnanyokoshibahikariwanumatakinouepoznanpraxis-a-bruinsfanprdpreservationpresidioprgmrprimetelemarkongsvingerprincipeprivatizehealthinsuranceprofesionalprogressivestfoldpromombetsupplypropertyprotectionprotonetrentinosued-tirolprudentialpruszkowithgoogleapiszprvcyberprzeworskogpulawypunyufuelveruminamiuonumassa-carrara-massacarraramassabuyshousesopotrentino-sud-tirolpupugliapussycateringebuzentsujiiepvhadselfiphdfcbankazunoticiashinkamigototalpvtrentinosuedtirolpwchungnamdalseidsbergmodellingmxn--11b4c3dray-dnsupdaterpzqhaebaruericssongdalenviknakayamaoris-a-cubicle-slavellinodeobjectshinshinotsurfashionstorebaselburguidefinimamateramochizukimobetsumidatlantichirurgiens-dentistes-en-franceqldqotoyohashimotoshimatsuzakis-an-accountantshowtimelbourneqponiatowadaqslgbtrentinsud-tirolqualifioappippueblockbusternopilawaquickconnectrentinsudtirolquicksytesrhtrentinsued-tirolquipelementsrltunestuff-4-saletunkonsulatrobeebyteappigboatsmolaquilanxessmushcdn77-sslingturystykaniepcetuscanytushuissier-justicetuvalleaostaverntuxfamilytwmailvestvagoyvevelstadvibo-valentiavibovalentiavideovillastufftoread-booksnestorfjordvinnicasadelamonedagestangevinnytsiavipsinaappiwatevirginiavirtual-uservecounterstrikevirtualcloudvirtualservervirtualuserveexchangevirtuelvisakuhokksundviterbolognagasakikonaikawagoevivianvivolkenkundenvixn--42c2d9avlaanderennesoyvladikavkazimierz-dolnyvladimirvlogintoyonezawavminanovologdanskonyveloftrentino-stirolvolvolkswagentstuttgartrentinsuedtirolvolyngdalvoorlopervossevangenvotevotingvotoyonovps-hostrowiecircustomer-ocimmobilienwixsitewloclawekoobindalwmcloudwmflabsurnadalwoodsidelmenhorstabackyardsurreyworse-thandawowithyoutuberspacekitagawawpdevcloudwpenginepoweredwphostedmailwpmucdnpixolinodeusercontentrentinosudtirolwpmudevcdnaccessokanagawawritesthisblogoipizzawroclawiwatsukiyonoshiroomgwtcirclerkstagewtfastvps-serverisignwuozuwzmiuwajimaxn--4gbriminingxn--4it168dxn--4it797kooris-a-libertarianxn--4pvxs4allxn--54b7fta0ccivilaviationredumbrellajollamericanexpressexyxn--55qw42gxn--55qx5dxn--5dbhl8dxn--5js045dxn--5rtp49civilisationrenderxn--5rtq34koperviklabudhabikinokawachinaganoharamcocottempurlxn--5su34j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264civilizationthewifiatmallorcafederation-webspacexn--80aaa0cvacationsusonoxn--80adxhksuzakananiimiharuxn--80ao21axn--80aqecdr1axn--80asehdbarclays3-us-east-2xn--80aswgxn--80aukraanghkembuchikujobservableusercontentrevisohughestripperxn--8dbq2axn--8ltr62koryokamikawanehonbetsuwanouchijiwadeliveryxn--8pvr4uxn--8y0a063axn--90a1affinitylotterybnikeisenbahnxn--90a3academiamicable-modemoneyxn--90aeroportalabamagasakishimabaraffleentry-snowplowiczeladzxn--90aishobarakawaharaoxn--90amckinseyxn--90azhytomyrxn--9dbhblg6dietritonxn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byandexcloudxn--asky-iraxn--aurskog-hland-jnbarefootballooningjerstadgcapebretonamicrolightingjesdalombardiadembroideryonagunicloudiherokuappanamasteiermarkaracoldwarszawauthgearappspacehosted-by-previderxn--avery-yuasakuragawaxn--b-5gaxn--b4w605ferdxn--balsan-sdtirol-nsbsuzukanazawaxn--bck1b9a5dre4civilwarmiasadoesntexisteingeekarpaczest-a-la-maisondre-landrayddns5yxn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fyaotsurgeryxn--bjddar-ptargithubpreviewsaitohmannore-og-uvdalxn--blt-elabourxn--bmlo-graingerxn--bod-2naturalsciencesnaturellesuzukis-an-actorxn--bozen-sdtirol-2obanazawaxn--brnny-wuacademy-firewall-gatewayxn--brnnysund-m8accident-investigation-acornxn--brum-voagatroandinosaureportrentoyonakagyokutoyakomaganexn--btsfjord-9zaxn--bulsan-sdtirol-nsbaremetalpha-myqnapcloud9guacuiababia-goracleaningitpagexlimoldell-ogliastraderxn--c1avgxn--c2br7gxn--c3s14mincomcastreserve-onlinexn--cck2b3bargainstances3-us-gov-west-1xn--cckwcxetdxn--cesena-forl-mcbremangerxn--cesenaforl-i8axn--cg4bkis-an-actresshwindmillxn--ciqpnxn--clchc0ea0b2g2a9gcdxn--comunicaes-v6a2oxn--correios-e-telecomunicaes-ghc29axn--czr694barreaudiblebesbydgoszczecinemagnethnologyoriikaragandauthordalandroiddnss3-ap-southeast-2ix4432-balsan-suedtirolimiteddnskinggfakefurniturecreationavuotnaritakoelnayorovigotsukisosakitahatakahatakaishimoichinosekigaharaurskog-holandingitlaborxn--czrs0trogstadxn--czru2dxn--czrw28barrel-of-knowledgeappgafanquanpachicappacificurussiautomotivelandds3-ca-central-16-balsan-sudtirollagdenesnaaseinet-freaks3-ap-southeast-123websiteleaf-south-123webseiteckidsmynasushiobarackmazerbaijan-mayen-rootaribeiraogakibichuobiramusementdllpages3-ap-south-123sitewebhareidfjordvagsoyerhcloudd-dnsiskinkyolasiteastcoastaldefenceastus2038xn--d1acj3barrell-of-knowledgecomputerhistoryofscience-fictionfabricafjs3-us-west-1xn--d1alfaromeoxn--d1atromsakegawaxn--d5qv7z876clanbibaidarmeniaxn--davvenjrga-y4axn--djrs72d6uyxn--djty4kosaigawaxn--dnna-grajewolterskluwerxn--drbak-wuaxn--dyry-iraxn--e1a4cldmailukowhitesnow-dnsangohtawaramotoineppubtlsanjotelulubin-brbambinagisobetsuitagajoburgjerdrumcprequalifymein-vigorgebetsukuibmdeveloperauniteroizumizakinderoyomitanobninskanzakiyokawaraustrheimatunduhrennebulsan-suedtirololitapunk123kotisivultrobjectselinogradimo-siemenscaledekaascolipiceno-ipifony-1337xn--eckvdtc9dxn--efvn9svalbardunloppaderbornxn--efvy88hagakhanamigawaxn--ehqz56nxn--elqq16hagebostadxn--eveni-0qa01gaxn--f6qx53axn--fct429kosakaerodromegallupaasdaburxn--fhbeiarnxn--finny-yuaxn--fiq228c5hsvchurchaseljeepsondriodejaneirockyotobetsuliguriaxn--fiq64barsycenterprisesakievennodesadistcgrouplidlugolekagaminord-frontierxn--fiqs8sveioxn--fiqz9svelvikoninjambylxn--fjord-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--forl-cesena-fcbssvizzeraxn--forlcesena-c8axn--fpcrj9c3dxn--frde-grandrapidsvn-repostorjcloud-ver-jpchowderxn--frna-woaraisaijosoyroroswedenxn--frya-hraxn--fzc2c9e2cleverappsannanxn--fzys8d69uvgmailxn--g2xx48clicketcloudcontrolapparmatsuuraxn--gckr3f0fauskedsmokorsetagayaseralingenoamishirasatogliattipschulserverxn--gecrj9clickrisinglesannohekinannestadraydnsanokaruizawaxn--ggaviika-8ya47haibarakitakamiizumisanofidelitysfjordxn--gildeskl-g0axn--givuotna-8yasakaiminatoyookaneyamazoexn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-an-anarchistoricalsocietysnesigdalxn--gmqw5axn--gnstigbestellen-zvbrplsbxn--45br5cylxn--gnstigliefern-wobihirosakikamijimatsushigexn--h-2failxn--h1aeghair-surveillancexn--h1ahnxn--h1alizxn--h2breg3eveneswidnicasacampinagrandebungotakadaemongolianxn--h2brj9c8clinichippubetsuikilatironporterxn--h3cuzk1digickoseis-a-linux-usershoujis-a-knightpointtohoboleslawieconomiastalbanshizuokamogawaxn--hbmer-xqaxn--hcesuolo-7ya35barsyonlinewhampshirealtychyattorneyagawakuyabukihokumakogeniwaizumiotsurugimbalsfjordeportexaskoyabeagleboardetroitskypecorivneatonoshoes3-eu-west-3utilitiesquare7xn--hebda8basicserversaillesjabbottateshinanomachildrensgardenhlfanhsbc66xn--hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4accident-prevention-aptibleangaviikadenaamesjevuemielnoboribetsuckswidnikkolobrzegersundxn--hnefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn--indery-fyasugithubusercontentromsojamisonxn--io0a7is-an-artistgstagexn--j1adpkomonotogawaxn--j1aefbsbxn--1lqs71dyndns-office-on-the-webhostingrpassagensavonarviikamiokameokamakurazakiwakunigamihamadaxn--j1ael8basilicataniautoscanadaeguambulancentralus-2xn--j1amhakatanorthflankddiamondshinshiroxn--j6w193gxn--jlq480n2rgxn--jlq61u9w7basketballfinanzgorzeleccodespotenzakopanewspaperxn--jlster-byasuokannamihokkaidopaaskvollxn--jrpeland-54axn--jvr189miniserversusakis-a-socialistg-builderxn--k7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--45brj9cistrondheimperiaxn--koluokta-7ya57hakodatexn--kprw13dxn--kpry57dxn--kput3is-an-engineeringxn--krager-gyatominamibosogndalxn--kranghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdevcloudfunctionsimplesitexn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsukanoyakagexn--kvnangen-k0axn--l-1fairwindswiebodzin-dslattuminamiyamashirokawanabeepilepsykkylvenicexn--l1accentureklamborghinikolaeventswinoujscienceandhistoryxn--laheadju-7yatsushiroxn--langevg-jxaxn--lcvr32dxn--ldingen-q1axn--leagaviika-52batochigifts3-us-west-2xn--lesund-huaxn--lgbbat1ad8jdfaststackschulplattformetacentrumeteorappassenger-associationxn--lgrd-poacctrusteexn--lhppi-xqaxn--linds-pramericanartrvestnestudioxn--lns-qlavagiskexn--loabt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liacliniquedapliexn--lten-granexn--lury-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddeswisstpetersburgxn--mgb9awbfbx-ostrowwlkpmguitarschwarzgwangjuifminamidaitomanchesterxn--mgba3a3ejtrycloudflarevistaplestudynamic-dnsrvaroyxn--mgba3a4f16axn--mgba3a4fra1-deloittevaksdalxn--mgba7c0bbn0axn--mgbaakc7dvfstdlibestadxn--mgbaam7a8hakonexn--mgbab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00batsfjordiscordsays3-website-ap-northeast-1xn--mgbai9azgqp6jejuniperxn--mgbayh7gpalmaseratis-an-entertainerxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgbcpq6gpa1axn--mgberp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbpl2fhskosherbrookegawaxn--mgbqly7c0a67fbclintonkotsukubankarumaifarmsteadrobaknoluoktachikawakayamadridvallee-aosteroyxn--mgbqly7cvafr-1xn--mgbt3dhdxn--mgbtf8flapymntrysiljanxn--mgbtx2bauhauspostman-echocolatemasekd1xn--mgbx4cd0abbvieeexn--mix082fbxoschweizxn--mix891fedorainfraclouderaxn--mjndalen-64axn--mk0axin-vpnclothingdustdatadetectjmaxxxn--12c1fe0bradescotlandrrxn--mk1bu44cn-northwest-1xn--mkru45is-bykleclerchoshibuyachiyodancexn--mlatvuopmi-s4axn--mli-tlavangenxn--mlselv-iuaxn--moreke-juaxn--mori-qsakurais-certifiedxn--mosjen-eyawaraxn--mot-tlazioxn--mre-og-romsdal-qqbuseranishiaritakurashikis-foundationxn--msy-ula0hakubaghdadultravelchannelxn--mtta-vrjjat-k7aflakstadaokagakicks-assnasaarlandxn--muost-0qaxn--mxtq1minisitexn--ngbc5azdxn--ngbe9e0axn--ngbrxn--45q11citadelhicampinashikiminohostfoldnavyxn--nit225koshimizumakiyosunnydayxn--nmesjevuemie-tcbalestrandabergamoarekeymachineustarnbergxn--nnx388axn--nodessakyotanabelaudiopsysynology-dstreamlitappittsburghofficialxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nttery-byaeserveftplanetariuminamitanexn--nvuotna-hwaxn--nyqy26axn--o1achernihivgubsxn--o3cw4hakuis-a-democratravelersinsurancexn--o3cyx2axn--od0algxn--od0aq3belementorayoshiokanumazuryukuhashimojibxos3-website-ap-southeast-1xn--ogbpf8flatangerxn--oppegrd-ixaxn--ostery-fyawatahamaxn--osyro-wuaxn--otu796dxn--p1acfedorapeoplegoismailillehammerfeste-ipatriaxn--p1ais-gonexn--pgbs0dhlx3xn--porsgu-sta26fedoraprojectoyotsukaidoxn--pssu33lxn--pssy2uxn--q7ce6axn--q9jyb4cngreaterxn--qcka1pmcpenzaporizhzhiaxn--qqqt11minnesotaketakayamassivegridxn--qxa6axn--qxamsterdamnserverbaniaxn--rady-iraxn--rdal-poaxn--rde-ulaxn--rdy-0nabaris-into-animeetrentin-sued-tirolxn--rennesy-v1axn--rhkkervju-01afeiraquarelleasingujaratoyouraxn--rholt-mragowoltlab-democraciaxn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5naturbruksgymnxn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmskog-byaxn--rny31hakusanagochihayaakasakawaiishopitsitexn--rovu88bellevuelosangeles3-website-ap-southeast-2xn--rros-granvindafjordxn--rskog-uuaxn--rst-0naturhistorischesxn--rsta-framercanvasxn--rvc1e0am3exn--ryken-vuaxn--ryrvik-byaxn--s-1faithaldenxn--s9brj9cnpyatigorskolecznagatorodoyxn--sandnessjen-ogbellunord-odalombardyn53xn--sandy-yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sgne-graphoxn--4dbgdty6citichernovtsyncloudrangedaluccarbonia-iglesias-carboniaiglesiascarboniaxn--skierv-utazasxn--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknland-fxaxn--slat-5natuurwetenschappenginexn--slt-elabcieszynh-servebeero-stageiseiroumuenchencoreapigeelvinckoshunantankmpspawnextdirectrentino-s-tirolxn--smla-hraxn--smna-gratangentlentapisa-geekosugexn--snase-nraxn--sndre-land-0cbeneventochiokinoshimaintenancebinordreisa-hockeynutazurestaticappspaceusercontentateyamaveroykenglandeltaitogitsumitakagiizeasypanelblagrarchaeologyeongbuk0emmafann-arboretumbriamallamaceiobbcg123homepagefrontappchizip61123minsidaarborteaches-yogasawaracingroks-theatree123hjemmesidealerimo-i-rana4u2-localhistorybolzano-altoadigeometre-experts-comptables3-ap-northeast-123miwebcambridgehirn4t3l3p0rtarumizusawabogadobeaemcloud-fr123paginaweberkeleyokosukanrabruzzombieidskoguchikushinonsenasakuchinotsuchiurakawafaicloudineat-url-o-g-i-naval-d-aosta-valleyokote164-b-datacentermezproxyzgoraetnabudejjudaicadaquest-mon-blogueurodirumaceratabuseating-organicbcn-north-123saitamakawabartheshopencraftrainingdyniajuedischesapeakebayernavigationavoi234lima-cityeats3-ap-northeast-20001wwwedeployokozeastasiamunemurorangecloudplatform0xn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbentleyurihonjournalistjohnikonanporovnobserverxn--srfold-byaxn--srreisa-q1axn--srum-gratis-a-bulls-fanxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbeppublishproxyusuharavocatanzarowegroweiboltashkentatamotorsitestingivingjemnes3-eu-central-1kappleadpages-12hpalmspringsakerxn--stre-toten-zcbeskidyn-ip24xn--t60b56axn--tckweddingxn--tiq49xqyjelasticbeanstalkhmelnitskiyamarumorimachidaxn--tjme-hraxn--tn0agrocerydxn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbestbuyshoparenagareyamaizurugbyenvironmentalconservationflashdrivefsnillfjordiscordsezjampaleoceanographics3-website-eu-west-1xn--trentin-sdtirol-7vbetainaboxfuseekloges3-website-sa-east-1xn--trentino-sd-tirol-c3bhzcasertainaioirasebastopologyeongnamegawafflecellclstagemologicaliforniavoues3-eu-west-1xn--trentino-sdtirol-szbielawalbrzycharitypedreamhostersvp4xn--trentinosd-tirol-rzbiellaakesvuemieleccebizenakanotoddeninoheguriitatebayashiibahcavuotnagaivuotnagaokakyotambabybluebitelevisioncilla-speziaxarnetbank8s3-eu-west-2xn--trentinosdtirol-7vbieszczadygeyachimataijiiyamanouchikuhokuryugasakitaurayasudaxn--trentinsd-tirol-6vbievat-band-campaignieznombrendlyngengerdalces3-website-us-east-1xn--trentinsdtirol-nsbifukagawalesundiscountypeformelhusgardeninomiyakonojorpelandiscourses3-website-us-west-1xn--trgstad-r1axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atvestre-slidrexn--uc0ay4axn--uist22halsakakinokiaxn--uisz3gxn--unjrga-rtarnobrzegyptianxn--unup4yxn--uuwu58axn--vads-jraxn--valle-aoste-ebbtularvikonskowolayangroupiemontexn--valle-d-aoste-ehboehringerikexn--valleaoste-e7axn--valledaoste-ebbvadsoccerxn--vard-jraxn--vegrshei-c0axn--vermgensberater-ctb-hostingxn--vermgensberatung-pwbigvalledaostaobaomoriguchiharag-cloud-championshiphoplixboxenirasakincheonishiazaindependent-commissionishigouvicasinordeste-idclkarasjohkamikitayamatsurindependent-inquest-a-la-masionishiharaxn--vestvgy-ixa6oxn--vg-yiabkhaziaxn--vgan-qoaxn--vgsy-qoa0jelenia-goraxn--vgu402cnsantabarbaraxn--vhquvestre-totennishiawakuraxn--vler-qoaxn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861biharstadotsubetsugaruhrxn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1cntjomeldaluroyxn--wgbl6axn--xhq521bihorologyusuisservegame-serverxn--xkc2al3hye2axn--xkc2dl3a5ee0hammarfeastafricaravantaaxn--y9a3aquariumintereitrentino-sudtirolxn--yer-znaumburgxn--yfro4i67oxn--ygarden-p1axn--ygbi2ammxn--4dbrk0cexn--ystre-slidre-ujbikedaejeonbukarasjokarasuyamarriottatsunoceanographiquehimejindependent-inquiryuufcfanishiizunazukindependent-panelomoliseminemrxn--zbx025dxn--zf0ao64axn--zf0avxlxn--zfr164bilbaogashimadachicagoboavistanbulsan-sudtirolbia-tempio-olbiatempioolbialystokkeliwebredirectme-south-1xnbayxz \ No newline at end of file diff --git a/vendor/golang.org/x/net/publicsuffix/list.go b/vendor/golang.org/x/net/publicsuffix/list.go index 7caeeaa6..d56e9e76 100644 --- a/vendor/golang.org/x/net/publicsuffix/list.go +++ b/vendor/golang.org/x/net/publicsuffix/list.go @@ -101,10 +101,10 @@ loop: break } - u := uint32(nodeValue(f) >> (nodesBitsTextOffset + nodesBitsTextLength)) + u := uint32(nodes.get(f) >> (nodesBitsTextOffset + nodesBitsTextLength)) icannNode = u&(1<>= nodesBitsICANN - u = children[u&(1<>= childrenBitsLo hi = u & (1<>= nodesBitsTextLength offset := x & (1< 4 || major == 4 && minor >= 11) +} + func doinit() { if err := readHWCAP(); err != nil { - // failed to read /proc/self/auxv, try reading registers directly - readARM64Registers() + // We failed to read /proc/self/auxv. This can happen if the binary has + // been given extra capabilities(7) with /bin/setcap. + // + // When this happens, we have two options. If the Linux kernel is new + // enough (4.11+), we can read the arm64 registers directly which'll + // trap into the kernel and then return back to userspace. + // + // But on older kernels, such as Linux 4.4.180 as used on many Synology + // devices, calling readARM64Registers (specifically getisar0) will + // cause a SIGILL and we'll die. So for older kernels, parse /proc/cpuinfo + // instead. + // + // See golang/go#57336. + if linuxKernelCanEmulateCPUID() { + readARM64Registers() + } else { + readLinuxProcCPUInfo() + } return } diff --git a/vendor/golang.org/x/sys/cpu/parse.go b/vendor/golang.org/x/sys/cpu/parse.go new file mode 100644 index 00000000..762b63d6 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/parse.go @@ -0,0 +1,43 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +import "strconv" + +// parseRelease parses a dot-separated version number. It follows the semver +// syntax, but allows the minor and patch versions to be elided. +// +// This is a copy of the Go runtime's parseRelease from +// https://golang.org/cl/209597. +func parseRelease(rel string) (major, minor, patch int, ok bool) { + // Strip anything after a dash or plus. + for i := 0; i < len(rel); i++ { + if rel[i] == '-' || rel[i] == '+' { + rel = rel[:i] + break + } + } + + next := func() (int, bool) { + for i := 0; i < len(rel); i++ { + if rel[i] == '.' { + ver, err := strconv.Atoi(rel[:i]) + rel = rel[i+1:] + return ver, err == nil + } + } + ver, err := strconv.Atoi(rel) + rel = "" + return ver, err == nil + } + if major, ok = next(); !ok || rel == "" { + return + } + if minor, ok = next(); !ok || rel == "" { + return + } + patch, ok = next() + return +} diff --git a/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go b/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go new file mode 100644 index 00000000..d87bd6b3 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go @@ -0,0 +1,54 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && arm64 +// +build linux,arm64 + +package cpu + +import ( + "errors" + "io" + "os" + "strings" +) + +func readLinuxProcCPUInfo() error { + f, err := os.Open("/proc/cpuinfo") + if err != nil { + return err + } + defer f.Close() + + var buf [1 << 10]byte // enough for first CPU + n, err := io.ReadFull(f, buf[:]) + if err != nil && err != io.ErrUnexpectedEOF { + return err + } + in := string(buf[:n]) + const features = "\nFeatures : " + i := strings.Index(in, features) + if i == -1 { + return errors.New("no CPU features found") + } + in = in[i+len(features):] + if i := strings.Index(in, "\n"); i != -1 { + in = in[:i] + } + m := map[string]*bool{} + + initOptions() // need it early here; it's harmless to call twice + for _, o := range options { + m[o.Name] = o.Feature + } + // The EVTSTRM field has alias "evstrm" in Go, but Linux calls it "evtstrm". + m["evtstrm"] = &ARM64.HasEVTSTRM + + for _, f := range strings.Fields(in) { + if p, ok := m[f]; ok { + *p = true + } + } + return nil +} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go119.go b/vendor/golang.org/x/sys/execabs/execabs_go119.go index 1e7a9ada..46c5b525 100644 --- a/vendor/golang.org/x/sys/execabs/execabs_go119.go +++ b/vendor/golang.org/x/sys/execabs/execabs_go119.go @@ -7,9 +7,11 @@ package execabs -import "strings" +import ( + "errors" + "os/exec" +) func isGo119ErrDot(err error) bool { - // TODO: return errors.Is(err, exec.ErrDot) - return strings.Contains(err.Error(), "current directory") + return errors.Is(err, exec.ErrDot) } diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go index 0dee2322..b06f52d7 100644 --- a/vendor/golang.org/x/sys/unix/gccgo.go +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build gccgo && !aix -// +build gccgo,!aix +//go:build gccgo && !aix && !hurd +// +build gccgo,!aix,!hurd package unix diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c index 2cb1fefa..c4fce0e7 100644 --- a/vendor/golang.org/x/sys/unix/gccgo_c.c +++ b/vendor/golang.org/x/sys/unix/gccgo_c.c @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build gccgo -// +build !aix +// +build gccgo,!hurd +// +build !aix,!hurd #include #include diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go index 6c7ad052..1c51b0ec 100644 --- a/vendor/golang.org/x/sys/unix/ioctl.go +++ b/vendor/golang.org/x/sys/unix/ioctl.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris +//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris +// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris package unix diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index 727cba21..8e3947c3 100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -174,10 +174,10 @@ openbsd_arm64) mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; openbsd_mips64) + mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" - mksyscall="go run mksyscall.go -openbsd" + mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" - mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go index 453a942c..3865943f 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go @@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) { return msgs, nil } +// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header, +// message data (a slice of b), and the remainder of b after that single message. +// When there are no remaining messages, len(remainder) == 0. +func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) { + h, dbuf, err := socketControlMessageHeaderAndData(b) + if err != nil { + return Cmsghdr{}, nil, nil, err + } + if i := cmsgAlignOf(int(h.Len)); i < len(b) { + remainder = b[i:] + } + return *h, dbuf, remainder, nil +} + func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) { h := (*Cmsghdr)(unsafe.Pointer(&b[0])) if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) { diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 61c0d0de..a41111a7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -255,6 +255,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index de7c23e0..d50b9dc2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -319,6 +319,7 @@ func PtraceSingleStep(pid int) (err error) { //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go new file mode 100644 index 00000000..4ffb6480 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -0,0 +1,22 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build hurd +// +build hurd + +package unix + +/* +#include +int ioctl(int, unsigned long int, uintptr_t); +*/ +import "C" + +func ioctl(fd int, req uint, arg uintptr) (err error) { + r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) + if r0 == -1 && er != nil { + err = er + } + return +} diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd_386.go b/vendor/golang.org/x/sys/unix/syscall_hurd_386.go new file mode 100644 index 00000000..7cf54a3e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_hurd_386.go @@ -0,0 +1,29 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build 386 && hurd +// +build 386,hurd + +package unix + +const ( + TIOCGETA = 0x62251713 +) + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index e044d5b5..d839962e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1554,6 +1554,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) + iov = iova[:] } } msg.Control = &oob[0] @@ -1972,36 +1973,46 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { //sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 //sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 -func bytes2iovec(bs [][]byte) []Iovec { - iovecs := make([]Iovec, len(bs)) - for i, b := range bs { - iovecs[i].SetLen(len(b)) +// minIovec is the size of the small initial allocation used by +// Readv, Writev, etc. +// +// This small allocation gets stack allocated, which lets the +// common use case of len(iovs) <= minIovs avoid more expensive +// heap allocations. +const minIovec = 8 + +// appendBytes converts bs to Iovecs and appends them to vecs. +func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { + for _, b := range bs { + var v Iovec + v.SetLen(len(b)) if len(b) > 0 { - iovecs[i].Base = &b[0] + v.Base = &b[0] } else { - iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero)) + v.Base = (*byte)(unsafe.Pointer(&_zero)) } + vecs = append(vecs, v) } - return iovecs + return vecs } -// offs2lohi splits offs into its lower and upper unsigned long. On 64-bit -// systems, hi will always be 0. On 32-bit systems, offs will be split in half. -// preadv/pwritev chose this calling convention so they don't need to add a -// padding-register for alignment on ARM. +// offs2lohi splits offs into its low and high order bits. func offs2lohi(offs int64) (lo, hi uintptr) { - return uintptr(offs), uintptr(uint64(offs) >> SizeofLong) + const longBits = SizeofLong * 8 + return uintptr(offs), uintptr(uint64(offs) >> longBits) } func Readv(fd int, iovs [][]byte) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) n, err = readv(fd, iovecs) readvRacedetect(iovecs, n, err) return n, err } func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) n, err = preadv(fd, iovecs, lo, hi) readvRacedetect(iovecs, n, err) @@ -2009,7 +2020,8 @@ func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { } func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) n, err = preadv2(fd, iovecs, lo, hi, flags) readvRacedetect(iovecs, n, err) @@ -2036,7 +2048,8 @@ func readvRacedetect(iovecs []Iovec, n int, err error) { } func Writev(fd int, iovs [][]byte) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } @@ -2046,7 +2059,8 @@ func Writev(fd int, iovs [][]byte) (n int, err error) { } func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } @@ -2057,7 +2071,8 @@ func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { } func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { - iovecs := bytes2iovec(iovs) + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 666f0a1b..35a3ad75 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -110,6 +110,20 @@ func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } +func SysctlUvmexp(name string) (*Uvmexp, error) { + mib, err := sysctlmib(name) + if err != nil { + return nil, err + } + + n := uintptr(SizeofUvmexp) + var u Uvmexp + if err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil { + return nil, err + } + return &u, nil +} + func Pipe(p []int) (err error) { return Pipe2(p, 0) } @@ -245,6 +259,7 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 78daceb3..9b67b908 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -220,6 +220,7 @@ func Uname(uname *Utsname) error { //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go index e23c5394..04aa43f4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build openbsd && !mips64 -// +build openbsd,!mips64 +//go:build openbsd +// +build openbsd package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 2109e569..07ac5610 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -590,6 +590,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Chmod(path string, mode uint32) (err error) //sys Chown(path string, uid int, gid int) (err error) //sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Creat(path string, mode uint32) (fd int, err error) //sys Dup(fd int) (nfd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 00bafda8..a386f889 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -331,6 +331,19 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { return } +// Recvmsg receives a message from a socket using the recvmsg system call. The +// received non-control data will be written to p, and any "out of band" +// control data will be written to oob. The flags are passed to recvmsg. +// +// The results are: +// - n is the number of non-control data bytes read into p +// - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage] +// - recvflags is flags returned by recvmsg +// - from is the address of the sender +// +// If the underlying socket type is not SOCK_DGRAM, a received message +// containing oob data and a single '\0' of non-control data is treated as if +// the message contained only control data, i.e. n will be zero on return. func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var iov [1]Iovec if len(p) > 0 { @@ -346,13 +359,9 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from return } -// RecvmsgBuffers receives a message from a socket using the recvmsg -// system call. The flags are passed to recvmsg. Any non-control data -// read is scattered into the buffers slices. The results are: -// - n is the number of non-control data read into bufs -// - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage] -// - recvflags is flags returned by recvmsg -// - from is the address of the sender +// RecvmsgBuffers receives a message from a socket using the recvmsg system +// call. This function is equivalent to Recvmsg, but non-control data read is +// scattered into the buffers slices. func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { iov := make([]Iovec, len(buffers)) for i := range buffers { @@ -371,11 +380,38 @@ func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn in return } +// Sendmsg sends a message on a socket to an address using the sendmsg system +// call. This function is equivalent to SendmsgN, but does not return the +// number of bytes actually sent. func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { _, err = SendmsgN(fd, p, oob, to, flags) return } +// SendmsgN sends a message on a socket to an address using the sendmsg system +// call. p contains the non-control data to send, and oob contains the "out of +// band" control data. The flags are passed to sendmsg. The number of +// non-control bytes actually written to the socket is returned. +// +// Some socket types do not support sending control data without accompanying +// non-control data. If p is empty, and oob contains control data, and the +// underlying socket type is not SOCK_DGRAM, p will be treated as containing a +// single '\0' and the return value will indicate zero bytes sent. +// +// The Go function Recvmsg, if called with an empty p and a non-empty oob, +// will read and ignore this additional '\0'. If the message is received by +// code that does not use Recvmsg, or that does not use Go at all, that code +// will need to be written to expect and ignore the additional '\0'. +// +// If you need to send non-empty oob with p actually empty, and if the +// underlying socket type supports it, you can do so via a raw system call as +// follows: +// +// msg := &unix.Msghdr{ +// Control: &oob[0], +// } +// msg.SetControllen(len(oob)) +// n, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags) func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { var iov [1]Iovec if len(p) > 0 { @@ -394,9 +430,8 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) } // SendmsgBuffers sends a message on a socket to an address using the sendmsg -// system call. The flags are passed to sendmsg. Any non-control data written -// is gathered from buffers. The function returns the number of bytes written -// to the socket. +// system call. This function is equivalent to SendmsgN, but the non-control +// data is gathered from buffers. func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) { iov := make([]Iovec, len(buffers)) for i := range buffers { diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go index 6d56edc0..af20e474 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -46,6 +46,7 @@ const ( AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 + ALTWERASE = 0x200 ARPHRD_ETHER = 0x1 ARPHRD_FRELAY = 0xf ARPHRD_IEEE1394 = 0x18 @@ -108,6 +109,15 @@ const ( BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_OUT = 0x2 BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -136,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -147,6 +158,12 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x6 + CLOCK_MONOTONIC = 0x3 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x4 + CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 @@ -170,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc100445d + DIOCADDRULE = 0xccc84404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xccc8441a + DIOCCLRIFFLAG = 0xc024445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0d04412 + DIOCCLRSTATUS = 0xc0244416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1084460 + DIOCGETQUEUE = 0xc100445f + DIOCGETQUEUES = 0xc100445e + DIOCGETRULE = 0xccc84407 + DIOCGETRULES = 0xccc84406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0084454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0084419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0244457 + DIOCKILLSRCNODES = 0xc068445b + DIOCKILLSTATES = 0xc0d04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc084444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0844450 + DIOCRADDADDRS = 0xc44c4443 + DIOCRADDTABLES = 0xc44c443d + DIOCRCLRADDRS = 0xc44c4442 + DIOCRCLRASTATS = 0xc44c4448 + DIOCRCLRTABLES = 0xc44c443c + DIOCRCLRTSTATS = 0xc44c4441 + DIOCRDELADDRS = 0xc44c4444 + DIOCRDELTABLES = 0xc44c443e + DIOCRGETADDRS = 0xc44c4446 + DIOCRGETASTATS = 0xc44c4447 + DIOCRGETTABLES = 0xc44c443f + DIOCRGETTSTATS = 0xc44c4440 + DIOCRINADEFINE = 0xc44c444d + DIOCRSETADDRS = 0xc44c4445 + DIOCRSETTFLAGS = 0xc44c444a + DIOCRTSTADDRS = 0xc44c4449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0244459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0244414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc00c4451 + DIOCXCOMMIT = 0xc00c4452 + DIOCXROLLBACK = 0xc00c4453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -186,6 +261,7 @@ const ( DLT_LOOP = 0xc DLT_MPLS = 0xdb DLT_NULL = 0x0 + DLT_OPENFLOW = 0x10b DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPP = 0x9 @@ -196,6 +272,23 @@ const ( DLT_RAW = 0xe DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xf + DLT_USBPCAP = 0xf9 + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -215,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -267,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -298,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -326,15 +423,17 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b @@ -409,28 +508,40 @@ const ( ETHER_CRC_POLY_LE = 0xedb88320 ETHER_HDR_LEN = 0xe ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 + EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 + EVL_ENCAPLEN = 0x4 + EVL_PRIO_BITS = 0xd + EVL_PRIO_MAX = 0x7 + EVL_VLID_MASK = 0xfff + EVL_VLID_MAX = 0xffe + EVL_VLID_MIN = 0x1 + EVL_VLID_NULL = 0x0 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -443,6 +554,7 @@ const ( F_GETFL = 0x3 F_GETLK = 0x7 F_GETOWN = 0x5 + F_ISATTY = 0xb F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 @@ -460,7 +572,6 @@ const ( IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8e52 @@ -471,12 +582,12 @@ const ( IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x20 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 @@ -605,6 +716,7 @@ const ( IFT_LINEGROUP = 0xd2 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 + IFT_MBIM = 0xfa IFT_MEDIAMAILOVERIP = 0x8b IFT_MFSIGLINK = 0xa7 IFT_MIOX25 = 0x26 @@ -695,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -729,8 +842,6 @@ const ( IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 @@ -762,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -787,6 +900,7 @@ const ( IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff + IPV6_MINHOPCOUNT = 0x41 IPV6_MMTU = 0x500 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 @@ -826,12 +940,12 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 IP_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d + IP_IPDEFTTL = 0x25 IP_IPSECFLOWINFO = 0x24 IP_IPSEC_LOCAL_AUTH = 0x1b IP_IPSEC_LOCAL_CRED = 0x19 @@ -865,10 +979,15 @@ const ( IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RTABLE = 0x1021 + IP_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 + IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 @@ -900,10 +1019,11 @@ const ( MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 - MAP_NOEXTEND = 0x100 - MAP_NORESERVE = 0x40 + MAP_INHERIT_ZERO = 0x3 + MAP_NOEXTEND = 0x0 + MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 - MAP_RENAME = 0x20 + MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 @@ -922,6 +1042,7 @@ const ( MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 + MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 @@ -929,13 +1050,29 @@ const ( MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 + MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 @@ -946,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -953,12 +1091,16 @@ const ( NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 + NET_RT_IFNAMES = 0x6 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 + NOTE_CHANGE = 0x1 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EOF = 0x2 @@ -968,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -977,11 +1120,13 @@ const ( NOTE_TRUNCATE = 0x80 NOTE_WRITE = 0x2 OCRNL = 0x10 + OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 + OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 @@ -1015,7 +1160,6 @@ const ( PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 - PT_MASK = 0x3ff000 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 @@ -1027,19 +1171,25 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 + RTAX_BFD = 0xb RTAX_BRD = 0x7 + RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa - RTAX_MAX = 0xb + RTAX_MAX = 0xf RTAX_NETMASK = 0x2 + RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 + RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 + RTA_BFD = 0x800 RTA_BRD = 0x80 + RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 @@ -1047,49 +1197,57 @@ const ( RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 + RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 + RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 + RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 + RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x10f808 + RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 - RTF_MASK = 0x80 + RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 + RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 - RTF_SOURCE = 0x20000 RTF_STATIC = 0x800 - RTF_TUNNEL = 0x100000 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 + RTM_80211INFO = 0x15 RTM_ADD = 0x1 + RTM_BFD = 0x12 RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe - RTM_LOCK = 0x8 + RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc + RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1099,67 +1257,74 @@ const ( RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 + RT_TABLEID_BITS = 0x8 + RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8218691c SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8054693c - SIOCBRDGADDS = 0x80546941 - SIOCBRDGARL = 0x806e694d + SIOCBRDGADD = 0x805c693c + SIOCBRDGADDL = 0x805c6949 + SIOCBRDGADDS = 0x805c6941 + SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8054693d - SIOCBRDGDELS = 0x80546942 - SIOCBRDGFLUSH = 0x80546948 - SIOCBRDGFRL = 0x806e694e + SIOCBRDGDEL = 0x805c693d + SIOCBRDGDELS = 0x805c6942 + SIOCBRDGFLUSH = 0x805c6948 + SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGIFFLGS = 0xc05c693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc03c6958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f - SIOCBRDGGSIFS = 0xc054693c SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0546942 + SIOCBRDGIFS = 0xc05c6942 SIOCBRDGRTS = 0xc0186943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80546955 - SIOCBRDGSIFFLGS = 0x8054693f - SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSIFCOST = 0x805c6955 + SIOCBRDGSIFFLGS = 0x805c693f + SIOCBRDGSIFPRIO = 0x805c6954 + SIOCBRDGSIFPROT = 0x805c694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 + SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 + SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e + SIOCDPWE3NEIGHBOR = 0x802069de + SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a + SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0086924 SIOCGIFDATA = 0xc020691b @@ -1168,40 +1333,53 @@ const ( SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc024698d SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0286936 + SIOCGIFLLPRIO = 0xc02069b6 + SIOCGIFMEDIA = 0xc0386938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPAIR = 0xc02069b1 + SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 - SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFRXR = 0x802069aa + SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 + SIOCGUMBINFO = 0xc02069be + SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 + SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 + SIOCIFAFATTACH = 0x801169ab + SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 + SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e @@ -1209,25 +1387,37 @@ const ( SIOCSIFGATTR = 0x8024698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 + SIOCSIFLLPRIO = 0x802069b5 + SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPAIR = 0x802069b0 + SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 + SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 + SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 + SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 + SOCK_DNS = 0x1000 + SOCK_NONBLOCK = 0x4000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 @@ -1238,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1245,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1258,6 +1450,7 @@ const ( SO_TIMESTAMP = 0x800 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 + SO_ZEROIZE = 0x2000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 @@ -1287,9 +1480,24 @@ const ( S_IXOTH = 0x1 S_IXUSR = 0x40 TCIFLUSH = 0x1 + TCIOFF = 0x3 TCIOFLUSH = 0x3 + TCION = 0x4 TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 + TCOOFF = 0x1 + TCOON = 0x2 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1298,11 +1506,15 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 + TIOCCHKVERAUTH = 0x2000741e + TIOCCLRVERAUTH = 0x2000741d TIOCCONS = 0x80047462 TIOCDRAIN = 0x2000745e TIOCEXCL = 0x2000740d @@ -1357,17 +1569,21 @@ const ( TIOCSETAF = 0x802c7416 TIOCSETAW = 0x802c7415 TIOCSETD = 0x8004741b + TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 + TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 + TIOCUCNTL_CBRK = 0x7a + TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 + UTIME_NOW = -0x2 + UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 @@ -1378,6 +1594,19 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 + VM_ANONMIN = 0x7 + VM_LOADAVG = 0x2 + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd + VM_MAXSLP = 0xa + VM_METER = 0x1 + VM_NKMEMPAGES = 0x6 + VM_PSSTRINGS = 0x3 + VM_SWAPENCRYPT = 0x5 + VM_USPACE = 0xb + VM_UVMEXP = 0x4 + VM_VNODEMIN = 0x9 + VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc @@ -1390,8 +1619,8 @@ const ( WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 - WSTOPPED = 0x7f WUNTRACED = 0x2 + XCASE = 0x1000000 ) // Errors @@ -1405,6 +1634,7 @@ const ( EALREADY = syscall.Errno(0x25) EAUTH = syscall.Errno(0x50) EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x5c) EBADRPC = syscall.Errno(0x48) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x58) @@ -1431,7 +1661,7 @@ const ( EIPSEC = syscall.Errno(0x52) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) - ELAST = syscall.Errno(0x5b) + ELAST = syscall.Errno(0x5f) ELOOP = syscall.Errno(0x3e) EMEDIUMTYPE = syscall.Errno(0x56) EMFILE = syscall.Errno(0x18) @@ -1459,12 +1689,14 @@ const ( ENOTCONN = syscall.Errno(0x39) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) + EOWNERDEAD = syscall.Errno(0x5e) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) EPIPE = syscall.Errno(0x20) @@ -1472,6 +1704,7 @@ const ( EPROCUNAVAIL = syscall.Errno(0x4c) EPROGMISMATCH = syscall.Errno(0x4b) EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5f) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) ERANGE = syscall.Errno(0x22) @@ -1568,7 +1801,7 @@ var errorList = [...]struct { {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, - {35, "EWOULDBLOCK", "resource temporarily unavailable"}, + {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, @@ -1624,7 +1857,11 @@ var errorList = [...]struct { {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, - {91, "ELAST", "not supported"}, + {91, "ENOTSUP", "not supported"}, + {92, "EBADMSG", "bad message"}, + {93, "ENOTRECOVERABLE", "state not recoverable"}, + {94, "EOWNERDEAD", "previous owner died"}, + {95, "ELAST", "protocol error"}, } // Signal table @@ -1638,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1665,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go index 25cb6094..6015fcb2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -109,6 +109,15 @@ const ( BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_OUT = 0x2 BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -137,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -177,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc110445d + DIOCADDRULE = 0xcd604404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcd60441a + DIOCCLRIFFLAG = 0xc028445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0e04412 + DIOCCLRSTATUS = 0xc0284416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1204460 + DIOCGETQUEUE = 0xc110445f + DIOCGETQUEUES = 0xc110445e + DIOCGETRULE = 0xcd604407 + DIOCGETRULES = 0xcd604406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0104454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0104419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0284457 + DIOCKILLSRCNODES = 0xc080445b + DIOCKILLSTATES = 0xc0e04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc4504443 + DIOCRADDTABLES = 0xc450443d + DIOCRCLRADDRS = 0xc4504442 + DIOCRCLRASTATS = 0xc4504448 + DIOCRCLRTABLES = 0xc450443c + DIOCRCLRTSTATS = 0xc4504441 + DIOCRDELADDRS = 0xc4504444 + DIOCRDELTABLES = 0xc450443e + DIOCRGETADDRS = 0xc4504446 + DIOCRGETASTATS = 0xc4504447 + DIOCRGETTABLES = 0xc450443f + DIOCRGETTSTATS = 0xc4504440 + DIOCRINADEFINE = 0xc450444d + DIOCRSETADDRS = 0xc4504445 + DIOCRSETTFLAGS = 0xc450444a + DIOCRTSTADDRS = 0xc4504449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0284459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0284414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc0104451 + DIOCXCOMMIT = 0xc0104452 + DIOCXROLLBACK = 0xc0104453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -240,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -292,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -323,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -351,15 +423,17 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b @@ -441,10 +515,11 @@ const ( ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 @@ -466,7 +541,7 @@ const ( EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -732,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -797,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -906,6 +984,9 @@ const ( IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 @@ -970,12 +1051,26 @@ const ( MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -988,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -996,7 +1092,8 @@ const ( NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 @@ -1013,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -1130,9 +1228,11 @@ const ( RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 + RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 @@ -1140,7 +1240,6 @@ const ( RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 - RTM_LOCK = 0x8 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 @@ -1148,7 +1247,7 @@ const ( RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1166,6 +1265,9 @@ const ( RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1182,35 +1284,37 @@ const ( SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 + SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 + SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a @@ -1229,6 +1333,7 @@ const ( SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 @@ -1243,13 +1348,21 @@ const ( SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa + SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 @@ -1287,19 +1400,20 @@ const ( SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 @@ -1314,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1321,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1370,7 +1486,18 @@ const ( TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 - TCP_MAXBURST = 0x4 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1379,8 +1506,11 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e @@ -1445,7 +1575,6 @@ const ( TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 - TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 @@ -1467,7 +1596,8 @@ const ( VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 - VM_MAXID = 0xc + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 @@ -1745,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1772,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go index aef6c085..8d44955e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -46,6 +46,7 @@ const ( AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 + ALTWERASE = 0x200 ARPHRD_ETHER = 0x1 ARPHRD_FRELAY = 0xf ARPHRD_IEEE1394 = 0x18 @@ -82,7 +83,7 @@ const ( BIOCGFILDROP = 0x40044278 BIOCGHDRCMPLT = 0x40044274 BIOCGRSIG = 0x40044273 - BIOCGRTIMEOUT = 0x400c426e + BIOCGRTIMEOUT = 0x4010426e BIOCGSTATS = 0x4008426f BIOCIMMEDIATE = 0x80044270 BIOCLOCK = 0x20004276 @@ -96,7 +97,7 @@ const ( BIOCSFILDROP = 0x80044279 BIOCSHDRCMPLT = 0x80044275 BIOCSRSIG = 0x80044272 - BIOCSRTIMEOUT = 0x800c426d + BIOCSRTIMEOUT = 0x8010426d BIOCVERSION = 0x40044271 BPF_A = 0x10 BPF_ABS = 0x20 @@ -108,6 +109,15 @@ const ( BPF_DIRECTION_IN = 0x1 BPF_DIRECTION_OUT = 0x2 BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -136,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -147,6 +158,12 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x6 + CLOCK_MONOTONIC = 0x3 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x4 + CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 @@ -170,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc100445d + DIOCADDRULE = 0xcce04404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcce0441a + DIOCCLRIFFLAG = 0xc024445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0d04412 + DIOCCLRSTATUS = 0xc0244416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1084460 + DIOCGETQUEUE = 0xc100445f + DIOCGETQUEUES = 0xc100445e + DIOCGETRULE = 0xcce04407 + DIOCGETRULES = 0xcce04406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0084454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0084419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0244457 + DIOCKILLSRCNODES = 0xc068445b + DIOCKILLSTATES = 0xc0d04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc44c4443 + DIOCRADDTABLES = 0xc44c443d + DIOCRCLRADDRS = 0xc44c4442 + DIOCRCLRASTATS = 0xc44c4448 + DIOCRCLRTABLES = 0xc44c443c + DIOCRCLRTSTATS = 0xc44c4441 + DIOCRDELADDRS = 0xc44c4444 + DIOCRDELTABLES = 0xc44c443e + DIOCRGETADDRS = 0xc44c4446 + DIOCRGETASTATS = 0xc44c4447 + DIOCRGETTABLES = 0xc44c443f + DIOCRGETTSTATS = 0xc44c4440 + DIOCRINADEFINE = 0xc44c444d + DIOCRSETADDRS = 0xc44c4445 + DIOCRSETTFLAGS = 0xc44c444a + DIOCRTSTADDRS = 0xc44c4449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0244459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0244414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc00c4451 + DIOCXCOMMIT = 0xc00c4452 + DIOCXROLLBACK = 0xc00c4453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -186,6 +261,7 @@ const ( DLT_LOOP = 0xc DLT_MPLS = 0xdb DLT_NULL = 0x0 + DLT_OPENFLOW = 0x10b DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPP = 0x9 @@ -196,6 +272,23 @@ const ( DLT_RAW = 0xe DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xf + DLT_USBPCAP = 0xf9 + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -215,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -267,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -298,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -326,15 +423,17 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 ETHERTYPE_PPP = 0x880b @@ -409,28 +508,40 @@ const ( ETHER_CRC_POLY_LE = 0xedb88320 ETHER_HDR_LEN = 0xe ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 + EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x7 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 + EVL_ENCAPLEN = 0x4 + EVL_PRIO_BITS = 0xd + EVL_PRIO_MAX = 0x7 + EVL_VLID_MASK = 0xfff + EVL_VLID_MAX = 0xffe + EVL_VLID_MIN = 0x1 + EVL_VLID_NULL = 0x0 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 - EV_SYSFLAGS = 0xf000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -443,6 +554,8 @@ const ( F_GETFL = 0x3 F_GETLK = 0x7 F_GETOWN = 0x5 + F_ISATTY = 0xb + F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 F_SETFL = 0x4 @@ -459,7 +572,6 @@ const ( IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 - IFA_ROUTE = 0x1 IFF_ALLMULTI = 0x200 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x8e52 @@ -470,12 +582,12 @@ const ( IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 - IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x20 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 @@ -604,6 +716,7 @@ const ( IFT_LINEGROUP = 0xd2 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 + IFT_MBIM = 0xfa IFT_MEDIAMAILOVERIP = 0x8b IFT_MFSIGLINK = 0xa7 IFT_MIOX25 = 0x26 @@ -694,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -728,8 +842,6 @@ const ( IPPROTO_AH = 0x33 IPPROTO_CARP = 0x70 IPPROTO_DIVERT = 0x102 - IPPROTO_DIVERT_INIT = 0x2 - IPPROTO_DIVERT_RESP = 0x1 IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 @@ -761,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -786,6 +900,7 @@ const ( IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff + IPV6_MINHOPCOUNT = 0x41 IPV6_MMTU = 0x500 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 @@ -825,12 +940,12 @@ const ( IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 - IP_DIVERTFL = 0x1022 IP_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d + IP_IPDEFTTL = 0x25 IP_IPSECFLOWINFO = 0x24 IP_IPSEC_LOCAL_AUTH = 0x1b IP_IPSEC_LOCAL_CRED = 0x19 @@ -864,10 +979,15 @@ const ( IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RTABLE = 0x1021 + IP_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 + IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 @@ -922,6 +1042,7 @@ const ( MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 + MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 @@ -929,12 +1050,27 @@ const ( MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 + MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -947,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -954,12 +1091,16 @@ const ( NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 - NET_RT_MAXID = 0x6 + NET_RT_IFNAMES = 0x6 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 + NOTE_CHANGE = 0x1 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EOF = 0x2 @@ -969,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -978,11 +1120,13 @@ const ( NOTE_TRUNCATE = 0x80 NOTE_WRITE = 0x2 OCRNL = 0x10 + OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 + OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 @@ -1027,19 +1171,25 @@ const ( RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 + RTAX_BFD = 0xb RTAX_BRD = 0x7 + RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa - RTAX_MAX = 0xb + RTAX_MAX = 0xf RTAX_NETMASK = 0x2 + RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 + RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 + RTA_BFD = 0x800 RTA_BRD = 0x80 + RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 @@ -1047,24 +1197,29 @@ const ( RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 + RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 + RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 + RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 + RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 + RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 - RTF_FMASK = 0x70f808 + RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 - RTF_MASK = 0x80 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 + RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 @@ -1073,23 +1228,26 @@ const ( RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 - RTF_XRESOLVE = 0x200 + RTM_80211INFO = 0x15 RTM_ADD = 0x1 + RTM_BFD = 0x12 RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe - RTM_LOCK = 0x8 + RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc + RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1099,67 +1257,74 @@ const ( RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 + RT_TABLEID_BITS = 0x8 + RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 - SIOCALIFADDR = 0x8218691c SIOCATMARK = 0x40047307 - SIOCBRDGADD = 0x8054693c - SIOCBRDGADDS = 0x80546941 - SIOCBRDGARL = 0x806e694d + SIOCBRDGADD = 0x8060693c + SIOCBRDGADDL = 0x80606949 + SIOCBRDGADDS = 0x80606941 + SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 - SIOCBRDGDEL = 0x8054693d - SIOCBRDGDELS = 0x80546942 - SIOCBRDGFLUSH = 0x80546948 - SIOCBRDGFRL = 0x806e694e + SIOCBRDGDEL = 0x8060693d + SIOCBRDGDELS = 0x80606942 + SIOCBRDGFLUSH = 0x80606948 + SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 - SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 - SIOCBRDGGPARAM = 0xc03c6958 + SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f - SIOCBRDGGSIFS = 0xc054693c SIOCBRDGGTO = 0xc0146946 - SIOCBRDGIFS = 0xc0546942 + SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0186943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 - SIOCBRDGSIFCOST = 0x80546955 - SIOCBRDGSIFFLGS = 0x8054693f - SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSIFCOST = 0x80606955 + SIOCBRDGSIFFLGS = 0x8060693f + SIOCBRDGSIFPRIO = 0x80606954 + SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 + SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 + SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 - SIOCDLIFADDR = 0x8218691e + SIOCDPWE3NEIGHBOR = 0x802069de + SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a + SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGETVLAN = 0xc0206990 - SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 - SIOCGIFASYNCMAP = 0xc020697c SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0086924 SIOCGIFDATA = 0xc020691b @@ -1168,41 +1333,53 @@ const ( SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc024698d SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 SIOCGIFHARDMTU = 0xc02069a5 - SIOCGIFMEDIA = 0xc0286936 + SIOCGIFLLPRIO = 0xc02069b6 + SIOCGIFMEDIA = 0xc0386938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 - SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPAIR = 0xc02069b1 + SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c - SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa - SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e - SIOCGLIFADDR = 0xc218691d SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 - SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 + SIOCGUMBINFO = 0xc02069be + SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 + SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 + SIOCIFAFATTACH = 0x801169ab + SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 + SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f - SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c - SIOCSIFASYNCMAP = 0x8020697d SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e @@ -1210,26 +1387,36 @@ const ( SIOCSIFGATTR = 0x8024698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f - SIOCSIFMEDIA = 0xc0206935 + SIOCSIFLLPRIO = 0x802069b5 + SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 - SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPAIR = 0x802069b0 + SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 - SIOCSIFTIMESLOT = 0x80206985 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 - SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 + SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 + SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 + SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 @@ -1241,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1248,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1261,6 +1450,7 @@ const ( SO_TIMESTAMP = 0x800 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 + SO_ZEROIZE = 0x2000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 @@ -1290,9 +1480,24 @@ const ( S_IXOTH = 0x1 S_IXUSR = 0x40 TCIFLUSH = 0x1 + TCIOFF = 0x3 TCIOFLUSH = 0x3 + TCION = 0x4 TCOFLUSH = 0x2 - TCP_MAXBURST = 0x4 + TCOOFF = 0x1 + TCOON = 0x2 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1301,11 +1506,15 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 - TCP_NSTATES = 0xb + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 + TIOCCHKVERAUTH = 0x2000741e + TIOCCLRVERAUTH = 0x2000741d TIOCCONS = 0x80047462 TIOCDRAIN = 0x2000745e TIOCEXCL = 0x2000740d @@ -1321,7 +1530,7 @@ const ( TIOCGFLAGS = 0x4004745d TIOCGPGRP = 0x40047477 TIOCGSID = 0x40047463 - TIOCGTSTAMP = 0x400c745b + TIOCGTSTAMP = 0x4010745b TIOCGWINSZ = 0x40087468 TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c @@ -1360,17 +1569,21 @@ const ( TIOCSETAF = 0x802c7416 TIOCSETAW = 0x802c7415 TIOCSETD = 0x8004741b + TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e - TIOCSTAT = 0x80047465 - TIOCSTI = 0x80017472 + TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 + TIOCUCNTL_CBRK = 0x7a + TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 + UTIME_NOW = -0x2 + UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 @@ -1381,6 +1594,19 @@ const ( VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 + VM_ANONMIN = 0x7 + VM_LOADAVG = 0x2 + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd + VM_MAXSLP = 0xa + VM_METER = 0x1 + VM_NKMEMPAGES = 0x6 + VM_PSSTRINGS = 0x3 + VM_SWAPENCRYPT = 0x5 + VM_USPACE = 0xb + VM_UVMEXP = 0x4 + VM_VNODEMIN = 0x9 + VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc @@ -1394,6 +1620,7 @@ const ( WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 + XCASE = 0x1000000 ) // Errors @@ -1407,6 +1634,7 @@ const ( EALREADY = syscall.Errno(0x25) EAUTH = syscall.Errno(0x50) EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x5c) EBADRPC = syscall.Errno(0x48) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x58) @@ -1433,7 +1661,7 @@ const ( EIPSEC = syscall.Errno(0x52) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) - ELAST = syscall.Errno(0x5b) + ELAST = syscall.Errno(0x5f) ELOOP = syscall.Errno(0x3e) EMEDIUMTYPE = syscall.Errno(0x56) EMFILE = syscall.Errno(0x18) @@ -1461,12 +1689,14 @@ const ( ENOTCONN = syscall.Errno(0x39) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) + EOWNERDEAD = syscall.Errno(0x5e) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) EPIPE = syscall.Errno(0x20) @@ -1474,6 +1704,7 @@ const ( EPROCUNAVAIL = syscall.Errno(0x4c) EPROGMISMATCH = syscall.Errno(0x4b) EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5f) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) ERANGE = syscall.Errno(0x22) @@ -1570,7 +1801,7 @@ var errorList = [...]struct { {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, - {35, "EWOULDBLOCK", "resource temporarily unavailable"}, + {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, @@ -1626,7 +1857,11 @@ var errorList = [...]struct { {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, - {91, "ELAST", "not supported"}, + {91, "ENOTSUP", "not supported"}, + {92, "EBADMSG", "bad message"}, + {93, "ENOTRECOVERABLE", "state not recoverable"}, + {94, "EOWNERDEAD", "previous owner died"}, + {95, "ELAST", "protocol error"}, } // Signal table @@ -1640,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1667,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go index 90de7dfc..ae16fe75 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go @@ -112,6 +112,12 @@ const ( BPF_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -140,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -180,7 +187,65 @@ const ( CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 + DIOCADDQUEUE = 0xc110445d + DIOCADDRULE = 0xcd604404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcd60441a + DIOCCLRIFFLAG = 0xc028445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0e04412 + DIOCCLRSTATUS = 0xc0284416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1204460 + DIOCGETQUEUE = 0xc110445f + DIOCGETQUEUES = 0xc110445e + DIOCGETRULE = 0xcd604407 + DIOCGETRULES = 0xcd604406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0104454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0104419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0284457 + DIOCKILLSRCNODES = 0xc080445b + DIOCKILLSTATES = 0xc0e04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc4504443 + DIOCRADDTABLES = 0xc450443d + DIOCRCLRADDRS = 0xc4504442 + DIOCRCLRASTATS = 0xc4504448 + DIOCRCLRTABLES = 0xc450443c + DIOCRCLRTSTATS = 0xc4504441 + DIOCRDELADDRS = 0xc4504444 + DIOCRDELTABLES = 0xc450443e + DIOCRGETADDRS = 0xc4504446 + DIOCRGETASTATS = 0xc4504447 + DIOCRGETTABLES = 0xc450443f + DIOCRGETTSTATS = 0xc4504440 + DIOCRINADEFINE = 0xc450444d + DIOCRSETADDRS = 0xc4504445 + DIOCRSETTFLAGS = 0xc450444a + DIOCRTSTADDRS = 0xc4504449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0284459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0284414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc0104451 + DIOCXCOMMIT = 0xc0104452 + DIOCXROLLBACK = 0xc0104453 DLT_ARCNET = 0x7 DLT_ATM_RFC1483 = 0xb DLT_AX25 = 0x3 @@ -243,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -295,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -326,6 +394,7 @@ const ( ETHERTYPE_LLDP = 0x88cc ETHERTYPE_LOGICRAFT = 0x8148 ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 ETHERTYPE_MATRA = 0x807a ETHERTYPE_MAX = 0xffff ETHERTYPE_MERIT = 0x807c @@ -354,15 +423,16 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 @@ -445,10 +515,11 @@ const ( ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 @@ -470,7 +541,7 @@ const ( EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -736,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -801,9 +873,11 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 IPV6_AUTH_LEVEL = 0x35 IPV6_AUTOFLOWLABEL = 0x3b IPV6_CHECKSUM = 0x1a @@ -910,6 +984,9 @@ const ( IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 @@ -981,6 +1058,19 @@ const ( MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -993,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -1001,7 +1092,8 @@ const ( NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 @@ -1018,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -1154,7 +1247,7 @@ const ( RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1172,6 +1265,9 @@ const ( RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1188,30 +1284,30 @@ const ( SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 + SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 @@ -1264,6 +1360,7 @@ const ( SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be @@ -1310,17 +1407,13 @@ const ( SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 @@ -1335,6 +1428,7 @@ const ( SO_BINDANY = 0x1000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 @@ -1342,6 +1436,7 @@ const ( SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 @@ -1391,7 +1486,18 @@ const ( TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 - TCP_MAXBURST = 0x4 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1400,6 +1506,7 @@ const ( TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOPUSH = 0x10 + TCP_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 @@ -1768,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1795,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {28672, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go index f1154ff5..03d90fe3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go @@ -112,6 +112,12 @@ const ( BPF_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 + BPF_F_DIR_IN = 0x10 + BPF_F_DIR_MASK = 0x30 + BPF_F_DIR_OUT = 0x20 + BPF_F_DIR_SHIFT = 0x4 + BPF_F_FLOWID = 0x8 + BPF_F_PRI_MASK = 0x7 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -140,6 +146,7 @@ const ( BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 + BPF_RND = 0xc0 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 @@ -301,6 +308,8 @@ const ( EMUL_ENABLED = 0x1 EMUL_NATIVE = 0x2 ENDRUNDISC = 0x9 + ETH64_8021_RSVD_MASK = 0xfffffffffff0 + ETH64_8021_RSVD_PREFIX = 0x180c2000000 ETHERMIN = 0x2e ETHERMTU = 0x5dc ETHERTYPE_8023 = 0x4 @@ -353,6 +362,7 @@ const ( ETHERTYPE_DN = 0x6003 ETHERTYPE_DOGFIGHT = 0x1989 ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_EAPOL = 0x888e ETHERTYPE_ECMA = 0x803 ETHERTYPE_ENCRYPT = 0x803d ETHERTYPE_ES = 0x805d @@ -413,15 +423,16 @@ const ( ETHERTYPE_NCD = 0x8149 ETHERTYPE_NESTAR = 0x8006 ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 - ETHERTYPE_PAE = 0x888e ETHERTYPE_PBB = 0x88e7 ETHERTYPE_PCS = 0x4242 ETHERTYPE_PLANNING = 0x8044 @@ -504,10 +515,11 @@ const ( ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 + EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 - EVFILT_SYSCOUNT = 0x8 + EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 @@ -529,7 +541,7 @@ const ( EV_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 - EV_SYSFLAGS = 0xf000 + EV_SYSFLAGS = 0xf800 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 @@ -795,6 +807,7 @@ const ( IFT_VOICEOVERCABLE = 0xc6 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 + IFT_WIREGUARD = 0xfb IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 @@ -860,6 +873,7 @@ const ( IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 @@ -970,6 +984,9 @@ const ( IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 + ITIMER_PROF = 0x2 + ITIMER_REAL = 0x0 + ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 @@ -1041,6 +1058,19 @@ const ( MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 + MOUNT_AFS = "afs" + MOUNT_CD9660 = "cd9660" + MOUNT_EXT2FS = "ext2fs" + MOUNT_FFS = "ffs" + MOUNT_FUSEFS = "fuse" + MOUNT_MFS = "mfs" + MOUNT_MSDOS = "msdos" + MOUNT_NCPFS = "ncpfs" + MOUNT_NFS = "nfs" + MOUNT_NTFS = "ntfs" + MOUNT_TMPFS = "tmpfs" + MOUNT_UDF = "udf" + MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 MSG_CTRUNC = 0x20 @@ -1053,6 +1083,7 @@ const ( MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 + MSG_WAITFORONE = 0x1000 MS_ASYNC = 0x1 MS_INVALIDATE = 0x4 MS_SYNC = 0x2 @@ -1061,7 +1092,8 @@ const ( NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_IFNAMES = 0x6 - NET_RT_MAXID = 0x7 + NET_RT_MAXID = 0x8 + NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 @@ -1078,6 +1110,7 @@ const ( NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 + NOTE_OOB = 0x4 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 @@ -1214,7 +1247,7 @@ const ( RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb - RTM_RTTUNIT = 0xf4240 + RTM_SOURCE = 0x16 RTM_VERSION = 0x5 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 @@ -1232,6 +1265,9 @@ const ( RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 + SEEK_CUR = 0x1 + SEEK_END = 0x2 + SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1248,30 +1284,30 @@ const ( SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e - SIOCBRDGGCACHE = 0xc0186941 - SIOCBRDGGFD = 0xc0186952 - SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e - SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 - SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f - SIOCBRDGGTO = 0xc0186946 + SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 - SIOCBRDGSCACHE = 0x80186940 - SIOCBRDGSFD = 0x80186952 - SIOCBRDGSHT = 0x80186951 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a - SIOCBRDGSMA = 0x80186953 - SIOCBRDGSPRI = 0x80186950 - SIOCBRDGSPROTO = 0x8018695a - SIOCBRDGSTO = 0x80186945 - SIOCBRDGSTXHC = 0x80186959 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 @@ -1378,11 +1414,6 @@ const ( SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 - SIOCSWGDPID = 0xc018695b - SIOCSWGMAXFLOW = 0xc0186960 - SIOCSWGMAXGROUP = 0xc018695d - SIOCSWSDPID = 0x8018695c - SIOCSWSPORTNO = 0xc060695f SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 @@ -1455,7 +1486,18 @@ const ( TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 - TCP_MAXBURST = 0x4 + TCPOPT_EOL = 0x0 + TCPOPT_MAXSEG = 0x2 + TCPOPT_NOP = 0x1 + TCPOPT_SACK = 0x5 + TCPOPT_SACK_HDR = 0x1010500 + TCPOPT_SACK_PERMITTED = 0x4 + TCPOPT_SACK_PERMIT_HDR = 0x1010402 + TCPOPT_SIGNATURE = 0x13 + TCPOPT_TIMESTAMP = 0x8 + TCPOPT_TSTAMP_HDR = 0x101080a + TCPOPT_WINDOW = 0x3 + TCP_INFO = 0x9 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_SACK = 0x3 @@ -1833,7 +1875,7 @@ var signalList = [...]struct { {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, - {6, "SIGABRT", "abort trap"}, + {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, @@ -1860,4 +1902,5 @@ var signalList = [...]struct { {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, + {81920, "SIGSTKSZ", "unknown signal"}, } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 1b6eedfa..54749f9c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -552,6 +552,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index 039c4aa0..77479d45 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 0535d3cf..2e966d4d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index 1018b522..d65a7c0f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index 3802f4b3..6f0b97c6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go index 8a2db7da..e1c23b52 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go @@ -544,6 +544,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 4af561a4..79f73899 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 3b90e944..fb161f3a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 890f4ccd..4c8ac993 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index c79f071f..76dd8ec4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -521,6 +521,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 2925fe0a..caeb807b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 75eb2f5f..08744425 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4 DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4 DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4 DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4 DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4 DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4 DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4 DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4 DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4 DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4 DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4 DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4 DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4 DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4 DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4 DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4 DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4 DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4 DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4 DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $4 +DATA ·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4 DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4 DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4 DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4 DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4 DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4 DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4 DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4 DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4 DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4 DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4 DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4 DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4 DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4 DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4 DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4 DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4 DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4 DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4 DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4 DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4 DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4 DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4 DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4 DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 98446d2b..a05e5f4f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 243a6663..5782cd10 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 8da6791d..b2da8e50 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index 9ad116d9..cf310420 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4 DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4 DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4 DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4 DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4 DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4 DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4 DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4 DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4 DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4 DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4 DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4 DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4 DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4 DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4 DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4 DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4 DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4 DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4 DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $4 +DATA ·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4 DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4 DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4 DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4 DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4 DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4 DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4 DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4 DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4 DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4 DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4 DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4 DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4 DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4 DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4 DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4 DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4 DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4 DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4 DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4 DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4 DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4 DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4 DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4 DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 800aab6e..048b2655 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index 4efeff9a..484bb42e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index 016d959b..6f33e37e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go +// go run mksyscall.go -openbsd -libc -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && mips64 @@ -16,7 +16,7 @@ var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getgroups(ngid int, gid *_Gid_t) (n int, err error) { - r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) { return } +var libc_getgroups_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getgroups getgroups "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { - _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setgroups_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setgroups setgroups "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { - r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err return } +var libc_wait4_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_wait4 wait4 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { - r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { return } +var libc_accept_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_accept accept "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_bind_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_bind bind "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_connect_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connect connect "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socket(domain int, typ int, proto int) (fd int, err error) { - r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) { return } +var libc_socket_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_socket socket "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { - _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getsockopt_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { - _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setsockopt_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { - _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getpeername_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpeername getpeername "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { - _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getsockname_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getsockname getsockname "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { - _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_shutdown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_shutdown shutdown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { - _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_socketpair_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_socketpair socketpair "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { @@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl return } +var libc_recvfrom_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { @@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_sendto_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sendto sendto "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { return } +var libc_recvmsg_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { return } +var libc_sendmsg_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { - r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne return } +var libc_kevent_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_kevent kevent "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimes(path string, timeval *[2]Timeval) (err error) { @@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_utimes_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_utimes utimes "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { - _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_futimes_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_futimes futimes "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { - r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { return } +var libc_poll_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_poll poll "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { @@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_madvise_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_madvise madvise "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlock(b []byte) (err error) { @@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mlock_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mlock mlock "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { - _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mlockall_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mlockall mlockall "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mprotect(b []byte, prot int) (err error) { @@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mprotect_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mprotect mprotect "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { @@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_msync_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_msync msync "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlock(b []byte) (err error) { @@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) { } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_munlock_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_munlock munlock "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { - _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_munlockall_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_munlockall munlockall "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { - _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_pipe2_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdents(fd int, buf []byte) (n int, err error) { @@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) { return } +var libc_getdents_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getdents getdents "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getcwd(buf []byte) (n int, err error) { @@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) { return } +var libc_getcwd_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getcwd getcwd "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { - _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_ioctl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_ioctl ioctl "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { @@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_sysctl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sysctl sysctl "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { - r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, return } +var libc_ppoll_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_ppoll ppoll "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Access(path string, mode uint32) (err error) { @@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_access_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_access access "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { - _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_adjtime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_adjtime adjtime "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chdir(path string) (err error) { @@ -463,13 +607,17 @@ func Chdir(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chdir chdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chflags(path string, flags int) (err error) { @@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chflags_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chflags chflags "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chmod(path string, mode uint32) (err error) { @@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chmod_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chmod chmod "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chown(path string, uid int, gid int) (err error) { @@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chown chown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chroot(path string) (err error) { @@ -523,27 +683,49 @@ func Chroot(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_chroot_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_chroot chroot "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { - _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_close_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_close close "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { - r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -551,33 +733,49 @@ func Dup(fd int) (nfd int, err error) { return } +var libc_dup_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_dup dup "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { - _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_dup2_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_dup2 dup2 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { - _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_dup3_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_dup3 dup3 "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT, uintptr(code), 0, 0) + syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } +var libc_exit_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_exit exit "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { @@ -586,43 +784,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_faccessat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_faccessat faccessat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { - _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchdir fchdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { - _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchflags_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchflags fchflags "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { - _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchmod_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchmod fchmod "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { @@ -631,23 +845,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchmodat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { - _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchown fchown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { @@ -656,27 +878,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fchownat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fchownat fchownat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { - _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_flock_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_flock flock "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fpathconf(fd int, name int) (val int, err error) { - r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -684,16 +914,24 @@ func Fpathconf(fd int, name int) (val int, err error) { return } +var libc_fpathconf_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { - _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fstat fstat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { @@ -702,71 +940,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fstatat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fstatat fstatat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { - _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fstatfs_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { - _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_fsync_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fsync fsync "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { - _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_ftruncate_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } +var libc_getegid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getegid getegid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } +var libc_geteuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_geteuid geteuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } +var libc_getgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getgid getgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -774,34 +1040,50 @@ func Getpgid(pid int) (pgid int, err error) { return } +var libc_getpgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpgid getpgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { - r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } +var libc_getpgrp_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } +var libc_getpid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpid getpid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } +var libc_getppid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getppid getppid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpriority(which int, who int) (prio int, err error) { - r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -809,20 +1091,28 @@ func Getpriority(which int, who int) (prio int, err error) { return } +var libc_getpriority_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getpriority getpriority "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getrlimit_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { - r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -830,20 +1120,28 @@ func Getrtable() (rtable int, err error) { return } +var libc_getrtable_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getrtable getrtable "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { - _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_getrusage_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getrusage getrusage "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { - r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -851,46 +1149,66 @@ func Getsid(pid int) (sid int, err error) { return } +var libc_getsid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getsid getsid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_gettimeofday_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } +var libc_getuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_getuid getuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { - r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } +var libc_issetugid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_issetugid issetugid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { - _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_kill_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_kill kill "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { - r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -898,6 +1216,10 @@ func Kqueue() (fd int, err error) { return } +var libc_kqueue_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_kqueue kqueue "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lchown(path string, uid int, gid int) (err error) { @@ -906,13 +1228,17 @@ func Lchown(path string, uid int, gid int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_lchown_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_lchown lchown "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Link(path string, link string) (err error) { @@ -926,13 +1252,17 @@ func Link(path string, link string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_link_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_link link "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { @@ -946,23 +1276,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er if err != nil { return } - _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_linkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_linkat linkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { - _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_listen_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_listen listen "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lstat(path string, stat *Stat_t) (err error) { @@ -971,13 +1309,17 @@ func Lstat(path string, stat *Stat_t) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_lstat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_lstat lstat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdir(path string, mode uint32) (err error) { @@ -986,13 +1328,17 @@ func Mkdir(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkdir mkdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdirat(dirfd int, path string, mode uint32) (err error) { @@ -1001,13 +1347,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkdirat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifo(path string, mode uint32) (err error) { @@ -1016,13 +1366,17 @@ func Mkfifo(path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkfifo_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { @@ -1031,13 +1385,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mkfifoat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknod(path string, mode uint32, dev int) (err error) { @@ -1046,13 +1404,17 @@ func Mknod(path string, mode uint32, dev int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mknod_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mknod mknod "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { @@ -1061,23 +1423,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_mknodat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mknodat mknodat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { - _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_nanosleep_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Open(path string, mode int, perm uint32) (fd int, err error) { @@ -1086,7 +1456,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { if err != nil { return } - r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1094,6 +1464,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { return } +var libc_open_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_open open "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { @@ -1102,7 +1476,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { if err != nil { return } - r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1110,6 +1484,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { return } +var libc_openat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_openat openat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pathconf(path string, name int) (val int, err error) { @@ -1118,7 +1496,7 @@ func Pathconf(path string, name int) (val int, err error) { if err != nil { return } - r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1126,6 +1504,10 @@ func Pathconf(path string, name int) (val int, err error) { return } +var libc_pathconf_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pathconf pathconf "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pread(fd int, p []byte, offset int64) (n int, err error) { @@ -1135,7 +1517,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1143,6 +1525,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) { return } +var libc_pread_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pread pread "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pwrite(fd int, p []byte, offset int64) (n int, err error) { @@ -1152,7 +1538,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1160,6 +1546,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) { return } +var libc_pwrite_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwrite pwrite "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func read(fd int, p []byte) (n int, err error) { @@ -1169,7 +1559,7 @@ func read(fd int, p []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1177,6 +1567,10 @@ func read(fd int, p []byte) (n int, err error) { return } +var libc_read_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_read read "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlink(path string, buf []byte) (n int, err error) { @@ -1191,7 +1585,7 @@ func Readlink(path string, buf []byte) (n int, err error) { } else { _p1 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1199,6 +1593,10 @@ func Readlink(path string, buf []byte) (n int, err error) { return } +var libc_readlink_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readlink readlink "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { @@ -1213,7 +1611,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { } else { _p1 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1221,6 +1619,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { return } +var libc_readlinkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Rename(from string, to string) (err error) { @@ -1234,13 +1636,17 @@ func Rename(from string, to string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_rename_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_rename rename "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, to string) (err error) { @@ -1254,13 +1660,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) { if err != nil { return } - _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_renameat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameat renameat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Revoke(path string) (err error) { @@ -1269,13 +1679,17 @@ func Revoke(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_revoke_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_revoke revoke "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Rmdir(path string) (err error) { @@ -1284,17 +1698,21 @@ func Rmdir(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_rmdir_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_rmdir rmdir "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { - r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) @@ -1302,10 +1720,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { return } +var libc_lseek_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_lseek lseek "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { - r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1313,36 +1735,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err return } +var libc_select_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_select select "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setegid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setegid setegid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_seteuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_seteuid seteuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setgid setgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setlogin(name string) (err error) { @@ -1351,97 +1789,133 @@ func Setlogin(name string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setlogin_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setlogin setlogin "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setpgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setpgid setpgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { - _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setpriority_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setpriority setpriority "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setregid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setregid setregid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setreuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setreuid setreuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setresgid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setresgid setresgid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setresuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setresuid setresuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setrlimit_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { - _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setrtable_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setrtable setrtable "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { - r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1449,26 +1923,38 @@ func Setsid() (pid int, err error) { return } +var libc_setsid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setsid setsid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { - _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_settimeofday_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { - _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_setuid_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setuid setuid "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Stat(path string, stat *Stat_t) (err error) { @@ -1477,13 +1963,17 @@ func Stat(path string, stat *Stat_t) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_stat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_stat stat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statfs(path string, stat *Statfs_t) (err error) { @@ -1492,13 +1982,17 @@ func Statfs(path string, stat *Statfs_t) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_statfs_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_statfs statfs "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Symlink(path string, link string) (err error) { @@ -1512,13 +2006,17 @@ func Symlink(path string, link string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_symlink_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_symlink symlink "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { @@ -1532,23 +2030,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } +var libc_symlinkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { - _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_sync_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_sync sync "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (err error) { @@ -1557,21 +2063,29 @@ func Truncate(path string, length int64) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_truncate_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_truncate truncate "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { - r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } +var libc_umask_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_umask umask "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlink(path string) (err error) { @@ -1580,13 +2094,17 @@ func Unlink(path string) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_unlink_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unlink unlink "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlinkat(dirfd int, path string, flags int) (err error) { @@ -1595,13 +2113,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } +var libc_unlinkat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unmount(path string, flags int) (err error) { @@ -1610,13 +2132,17 @@ func Unmount(path string, flags int) (err error) { if err != nil { return } - _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_unmount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_unmount unmount "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func write(fd int, p []byte) (n int, err error) { @@ -1626,7 +2152,7 @@ func write(fd int, p []byte) (n int, err error) { } else { _p0 = unsafe.Pointer(&_zero) } - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1634,10 +2160,14 @@ func write(fd int, p []byte) (n int, err error) { return } +var libc_write_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_write write "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { - r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) @@ -1645,20 +2175,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) ( return } +var libc_mmap_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mmap mmap "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { - _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } +var libc_munmap_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_munmap munmap "libc.so" + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readlen(fd int, buf *byte, nbuf int) (n int, err error) { - r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1669,7 +2207,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func writelen(fd int, buf *byte, nbuf int) (n int, err error) { - r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) @@ -1685,9 +2223,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error if err != nil { return } - _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } + +var libc_utimensat_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_utimensat utimensat "libc.so" diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s new file mode 100644 index 00000000..55af2726 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -0,0 +1,669 @@ +// go run mkasm.go openbsd mips64 +// Code generated by the command above; DO NOT EDIT. + +#include "textflag.h" + +TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getgroups(SB) +GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) + +TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setgroups(SB) +GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) + +TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_wait4(SB) +GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 +DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) + +TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_accept(SB) +GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 +DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) + +TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_bind(SB) +GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 +DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) + +TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connect(SB) +GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) + +TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_socket(SB) +GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 +DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) + +TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getsockopt(SB) +GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) + +TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setsockopt(SB) +GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) + +TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpeername(SB) +GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) + +TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getsockname(SB) +GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) + +TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_shutdown(SB) +GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) + +TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_socketpair(SB) +GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 +DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) + +TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_recvfrom(SB) +GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 +DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) + +TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sendto(SB) +GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) + +TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_recvmsg(SB) +GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 +DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) + +TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sendmsg(SB) +GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) + +TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_kevent(SB) +GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 +DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) + +TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_utimes(SB) +GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 +DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) + +TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_futimes(SB) +GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 +DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) + +TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_poll(SB) +GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 +DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) + +TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_madvise(SB) +GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 +DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) + +TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mlock(SB) +GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) + +TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mlockall(SB) +GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) + +TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mprotect(SB) +GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) + +TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_msync(SB) +GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 +DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) + +TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_munlock(SB) +GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 +DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) + +TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_munlockall(SB) +GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 +DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) + +TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pipe2(SB) +GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) + +TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getdents(SB) +GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) + +TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getcwd(SB) +GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) + +TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_ioctl(SB) +GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) + +TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sysctl(SB) +GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) + +TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_ppoll(SB) +GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 +DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) + +TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_access(SB) +GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 +DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) + +TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_adjtime(SB) +GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) + +TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chdir(SB) +GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) + +TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chflags(SB) +GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) + +TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chmod(SB) +GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) + +TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chown(SB) +GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) + +TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_chroot(SB) +GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 +DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) + +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + +TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_close(SB) +GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 +DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) + +TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_dup(SB) +GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 +DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) + +TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_dup2(SB) +GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 +DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) + +TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_dup3(SB) +GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 +DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) + +TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_exit(SB) +GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 +DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) + +TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_faccessat(SB) +GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) + +TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchdir(SB) +GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) + +TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchflags(SB) +GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) + +TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchmod(SB) +GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) + +TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchmodat(SB) +GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) + +TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchown(SB) +GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) + +TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fchownat(SB) +GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) + +TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_flock(SB) +GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 +DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) + +TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fpathconf(SB) +GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) + +TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fstat(SB) +GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) + +TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fstatat(SB) +GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) + +TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fstatfs(SB) +GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) + +TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fsync(SB) +GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) + +TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_ftruncate(SB) +GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 +DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) + +TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getegid(SB) +GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) + +TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_geteuid(SB) +GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) + +TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getgid(SB) +GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) + +TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpgid(SB) +GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) + +TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpgrp(SB) +GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) + +TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpid(SB) +GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) + +TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getppid(SB) +GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) + +TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getpriority(SB) +GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) + +TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getrlimit(SB) +GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) + +TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getrtable(SB) +GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) + +TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getrusage(SB) +GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) + +TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getsid(SB) +GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) + +TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_gettimeofday(SB) +GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 +DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) + +TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_getuid(SB) +GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) + +TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_issetugid(SB) +GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) + +TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_kill(SB) +GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 +DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) + +TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_kqueue(SB) +GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 +DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) + +TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_lchown(SB) +GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 +DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) + +TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_link(SB) +GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 +DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) + +TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_linkat(SB) +GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) + +TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_listen(SB) +GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 +DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) + +TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_lstat(SB) +GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) + +TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkdir(SB) +GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) + +TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkdirat(SB) +GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) + +TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkfifo(SB) +GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) + +TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mkfifoat(SB) +GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) + +TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mknod(SB) +GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) + +TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mknodat(SB) +GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + +TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) +GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 +DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) + +TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_open(SB) +GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 +DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) + +TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_openat(SB) +GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) + +TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pathconf(SB) +GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) + +TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pread(SB) +GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) + +TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwrite(SB) +GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) + +TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_read(SB) +GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 +DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) + +TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readlink(SB) +GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) + +TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readlinkat(SB) +GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) + +TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_rename(SB) +GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 +DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) + +TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameat(SB) +GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) + +TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_revoke(SB) +GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 +DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) + +TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_rmdir(SB) +GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 +DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) + +TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_lseek(SB) +GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 +DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) + +TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_select(SB) +GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 +DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) + +TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setegid(SB) +GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) + +TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_seteuid(SB) +GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) + +TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setgid(SB) +GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) + +TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setlogin(SB) +GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) + +TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setpgid(SB) +GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) + +TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setpriority(SB) +GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) + +TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setregid(SB) +GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) + +TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setreuid(SB) +GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) + +TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setresgid(SB) +GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) + +TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setresuid(SB) +GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) + +TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setrlimit(SB) +GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) + +TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setrtable(SB) +GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) + +TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setsid(SB) +GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) + +TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_settimeofday(SB) +GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 +DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) + +TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setuid(SB) +GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) + +TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_stat(SB) +GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) + +TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_statfs(SB) +GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 +DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) + +TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_symlink(SB) +GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 +DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) + +TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_symlinkat(SB) +GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) + +TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sync(SB) +GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 +DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) + +TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_truncate(SB) +GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 +DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) + +TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_umask(SB) +GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 +DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) + +TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unlink(SB) +GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) + +TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unlinkat(SB) +GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) + +TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_unmount(SB) +GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) + +TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_write(SB) +GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 +DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) + +TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mmap(SB) +GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) + +TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_munmap(SB) +GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 +DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) + +TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_utimensat(SB) +GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 +DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index c85de2d9..330cf7f7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 7c9223b6..4028255b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -249,6 +249,12 @@ TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_clock_gettime(SB) + RET +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_close(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 8e3e7873..5f24de0d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -696,6 +696,20 @@ var libc_chroot_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_clock_gettime_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index 7dba7892..e1fbd4df 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -5,792 +5,665 @@ TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) - GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) - GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) - GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) - GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) - GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) - GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) - GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) - GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) - GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) - GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) - GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) - GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) - GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) - GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) - GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) - GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) - GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) - GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) - GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) - GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) - GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) - GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) - GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) - GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) - GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) - GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) - GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) - GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) - GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) - GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) - GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) - GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) - GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) - GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) - GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) - GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) - GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) - GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) - GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) - GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) - GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) +TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_clock_gettime(SB) +GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 +DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) + TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) - GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) - GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) - GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) - GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) - GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) - GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) - GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) - GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) - GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) - GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) - GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) - GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) - GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) - GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) - GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) - GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) - GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) - GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) - GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) - GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) - GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) - GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) - GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) - GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) - GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) - GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) - GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) - GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) - GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) - GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) - GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) - GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) - GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) - GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) - GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) - GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) - GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) - GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) - GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) - GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) - GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) - GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) - GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) - GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) - GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) - GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) - GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) - GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) - GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) - GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) - GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) - GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) - GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) - GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) - GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) - GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) - GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) - GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) - GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) - GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) - GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) - GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) - GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) - GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) - GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) - GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) - GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) - GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) - GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) - GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) - GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) - GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrlimit(SB) - GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) - GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) - GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) - GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) - GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) - GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) - GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) - GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) - GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) - GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) - GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) - GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) - GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) - GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) - GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) - GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) - GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) - GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) - GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 91f5a2bd..78d4a424 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -38,6 +38,7 @@ import ( //go:cgo_import_dynamic libc_chmod chmod "libc.so" //go:cgo_import_dynamic libc_chown chown "libc.so" //go:cgo_import_dynamic libc_chroot chroot "libc.so" +//go:cgo_import_dynamic libc_clockgettime clockgettime "libc.so" //go:cgo_import_dynamic libc_close close "libc.so" //go:cgo_import_dynamic libc_creat creat "libc.so" //go:cgo_import_dynamic libc_dup dup "libc.so" @@ -177,6 +178,7 @@ import ( //go:linkname procChmod libc_chmod //go:linkname procChown libc_chown //go:linkname procChroot libc_chroot +//go:linkname procClockGettime libc_clockgettime //go:linkname procClose libc_close //go:linkname procCreat libc_creat //go:linkname procDup libc_dup @@ -317,6 +319,7 @@ var ( procChmod, procChown, procChroot, + procClockGettime, procClose, procCreat, procDup, @@ -750,6 +753,16 @@ func Chroot(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClockGettime)), 2, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Close(fd int) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go index 9e9d0b2a..55e04847 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go @@ -17,6 +17,7 @@ var sysctlMib = []mibentry{ {"ddb.max_line", []_C_int{9, 3}}, {"ddb.max_width", []_C_int{9, 2}}, {"ddb.panic", []_C_int{9, 5}}, + {"ddb.profile", []_C_int{9, 9}}, {"ddb.radix", []_C_int{9, 1}}, {"ddb.tab_stop_width", []_C_int{9, 4}}, {"ddb.trigger", []_C_int{9, 8}}, @@ -33,29 +34,37 @@ var sysctlMib = []mibentry{ {"hw.ncpufound", []_C_int{6, 21}}, {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, + {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, {"hw.usermem", []_C_int{6, 20}}, {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, - {"kern.arandom", []_C_int{1, 37}}, + {"kern.allowdt", []_C_int{1, 65}}, + {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, {"kern.boottime", []_C_int{1, 21}}, {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, - {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.cpustats", []_C_int{1, 85}}, {"kern.domainname", []_C_int{1, 22}}, {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, {"kern.fscale", []_C_int{1, 46}}, {"kern.fsync", []_C_int{1, 33}}, + {"kern.global_ptrace", []_C_int{1, 81}}, {"kern.hostid", []_C_int{1, 11}}, {"kern.hostname", []_C_int{1, 10}}, {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, @@ -78,17 +87,16 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, - {"kern.random", []_C_int{1, 31}}, {"kern.rawpartition", []_C_int{1, 24}}, {"kern.saved_ids", []_C_int{1, 20}}, {"kern.securelevel", []_C_int{1, 9}}, @@ -106,21 +114,20 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, - {"kern.tty.maxptys", []_C_int{1, 44, 6}}, - {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, - {"kern.userasymcrypto", []_C_int{1, 60}}, - {"kern.usercrypto", []_C_int{1, 52}}, - {"kern.usermount", []_C_int{1, 30}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, - {"kern.vnode", []_C_int{1, 13}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, + {"kern.wxabort", []_C_int{1, 74}}, {"net.bpf.bufsize", []_C_int{4, 31, 1}}, {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, @@ -148,7 +155,9 @@ var sysctlMib = []mibentry{ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, @@ -157,8 +166,10 @@ var sysctlMib = []mibentry{ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, @@ -175,9 +186,7 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, - {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, @@ -191,6 +200,7 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}}, {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, @@ -198,9 +208,12 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, + {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}}, {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, @@ -213,13 +226,8 @@ var sysctlMib = []mibentry{ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, - {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, - {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, - {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, - {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, - {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, @@ -232,20 +240,19 @@ var sysctlMib = []mibentry{ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, - {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, - {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, + {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, - {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}}, {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, - {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, {"net.key.sadb_dump", []_C_int{4, 30, 1}}, {"net.key.spd_dump", []_C_int{4, 30, 2}}, {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, @@ -254,12 +261,12 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, {"vm.maxslp", []_C_int{2, 10}}, {"vm.nkmempages", []_C_int{2, 6}}, {"vm.psstrings", []_C_int{2, 3}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go index adecd096..d2243cf8 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go @@ -36,23 +36,29 @@ var sysctlMib = []mibentry{ {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, {"hw.usermem", []_C_int{6, 20}}, {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, + {"kern.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, {"kern.boottime", []_C_int{1, 21}}, {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, - {"kern.dnsjackport", []_C_int{1, 13}}, + {"kern.cpustats", []_C_int{1, 85}}, {"kern.domainname", []_C_int{1, 22}}, {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, @@ -81,13 +87,13 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, @@ -108,15 +114,19 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"net.bpf.bufsize", []_C_int{4, 31, 1}}, {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, @@ -176,7 +186,6 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, @@ -252,12 +261,12 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, {"vm.maxslp", []_C_int{2, 10}}, {"vm.nkmempages", []_C_int{2, 6}}, {"vm.psstrings", []_C_int{2, 3}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go index 8ea52a4a..82dc51bd 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go @@ -17,6 +17,7 @@ var sysctlMib = []mibentry{ {"ddb.max_line", []_C_int{9, 3}}, {"ddb.max_width", []_C_int{9, 2}}, {"ddb.panic", []_C_int{9, 5}}, + {"ddb.profile", []_C_int{9, 9}}, {"ddb.radix", []_C_int{9, 1}}, {"ddb.tab_stop_width", []_C_int{9, 4}}, {"ddb.trigger", []_C_int{9, 8}}, @@ -33,29 +34,37 @@ var sysctlMib = []mibentry{ {"hw.ncpufound", []_C_int{6, 21}}, {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, + {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, {"hw.usermem", []_C_int{6, 20}}, {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, - {"kern.arandom", []_C_int{1, 37}}, + {"kern.allowdt", []_C_int{1, 65}}, + {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, {"kern.boottime", []_C_int{1, 21}}, {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, - {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.cpustats", []_C_int{1, 85}}, {"kern.domainname", []_C_int{1, 22}}, {"kern.file", []_C_int{1, 73}}, {"kern.forkstat", []_C_int{1, 42}}, {"kern.fscale", []_C_int{1, 46}}, {"kern.fsync", []_C_int{1, 33}}, + {"kern.global_ptrace", []_C_int{1, 81}}, {"kern.hostid", []_C_int{1, 11}}, {"kern.hostname", []_C_int{1, 10}}, {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, @@ -78,17 +87,16 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, - {"kern.random", []_C_int{1, 31}}, {"kern.rawpartition", []_C_int{1, 24}}, {"kern.saved_ids", []_C_int{1, 20}}, {"kern.securelevel", []_C_int{1, 9}}, @@ -106,21 +114,20 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, - {"kern.tty.maxptys", []_C_int{1, 44, 6}}, - {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, - {"kern.userasymcrypto", []_C_int{1, 60}}, - {"kern.usercrypto", []_C_int{1, 52}}, - {"kern.usermount", []_C_int{1, 30}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, - {"kern.vnode", []_C_int{1, 13}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, + {"kern.wxabort", []_C_int{1, 74}}, {"net.bpf.bufsize", []_C_int{4, 31, 1}}, {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, @@ -148,7 +155,9 @@ var sysctlMib = []mibentry{ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, @@ -157,8 +166,10 @@ var sysctlMib = []mibentry{ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, @@ -175,9 +186,7 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, - {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, @@ -191,6 +200,7 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}}, {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, @@ -198,9 +208,12 @@ var sysctlMib = []mibentry{ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, + {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}}, {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, @@ -213,13 +226,8 @@ var sysctlMib = []mibentry{ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, - {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, - {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, - {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, - {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, - {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, @@ -232,20 +240,19 @@ var sysctlMib = []mibentry{ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, - {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, - {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, + {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, - {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}}, {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, - {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, {"net.key.sadb_dump", []_C_int{4, 30, 1}}, {"net.key.spd_dump", []_C_int{4, 30, 2}}, {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, @@ -254,12 +261,12 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, {"vm.anonmin", []_C_int{2, 7}}, {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, {"vm.maxslp", []_C_int{2, 10}}, {"vm.nkmempages", []_C_int{2, 6}}, {"vm.psstrings", []_C_int{2, 3}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go index 154b57ae..cbdda1a4 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go @@ -36,6 +36,7 @@ var sysctlMib = []mibentry{ {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, @@ -44,6 +45,7 @@ var sysctlMib = []mibentry{ {"hw.uuid", []_C_int{6, 18}}, {"hw.vendor", []_C_int{6, 14}}, {"hw.version", []_C_int{6, 16}}, + {"kern.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, @@ -51,6 +53,8 @@ var sysctlMib = []mibentry{ {"kern.bufcachepercent", []_C_int{1, 72}}, {"kern.ccpu", []_C_int{1, 45}}, {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, @@ -83,13 +87,13 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, {"kern.osrevision", []_C_int{1, 3}}, {"kern.ostype", []_C_int{1, 1}}, {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, @@ -110,13 +114,16 @@ var sysctlMib = []mibentry{ {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, {"kern.timecounter.tick", []_C_int{1, 69, 1}}, {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.timeout_stats", []_C_int{1, 87}}, {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, {"kern.ttycount", []_C_int{1, 57}}, + {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, @@ -179,7 +186,6 @@ var sysctlMib = []mibentry{ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, - {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, @@ -255,7 +261,6 @@ var sysctlMib = []mibentry{ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, - {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go index d96bb2ba..f55eae1a 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go @@ -36,6 +36,7 @@ var sysctlMib = []mibentry{ {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, + {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, @@ -86,7 +87,6 @@ var sysctlMib = []mibentry{ {"kern.ngroups", []_C_int{1, 18}}, {"kern.nosuidcoredump", []_C_int{1, 32}}, {"kern.nprocs", []_C_int{1, 47}}, - {"kern.nselcoll", []_C_int{1, 43}}, {"kern.nthreads", []_C_int{1, 26}}, {"kern.numvnodes", []_C_int{1, 58}}, {"kern.osrelease", []_C_int{1, 2}}, @@ -123,6 +123,7 @@ var sysctlMib = []mibentry{ {"kern.ttycount", []_C_int{1, 57}}, {"kern.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, + {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go index a37f7737..01c43a01 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go @@ -6,6 +6,7 @@ package unix +// Deprecated: Use libc wrappers instead of direct syscalls. const ( SYS_EXIT = 1 // { void sys_exit(int rval); } SYS_FORK = 2 // { int sys_fork(void); } diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index 2fd2060e..9bc4c8f9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -491,6 +491,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 6a5a1a8a..bb05f655 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -499,6 +499,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index 84cc8d01..db40e3a1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -496,6 +496,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go index c844e709..11121151 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go @@ -499,6 +499,90 @@ type Utsname struct { Machine [256]byte } +const SizeofUvmexp = 0x278 + +type Uvmexp struct { + Pagesize int64 + Pagemask int64 + Pageshift int64 + Npages int64 + Free int64 + Active int64 + Inactive int64 + Paging int64 + Wired int64 + Zeropages int64 + Reserve_pagedaemon int64 + Reserve_kernel int64 + Freemin int64 + Freetarg int64 + Inactarg int64 + Wiredmax int64 + Nswapdev int64 + Swpages int64 + Swpginuse int64 + Swpgonly int64 + Nswget int64 + Unused1 int64 + Cpuhit int64 + Cpumiss int64 + Faults int64 + Traps int64 + Intrs int64 + Swtch int64 + Softs int64 + Syscalls int64 + Pageins int64 + Swapins int64 + Swapouts int64 + Pgswapin int64 + Pgswapout int64 + Forks int64 + Forks_ppwait int64 + Forks_sharevm int64 + Pga_zerohit int64 + Pga_zeromiss int64 + Zeroaborts int64 + Fltnoram int64 + Fltnoanon int64 + Fltpgwait int64 + Fltpgrele int64 + Fltrelck int64 + Fltrelckok int64 + Fltanget int64 + Fltanretry int64 + Fltamcopy int64 + Fltnamap int64 + Fltnomap int64 + Fltlget int64 + Fltget int64 + Flt_anon int64 + Flt_acow int64 + Flt_obj int64 + Flt_prcopy int64 + Flt_przero int64 + Pdwoke int64 + Pdrevs int64 + Unused4 int64 + Pdfreed int64 + Pdscans int64 + Pdanscan int64 + Pdobscan int64 + Pdreact int64 + Pdbusy int64 + Pdpageouts int64 + Pdpending int64 + Pddeact int64 + Anonpages int64 + Filepages int64 + Execpages int64 + Colorhit int64 + Colormiss int64 + Ncolors int64 + Bootpages int64 + Poolpages int64 +} + const SizeofClockinfo = 0x14 type Clockinfo struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index 2ed718ca..26eba23b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -58,22 +58,22 @@ type Rlimit struct { type _Gid_t uint32 type Stat_t struct { - Mode uint32 - Dev int32 - Ino uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Rdev int32 - Atim Timespec - Mtim Timespec - Ctim Timespec - Size int64 - Blocks int64 - Blksize uint32 - Flags uint32 - Gen uint32 - X__st_birthtim Timespec + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + _ Timespec } type Statfs_t struct { @@ -98,7 +98,7 @@ type Statfs_t struct { F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte - Pad_cgo_0 [2]byte + _ [2]byte Mount_info [160]byte } @@ -111,13 +111,13 @@ type Flock_t struct { } type Dirent struct { - Fileno uint64 - Off int64 - Reclen uint16 - Type uint8 - Namlen uint8 - X__d_padding [4]uint8 - Name [256]int8 + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + _ [4]uint8 + Name [256]int8 } type Fsid struct { @@ -262,8 +262,8 @@ type FdSet struct { } const ( - SizeofIfMsghdr = 0xec - SizeofIfData = 0xd4 + SizeofIfMsghdr = 0xa0 + SizeofIfData = 0x88 SizeofIfaMsghdr = 0x18 SizeofIfAnnounceMsghdr = 0x1a SizeofRtMsghdr = 0x60 @@ -292,7 +292,7 @@ type IfData struct { Link_state uint8 Mtu uint32 Metric uint32 - Pad uint32 + Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 @@ -304,10 +304,10 @@ type IfData struct { Imcasts uint64 Omcasts uint64 Iqdrops uint64 + Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval - Mclpool [7]Mclpool } type IfaMsghdr struct { @@ -368,20 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct { - Grown int32 - Alive uint16 - Hwm uint16 - Cwm uint16 - Lwm uint16 -} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -407,11 +399,14 @@ type BpfInsn struct { } type BpfHdr struct { - Tstamp BpfTimeval - Caplen uint32 - Datalen uint32 - Hdrlen uint16 - Pad_cgo_0 [2]byte + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { @@ -488,7 +483,7 @@ type Uvmexp struct { Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 - Anonpages int32 + Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 @@ -507,8 +502,8 @@ type Uvmexp struct { Swpgonly int32 Nswget int32 Nanon int32 - Nanonneeded int32 - Nfreeanon int32 + Unused05 int32 + Unused06 int32 Faults int32 Traps int32 Intrs int32 @@ -516,8 +511,8 @@ type Uvmexp struct { Softs int32 Syscalls int32 Pageins int32 - Obsolete_swapins int32 - Obsolete_swapouts int32 + Unused07 int32 + Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 @@ -525,7 +520,7 @@ type Uvmexp struct { Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 - Zeroaborts int32 + Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 @@ -557,9 +552,9 @@ type Uvmexp struct { Pdpageouts int32 Pdpending int32 Pddeact int32 - Pdreanon int32 - Pdrevnode int32 - Pdrevtext int32 + Unused11 int32 + Unused12 int32 + Unused13 int32 Fpswtch int32 Kmapent int32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index b4fb97eb..5a547988 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -73,7 +73,6 @@ type Stat_t struct { Blksize int32 Flags uint32 Gen uint32 - _ [4]byte _ Timespec } @@ -81,7 +80,6 @@ type Statfs_t struct { F_flags uint32 F_bsize uint32 F_iosize uint32 - _ [4]byte F_blocks uint64 F_bfree uint64 F_bavail int64 @@ -200,10 +198,8 @@ type IPv6Mreq struct { type Msghdr struct { Name *byte Namelen uint32 - _ [4]byte Iov *Iovec Iovlen uint32 - _ [4]byte Control *byte Controllen uint32 Flags int32 @@ -311,7 +307,6 @@ type IfData struct { Oqdrops uint64 Noproto uint64 Capabilities uint32 - _ [4]byte Lastchange Timeval } @@ -373,14 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -395,7 +388,6 @@ type BpfStat struct { type BpfProgram struct { Len uint32 - _ [4]byte Insns *BpfInsn } @@ -411,7 +403,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { @@ -488,7 +483,7 @@ type Uvmexp struct { Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 - Anonpages int32 + Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 @@ -507,8 +502,8 @@ type Uvmexp struct { Swpgonly int32 Nswget int32 Nanon int32 - Nanonneeded int32 - Nfreeanon int32 + Unused05 int32 + Unused06 int32 Faults int32 Traps int32 Intrs int32 @@ -516,8 +511,8 @@ type Uvmexp struct { Softs int32 Syscalls int32 Pageins int32 - Obsolete_swapins int32 - Obsolete_swapouts int32 + Unused07 int32 + Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 @@ -525,7 +520,7 @@ type Uvmexp struct { Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 - Zeroaborts int32 + Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 @@ -557,9 +552,9 @@ type Uvmexp struct { Pdpageouts int32 Pdpending int32 Pddeact int32 - Pdreanon int32 - Pdrevnode int32 - Pdrevtext int32 + Unused11 int32 + Unused12 int32 + Unused13 int32 Fpswtch int32 Kmapent int32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index 2c467504..be58c4e1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -375,14 +375,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -412,7 +410,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go index ddee0451..52338266 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go @@ -368,14 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -405,7 +403,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go index eb13d4e8..605cfdb1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go @@ -368,14 +368,12 @@ type RtMetrics struct { Pad uint32 } -type Mclpool struct{} - const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 - SizeofBpfHdr = 0x14 + SizeofBpfHdr = 0x18 ) type BpfVersion struct { @@ -405,7 +403,10 @@ type BpfHdr struct { Caplen uint32 Datalen uint32 Hdrlen uint16 - _ [2]byte + Ifidx uint16 + Flowid uint16 + Flags uint8 + Drops uint8 } type BpfTimeval struct { diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 7a6ba43a..a49853e9 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -367,6 +367,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode //sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible //sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo +//sys GetLargePageMinimum() (size uintptr) // Volume Management Functions //sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 96ba8559..ac60052e 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -252,6 +252,7 @@ var ( procGetFileType = modkernel32.NewProc("GetFileType") procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW") procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") + procGetLargePageMinimum = modkernel32.NewProc("GetLargePageMinimum") procGetLastError = modkernel32.NewProc("GetLastError") procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW") procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives") @@ -2180,6 +2181,12 @@ func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) ( return } +func GetLargePageMinimum() (size uintptr) { + r0, _, _ := syscall.Syscall(procGetLargePageMinimum.Addr(), 0, 0, 0, 0) + size = uintptr(r0) + return +} + func GetLastError() (lasterr error) { r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0) if r0 != 0 { diff --git a/vendor/golang.org/x/term/terminal.go b/vendor/golang.org/x/term/terminal.go index 4b48a589..f636667f 100644 --- a/vendor/golang.org/x/term/terminal.go +++ b/vendor/golang.org/x/term/terminal.go @@ -233,7 +233,6 @@ func (t *Terminal) queue(data []rune) { t.outBuf = append(t.outBuf, []byte(string(data))...) } -var eraseUnderCursor = []rune{' ', keyEscape, '[', 'D'} var space = []rune{' '} func isPrintable(key rune) bool { diff --git a/vendor/golang.org/x/text/unicode/bidi/trieval.go b/vendor/golang.org/x/text/unicode/bidi/trieval.go index 4c459c4b..6a796e22 100644 --- a/vendor/golang.org/x/text/unicode/bidi/trieval.go +++ b/vendor/golang.org/x/text/unicode/bidi/trieval.go @@ -37,18 +37,6 @@ const ( unknownClass = ^Class(0) ) -var controlToClass = map[rune]Class{ - 0x202D: LRO, // LeftToRightOverride, - 0x202E: RLO, // RightToLeftOverride, - 0x202A: LRE, // LeftToRightEmbedding, - 0x202B: RLE, // RightToLeftEmbedding, - 0x202C: PDF, // PopDirectionalFormat, - 0x2066: LRI, // LeftToRightIsolate, - 0x2067: RLI, // RightToLeftIsolate, - 0x2068: FSI, // FirstStrongIsolate, - 0x2069: PDI, // PopDirectionalIsolate, -} - // A trie entry has the following bits: // 7..5 XOR mask for brackets // 4 1: Bracket open, 0: Bracket close diff --git a/vendor/golang.org/x/time/AUTHORS b/vendor/golang.org/x/time/AUTHORS deleted file mode 100644 index 15167cd7..00000000 --- a/vendor/golang.org/x/time/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/time/CONTRIBUTORS b/vendor/golang.org/x/time/CONTRIBUTORS deleted file mode 100644 index 1c4577e9..00000000 --- a/vendor/golang.org/x/time/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index a98fe778..8f7c29f1 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -80,6 +80,19 @@ func (lim *Limiter) Burst() int { return lim.burst } +// TokensAt returns the number of tokens available at time t. +func (lim *Limiter) TokensAt(t time.Time) float64 { + lim.mu.Lock() + _, _, tokens := lim.advance(t) // does not mutute lim + lim.mu.Unlock() + return tokens +} + +// Tokens returns the number of tokens available now. +func (lim *Limiter) Tokens() float64 { + return lim.TokensAt(time.Now()) +} + // NewLimiter returns a new Limiter that allows events up to rate r and permits // bursts of at most b tokens. func NewLimiter(r Limit, b int) *Limiter { @@ -89,16 +102,16 @@ func NewLimiter(r Limit, b int) *Limiter { } } -// Allow is shorthand for AllowN(time.Now(), 1). +// Allow reports whether an event may happen now. func (lim *Limiter) Allow() bool { return lim.AllowN(time.Now(), 1) } -// AllowN reports whether n events may happen at time now. +// AllowN reports whether n events may happen at time t. // Use this method if you intend to drop / skip events that exceed the rate limit. // Otherwise use Reserve or Wait. -func (lim *Limiter) AllowN(now time.Time, n int) bool { - return lim.reserveN(now, n, 0).ok +func (lim *Limiter) AllowN(t time.Time, n int) bool { + return lim.reserveN(t, n, 0).ok } // A Reservation holds information about events that are permitted by a Limiter to happen after a delay. @@ -125,17 +138,17 @@ func (r *Reservation) Delay() time.Duration { } // InfDuration is the duration returned by Delay when a Reservation is not OK. -const InfDuration = time.Duration(1<<63 - 1) +const InfDuration = time.Duration(math.MaxInt64) // DelayFrom returns the duration for which the reservation holder must wait // before taking the reserved action. Zero duration means act immediately. // InfDuration means the limiter cannot grant the tokens requested in this // Reservation within the maximum wait time. -func (r *Reservation) DelayFrom(now time.Time) time.Duration { +func (r *Reservation) DelayFrom(t time.Time) time.Duration { if !r.ok { return InfDuration } - delay := r.timeToAct.Sub(now) + delay := r.timeToAct.Sub(t) if delay < 0 { return 0 } @@ -145,13 +158,12 @@ func (r *Reservation) DelayFrom(now time.Time) time.Duration { // Cancel is shorthand for CancelAt(time.Now()). func (r *Reservation) Cancel() { r.CancelAt(time.Now()) - return } // CancelAt indicates that the reservation holder will not perform the reserved action // and reverses the effects of this Reservation on the rate limit as much as possible, // considering that other reservations may have already been made. -func (r *Reservation) CancelAt(now time.Time) { +func (r *Reservation) CancelAt(t time.Time) { if !r.ok { return } @@ -159,7 +171,7 @@ func (r *Reservation) CancelAt(now time.Time) { r.lim.mu.Lock() defer r.lim.mu.Unlock() - if r.lim.limit == Inf || r.tokens == 0 || r.timeToAct.Before(now) { + if r.lim.limit == Inf || r.tokens == 0 || r.timeToAct.Before(t) { return } @@ -171,23 +183,21 @@ func (r *Reservation) CancelAt(now time.Time) { return } // advance time to now - now, _, tokens := r.lim.advance(now) + t, _, tokens := r.lim.advance(t) // calculate new number of tokens tokens += restoreTokens if burst := float64(r.lim.burst); tokens > burst { tokens = burst } // update state - r.lim.last = now + r.lim.last = t r.lim.tokens = tokens if r.timeToAct == r.lim.lastEvent { prevEvent := r.timeToAct.Add(r.limit.durationFromTokens(float64(-r.tokens))) - if !prevEvent.Before(now) { + if !prevEvent.Before(t) { r.lim.lastEvent = prevEvent } } - - return } // Reserve is shorthand for ReserveN(time.Now(), 1). @@ -199,18 +209,20 @@ func (lim *Limiter) Reserve() *Reservation { // The Limiter takes this Reservation into account when allowing future events. // The returned Reservation’s OK() method returns false if n exceeds the Limiter's burst size. // Usage example: -// r := lim.ReserveN(time.Now(), 1) -// if !r.OK() { -// // Not allowed to act! Did you remember to set lim.burst to be > 0 ? -// return -// } -// time.Sleep(r.Delay()) -// Act() +// +// r := lim.ReserveN(time.Now(), 1) +// if !r.OK() { +// // Not allowed to act! Did you remember to set lim.burst to be > 0 ? +// return +// } +// time.Sleep(r.Delay()) +// Act() +// // Use this method if you wish to wait and slow down in accordance with the rate limit without dropping events. // If you need to respect a deadline or cancel the delay, use Wait instead. // To drop or skip events exceeding rate limit, use Allow instead. -func (lim *Limiter) ReserveN(now time.Time, n int) *Reservation { - r := lim.reserveN(now, n, InfDuration) +func (lim *Limiter) ReserveN(t time.Time, n int) *Reservation { + r := lim.reserveN(t, n, InfDuration) return &r } @@ -224,6 +236,18 @@ func (lim *Limiter) Wait(ctx context.Context) (err error) { // canceled, or the expected wait time exceeds the Context's Deadline. // The burst limit is ignored if the rate limit is Inf. func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { + // The test code calls lim.wait with a fake timer generator. + // This is the real timer generator. + newTimer := func(d time.Duration) (<-chan time.Time, func() bool, func()) { + timer := time.NewTimer(d) + return timer.C, timer.Stop, func() {} + } + + return lim.wait(ctx, n, time.Now(), newTimer) +} + +// wait is the internal implementation of WaitN. +func (lim *Limiter) wait(ctx context.Context, n int, t time.Time, newTimer func(d time.Duration) (<-chan time.Time, func() bool, func())) error { lim.mu.Lock() burst := lim.burst limit := lim.limit @@ -239,25 +263,25 @@ func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { default: } // Determine wait limit - now := time.Now() waitLimit := InfDuration if deadline, ok := ctx.Deadline(); ok { - waitLimit = deadline.Sub(now) + waitLimit = deadline.Sub(t) } // Reserve - r := lim.reserveN(now, n, waitLimit) + r := lim.reserveN(t, n, waitLimit) if !r.ok { return fmt.Errorf("rate: Wait(n=%d) would exceed context deadline", n) } // Wait if necessary - delay := r.DelayFrom(now) + delay := r.DelayFrom(t) if delay == 0 { return nil } - t := time.NewTimer(delay) - defer t.Stop() + ch, stop, advance := newTimer(delay) + defer stop() + advance() // only has an effect when testing select { - case <-t.C: + case <-ch: // We can proceed. return nil case <-ctx.Done(): @@ -276,13 +300,13 @@ func (lim *Limiter) SetLimit(newLimit Limit) { // SetLimitAt sets a new Limit for the limiter. The new Limit, and Burst, may be violated // or underutilized by those which reserved (using Reserve or Wait) but did not yet act // before SetLimitAt was called. -func (lim *Limiter) SetLimitAt(now time.Time, newLimit Limit) { +func (lim *Limiter) SetLimitAt(t time.Time, newLimit Limit) { lim.mu.Lock() defer lim.mu.Unlock() - now, _, tokens := lim.advance(now) + t, _, tokens := lim.advance(t) - lim.last = now + lim.last = t lim.tokens = tokens lim.limit = newLimit } @@ -293,13 +317,13 @@ func (lim *Limiter) SetBurst(newBurst int) { } // SetBurstAt sets a new burst size for the limiter. -func (lim *Limiter) SetBurstAt(now time.Time, newBurst int) { +func (lim *Limiter) SetBurstAt(t time.Time, newBurst int) { lim.mu.Lock() defer lim.mu.Unlock() - now, _, tokens := lim.advance(now) + t, _, tokens := lim.advance(t) - lim.last = now + lim.last = t lim.tokens = tokens lim.burst = newBurst } @@ -307,20 +331,32 @@ func (lim *Limiter) SetBurstAt(now time.Time, newBurst int) { // reserveN is a helper method for AllowN, ReserveN, and WaitN. // maxFutureReserve specifies the maximum reservation wait duration allowed. // reserveN returns Reservation, not *Reservation, to avoid allocation in AllowN and WaitN. -func (lim *Limiter) reserveN(now time.Time, n int, maxFutureReserve time.Duration) Reservation { +func (lim *Limiter) reserveN(t time.Time, n int, maxFutureReserve time.Duration) Reservation { lim.mu.Lock() + defer lim.mu.Unlock() if lim.limit == Inf { - lim.mu.Unlock() return Reservation{ ok: true, lim: lim, tokens: n, - timeToAct: now, + timeToAct: t, + } + } else if lim.limit == 0 { + var ok bool + if lim.burst >= n { + ok = true + lim.burst -= n + } + return Reservation{ + ok: ok, + lim: lim, + tokens: lim.burst, + timeToAct: t, } } - now, last, tokens := lim.advance(now) + t, last, tokens := lim.advance(t) // Calculate the remaining number of tokens resulting from the request. tokens -= float64(n) @@ -342,61 +378,55 @@ func (lim *Limiter) reserveN(now time.Time, n int, maxFutureReserve time.Duratio } if ok { r.tokens = n - r.timeToAct = now.Add(waitDuration) + r.timeToAct = t.Add(waitDuration) } // Update state if ok { - lim.last = now + lim.last = t lim.tokens = tokens lim.lastEvent = r.timeToAct } else { lim.last = last } - lim.mu.Unlock() return r } // advance calculates and returns an updated state for lim resulting from the passage of time. // lim is not changed. // advance requires that lim.mu is held. -func (lim *Limiter) advance(now time.Time) (newNow time.Time, newLast time.Time, newTokens float64) { +func (lim *Limiter) advance(t time.Time) (newT time.Time, newLast time.Time, newTokens float64) { last := lim.last - if now.Before(last) { - last = now - } - - // Avoid making delta overflow below when last is very old. - maxElapsed := lim.limit.durationFromTokens(float64(lim.burst) - lim.tokens) - elapsed := now.Sub(last) - if elapsed > maxElapsed { - elapsed = maxElapsed + if t.Before(last) { + last = t } // Calculate the new number of tokens, due to time that passed. + elapsed := t.Sub(last) delta := lim.limit.tokensFromDuration(elapsed) tokens := lim.tokens + delta if burst := float64(lim.burst); tokens > burst { tokens = burst } - - return now, last, tokens + return t, last, tokens } // durationFromTokens is a unit conversion function from the number of tokens to the duration // of time it takes to accumulate them at a rate of limit tokens per second. func (limit Limit) durationFromTokens(tokens float64) time.Duration { + if limit <= 0 { + return InfDuration + } seconds := tokens / float64(limit) - return time.Nanosecond * time.Duration(1e9*seconds) + return time.Duration(float64(time.Second) * seconds) } // tokensFromDuration is a unit conversion function from a time duration to the number of tokens // which could be accumulated during that duration at a rate of limit tokens per second. func (limit Limit) tokensFromDuration(d time.Duration) float64 { - // Split the integer and fractional parts ourself to minimize rounding errors. - // See golang.org/issues/34861. - sec := float64(d/time.Second) * float64(limit) - nsec := float64(d%time.Second) * float64(limit) - return sec + nsec/1e9 + if limit <= 0 { + return 0 + } + return d.Seconds() * float64(limit) } diff --git a/vendor/golang.org/x/time/rate/sometimes.go b/vendor/golang.org/x/time/rate/sometimes.go new file mode 100644 index 00000000..6ba99ddb --- /dev/null +++ b/vendor/golang.org/x/time/rate/sometimes.go @@ -0,0 +1,67 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package rate + +import ( + "sync" + "time" +) + +// Sometimes will perform an action occasionally. The First, Every, and +// Interval fields govern the behavior of Do, which performs the action. +// A zero Sometimes value will perform an action exactly once. +// +// # Example: logging with rate limiting +// +// var sometimes = rate.Sometimes{First: 3, Interval: 10*time.Second} +// func Spammy() { +// sometimes.Do(func() { log.Info("here I am!") }) +// } +type Sometimes struct { + First int // if non-zero, the first N calls to Do will run f. + Every int // if non-zero, every Nth call to Do will run f. + Interval time.Duration // if non-zero and Interval has elapsed since f's last run, Do will run f. + + mu sync.Mutex + count int // number of Do calls + last time.Time // last time f was run +} + +// Do runs the function f as allowed by First, Every, and Interval. +// +// The model is a union (not intersection) of filters. The first call to Do +// always runs f. Subsequent calls to Do run f if allowed by First or Every or +// Interval. +// +// A non-zero First:N causes the first N Do(f) calls to run f. +// +// A non-zero Every:M causes every Mth Do(f) call, starting with the first, to +// run f. +// +// A non-zero Interval causes Do(f) to run f if Interval has elapsed since +// Do last ran f. +// +// Specifying multiple filters produces the union of these execution streams. +// For example, specifying both First:N and Every:M causes the first N Do(f) +// calls and every Mth Do(f) call, starting with the first, to run f. See +// Examples for more. +// +// If Do is called multiple times simultaneously, the calls will block and run +// serially. Therefore, Do is intended for lightweight operations. +// +// Because a call to Do may block until f returns, if f causes Do to be called, +// it will deadlock. +func (s *Sometimes) Do(f func()) { + s.mu.Lock() + defer s.mu.Unlock() + if s.count == 0 || + (s.First > 0 && s.count < s.First) || + (s.Every > 0 && s.count%s.Every == 0) || + (s.Interval > 0 && time.Since(s.last) >= s.Interval) { + f() + s.last = time.Now() + } + s.count++ +} diff --git a/vendor/gopkg.in/ini.v1/.golangci.yml b/vendor/gopkg.in/ini.v1/.golangci.yml index b7256bae..631e3692 100644 --- a/vendor/gopkg.in/ini.v1/.golangci.yml +++ b/vendor/gopkg.in/ini.v1/.golangci.yml @@ -1,4 +1,9 @@ linters-settings: + staticcheck: + checks: [ + "all", + "-SA1019" # There are valid use cases of strings.Title + ] nakedret: max-func-lines: 0 # Disallow any unnamed return statement @@ -19,3 +24,4 @@ linters: - rowserrcheck - unconvert - goimports + - unparam diff --git a/vendor/gopkg.in/ini.v1/README.md b/vendor/gopkg.in/ini.v1/README.md index 1e429445..30606d97 100644 --- a/vendor/gopkg.in/ini.v1/README.md +++ b/vendor/gopkg.in/ini.v1/README.md @@ -1,6 +1,6 @@ # INI -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/go-ini/ini/Go?logo=github&style=for-the-badge)](https://github.com/go-ini/ini/actions?query=workflow%3AGo) +[![GitHub Workflow Status](https://img.shields.io/github/checks-status/go-ini/ini/main?logo=github&style=for-the-badge)](https://github.com/go-ini/ini/actions?query=branch%3Amain) [![codecov](https://img.shields.io/codecov/c/github/go-ini/ini/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/go-ini/ini) [![GoDoc](https://img.shields.io/badge/GoDoc-Reference-blue?style=for-the-badge&logo=go)](https://pkg.go.dev/github.com/go-ini/ini?tab=doc) [![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/go-ini/ini) @@ -24,7 +24,7 @@ Package ini provides INI file read and write functionality in Go. ## Installation -The minimum requirement of Go is **1.12**. +The minimum requirement of Go is **1.13**. ```sh $ go get gopkg.in/ini.v1 diff --git a/vendor/gopkg.in/ini.v1/codecov.yml b/vendor/gopkg.in/ini.v1/codecov.yml index 31f646ee..e02ec84b 100644 --- a/vendor/gopkg.in/ini.v1/codecov.yml +++ b/vendor/gopkg.in/ini.v1/codecov.yml @@ -4,6 +4,13 @@ coverage: project: default: threshold: 1% + informational: true + patch: + defualt: + only_pulls: true + informational: true comment: layout: 'diff' + +github_checks: false diff --git a/vendor/gopkg.in/ini.v1/deprecated.go b/vendor/gopkg.in/ini.v1/deprecated.go index e8bda06e..48b8e66d 100644 --- a/vendor/gopkg.in/ini.v1/deprecated.go +++ b/vendor/gopkg.in/ini.v1/deprecated.go @@ -14,12 +14,9 @@ package ini -const ( +var ( // Deprecated: Use "DefaultSection" instead. DEFAULT_SECTION = DefaultSection -) - -var ( // Deprecated: AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE. AllCapsUnderscore = SnackCase ) diff --git a/vendor/gopkg.in/ini.v1/error.go b/vendor/gopkg.in/ini.v1/error.go index d88347c5..f66bc94b 100644 --- a/vendor/gopkg.in/ini.v1/error.go +++ b/vendor/gopkg.in/ini.v1/error.go @@ -32,3 +32,18 @@ func IsErrDelimiterNotFound(err error) bool { func (err ErrDelimiterNotFound) Error() string { return fmt.Sprintf("key-value delimiter not found: %s", err.Line) } + +// ErrEmptyKeyName indicates the error type of no key name is found which there should be one. +type ErrEmptyKeyName struct { + Line string +} + +// IsErrEmptyKeyName returns true if the given error is an instance of ErrEmptyKeyName. +func IsErrEmptyKeyName(err error) bool { + _, ok := err.(ErrEmptyKeyName) + return ok +} + +func (err ErrEmptyKeyName) Error() string { + return fmt.Sprintf("empty key name: %s", err.Line) +} diff --git a/vendor/gopkg.in/ini.v1/file.go b/vendor/gopkg.in/ini.v1/file.go index 9d91c31a..f8b22408 100644 --- a/vendor/gopkg.in/ini.v1/file.go +++ b/vendor/gopkg.in/ini.v1/file.go @@ -342,6 +342,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { // Use buffer to make sure target is safe until finish encoding. buf := bytes.NewBuffer(nil) + lastSectionIdx := len(f.sectionList) - 1 for i, sname := range f.sectionList { sec := f.SectionWithIndex(sname, f.sectionIndexes[i]) if len(sec.Comment) > 0 { @@ -371,12 +372,13 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { } } + isLastSection := i == lastSectionIdx if sec.isRawSection { if _, err := buf.WriteString(sec.rawBody); err != nil { return nil, err } - if PrettySection { + if PrettySection && !isLastSection { // Put a line between sections if _, err := buf.WriteString(LineBreak); err != nil { return nil, err @@ -448,9 +450,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { } if key.isBooleanType { - if kname != sec.keyList[len(sec.keyList)-1] { - buf.WriteString(LineBreak) - } + buf.WriteString(LineBreak) return true, nil } @@ -496,7 +496,7 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { } } - if PrettySection { + if PrettySection && !isLastSection { // Put a line between sections if _, err := buf.WriteString(LineBreak); err != nil { return nil, err diff --git a/vendor/gopkg.in/ini.v1/ini.go b/vendor/gopkg.in/ini.v1/ini.go index ac2a93a5..99e7f865 100644 --- a/vendor/gopkg.in/ini.v1/ini.go +++ b/vendor/gopkg.in/ini.v1/ini.go @@ -23,15 +23,15 @@ import ( ) const ( - // DefaultSection is the name of default section. You can use this constant or the string literal. - // In most of cases, an empty string is all you need to access the section. - DefaultSection = "DEFAULT" - // Maximum allowed depth when recursively substituing variable names. depthValues = 99 ) var ( + // DefaultSection is the name of default section. You can use this var or the string literal. + // In most of cases, an empty string is all you need to access the section. + DefaultSection = "DEFAULT" + // LineBreak is the delimiter to determine or compose a new line. // This variable will be changed to "\r\n" automatically on Windows at package init time. LineBreak = "\n" diff --git a/vendor/gopkg.in/ini.v1/parser.go b/vendor/gopkg.in/ini.v1/parser.go index ac1c980a..44fc526c 100644 --- a/vendor/gopkg.in/ini.v1/parser.go +++ b/vendor/gopkg.in/ini.v1/parser.go @@ -164,6 +164,10 @@ func readKeyName(delimiters string, in []byte) (string, int, error) { if endIdx < 0 { return "", -1, ErrDelimiterNotFound{line} } + if endIdx == 0 { + return "", -1, ErrEmptyKeyName{line} + } + return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil } @@ -463,8 +467,9 @@ func (f *File) parse(reader io.Reader) (err error) { kname, offset, err := readKeyName(f.options.KeyValueDelimiters, line) if err != nil { + switch { // Treat as boolean key when desired, and whole line is key name. - if IsErrDelimiterNotFound(err) { + case IsErrDelimiterNotFound(err): switch { case f.options.AllowBooleanKeys: kname, err := p.readValue(line, parserBufferSize) @@ -482,6 +487,8 @@ func (f *File) parse(reader io.Reader) (err error) { case f.options.SkipUnrecognizableLines: continue } + case IsErrEmptyKeyName(err) && f.options.SkipUnrecognizableLines: + continue } return err } diff --git a/vendor/modernc.org/libc/probes.go b/vendor/modernc.org/libc/probes.go new file mode 100644 index 00000000..b92cfa1b --- /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/sqlite/AUTHORS b/vendor/modernc.org/sqlite/AUTHORS index c39eab88..dae34d6b 100644 --- a/vendor/modernc.org/sqlite/AUTHORS +++ b/vendor/modernc.org/sqlite/AUTHORS @@ -14,6 +14,7 @@ David Walton Davsk Ltd Co Jaap Aarts Jan Mercl <0xjnml@gmail.com> +Josh Bleecher Snyder Logan Snow Michael Hoffmann Ross Light diff --git a/vendor/modernc.org/sqlite/CONTRIBUTORS b/vendor/modernc.org/sqlite/CONTRIBUTORS index e3863c61..04e28754 100644 --- a/vendor/modernc.org/sqlite/CONTRIBUTORS +++ b/vendor/modernc.org/sqlite/CONTRIBUTORS @@ -11,10 +11,12 @@ 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 diff --git a/vendor/modernc.org/sqlite/Makefile b/vendor/modernc.org/sqlite/Makefile index f064827e..0ce355fb 100644 --- a/vendor/modernc.org/sqlite/Makefile +++ b/vendor/modernc.org/sqlite/Makefile @@ -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 5d6fe98e..ebe1bbb7 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 6805e75d..b9ced856 100644 --- a/vendor/modernc.org/sqlite/generator.go +++ b/vendor/modernc.org/sqlite/generator.go @@ -150,11 +150,21 @@ 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,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", @@ -199,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", @@ -217,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(). @@ -230,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 @@ -255,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() { @@ -543,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", @@ -630,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", }, diff --git a/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go b/vendor/modernc.org/sqlite/lib/capi_darwin_amd64.go index cd24575c..cc961294 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 -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-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 9d64415f..91c38c14 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 -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-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 41c23808..a9fcf5d0 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 -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-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 4a8d00cc..5796d666 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 -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-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 863c9084..b5f8f89c 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 -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-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 4a8d00cc..5796d666 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 -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-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 539d8a8a..c9832902 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 -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-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 e56fcd46..e9d333f5 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 -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-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 14ffa899..32859cdd 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 -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-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 3a28196b..92317048 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 -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-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 890356a5..0b144f30 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 -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-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 14864887..1d559c5d 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 -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-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 c9538037..3ff5ad53 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 -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-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 64d6c6fa..66a387b8 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 -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-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 201f4f7f..63ef31ff 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 -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-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 e68efa8a..03f21fd6 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 -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-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 c04a55ab..3120ba98 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 -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-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 c04a55ab..3120ba98 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 -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-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 7f5961f8..be44263a 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 5e68282c..489061cc 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -22701,7 +22871,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +24174,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -24040,6 +24231,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*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 -__23: - ; 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; 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: + ; +__282: ; __281: ; -__280: - ; -__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,39 +52474,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -52189,18 +52520,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -52573,17 +52904,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -52591,10 +52911,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -52602,11 +52922,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -52614,16 +52933,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - 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) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - 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: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + 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) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + 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) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -55361,222 +55733,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+6265) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+6279) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +64771,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+8042) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+8048) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+8056) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +79412,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15179) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 5460, 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 + 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) - if !!(isQuick != 0) { - goto __304 + + 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 __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 __306 -__308: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __309 - } - goto __306 -__309: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__310: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __311 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+18139, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __313 -__312: - integrityCheckResultRow(tls, v) -__313: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__311: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __314 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+18159, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__314: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __317 + } + goto __315 +__317: ; - goto __306 -__306: + if !(bStrict != 0) { + goto __318 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __320 + } + goto __315 +__320: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __321 + } + 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 __327 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __328 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __329 +__328: + ; +__329: + ; +__327: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __330 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +96896,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -118635,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 @@ -118906,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 } @@ -118979,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: @@ -119029,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 } @@ -119177,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) @@ -119207,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 { @@ -119222,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 } @@ -119318,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 @@ -119329,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++ { @@ -119340,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) @@ -119413,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 } @@ -119447,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 { @@ -119590,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) @@ -119635,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 { @@ -119752,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) } @@ -119768,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 @@ -119777,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 } @@ -119985,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) @@ -120078,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 { @@ -120148,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 @@ -120158,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 @@ -120190,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 @@ -120327,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 @@ -120372,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 @@ -120480,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 @@ -120491,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 } @@ -120509,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) { @@ -120539,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: @@ -120547,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 @@ -120587,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: ; @@ -120611,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}, {}, } @@ -120734,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) @@ -120753,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 @@ -120765,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) { @@ -120782,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) @@ -120799,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)))) @@ -120833,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) @@ -120940,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)) @@ -121043,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 @@ -121168,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: ; @@ -121215,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)))) @@ -121292,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) @@ -121868,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) @@ -121901,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 @@ -121912,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 @@ -121986,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) @@ -122081,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 } } @@ -122164,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) { @@ -122317,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: @@ -122343,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 } @@ -122372,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) } @@ -122430,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 } @@ -122987,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)) @@ -123098,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) @@ -123404,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) @@ -123419,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 { @@ -123473,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) @@ -123578,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)) } @@ -123623,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 { @@ -123739,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 } @@ -123841,7 +124628,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15720) + jsonWrongNumArgs(tls, ctx, ts+15767) return __2: ; @@ -123916,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: @@ -124051,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)) } @@ -124148,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)) } @@ -124192,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) { @@ -124323,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) { @@ -124342,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 @@ -124438,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) } @@ -124462,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 @@ -124578,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 } @@ -124673,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 { @@ -124710,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 { @@ -124971,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) } @@ -125186,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)) @@ -125889,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 } @@ -126101,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 } @@ -127230,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 { @@ -127242,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)) } } @@ -127288,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 @@ -127473,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)) @@ -127496,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 { @@ -127544,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{ @@ -127587,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) { @@ -127628,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 { @@ -127640,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 @@ -127648,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 @@ -127674,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 { @@ -127710,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 @@ -127718,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)) } } @@ -127772,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: ; @@ -127806,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: @@ -127818,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) { @@ -127841,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 @@ -127852,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: @@ -127902,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: ; @@ -127919,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: ; @@ -127937,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) @@ -127975,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}))) @@ -127992,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 { @@ -128070,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 @@ -128094,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)) } @@ -128113,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)) } } @@ -128127,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) { @@ -128143,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)) } } @@ -128183,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 { @@ -128203,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)) } } } @@ -128220,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 } @@ -128235,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++ { @@ -128264,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) @@ -128293,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) @@ -128307,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) } @@ -128326,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) @@ -128335,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 } @@ -128350,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) @@ -128358,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))) } @@ -128368,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) @@ -128737,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) } @@ -128761,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) } @@ -129679,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 @@ -129688,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++ @@ -129696,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 @@ -129707,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: @@ -129732,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: ; @@ -129921,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 @@ -129931,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 @@ -129939,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 @@ -130051,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 @@ -130181,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})) @@ -130253,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 } @@ -130265,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 @@ -130293,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) @@ -130366,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}))) } } } @@ -130433,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 @@ -130691,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 } @@ -130702,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}))) } @@ -130715,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 @@ -130727,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 } @@ -130803,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 { @@ -130867,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++ { } @@ -130888,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 @@ -130995,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))) } } @@ -131013,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 } @@ -131031,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 } @@ -131049,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 } @@ -131072,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 } @@ -131118,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 @@ -131133,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 { @@ -131173,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 @@ -131183,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 } } @@ -131206,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) @@ -131231,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) @@ -131274,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 } @@ -131290,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 } @@ -131318,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))) } @@ -131373,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 @@ -131413,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 @@ -131421,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: @@ -131445,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) { @@ -131472,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++ @@ -131484,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: @@ -131511,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))) { @@ -131529,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 { @@ -131541,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++ } @@ -131605,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 @@ -131622,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 @@ -131634,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 } } } @@ -131663,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 { @@ -131677,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 } } } @@ -131726,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 } @@ -131750,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 @@ -131773,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))) { @@ -131787,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))) @@ -131797,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)) } } @@ -131825,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)) } } @@ -131881,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))) } } @@ -131918,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 @@ -132023,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 } @@ -132043,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 { @@ -132076,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, @@ -132084,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)) } @@ -132133,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 @@ -132143,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)) } @@ -132196,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 } } @@ -132216,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))) } @@ -132307,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) @@ -132339,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) } @@ -132371,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: @@ -132441,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 } @@ -132495,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)))) == '?' { @@ -132511,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 }())) @@ -132536,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) } } @@ -132595,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 } @@ -132711,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 { @@ -132728,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 @@ -132765,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 || @@ -132864,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 } @@ -132957,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) @@ -132965,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)) } } } @@ -132986,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, @@ -133016,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))) @@ -133032,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 { @@ -133049,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 { @@ -133066,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))) @@ -133086,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) @@ -133118,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 } @@ -133216,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 { @@ -133232,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)) @@ -133248,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) @@ -133282,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 { @@ -133312,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))) { @@ -133329,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) @@ -133359,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 @@ -133373,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) @@ -133402,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 @@ -133420,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 }())) } } @@ -133433,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) @@ -133444,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) } } @@ -133510,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) } } @@ -133537,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++ @@ -133554,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 { @@ -133567,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 } @@ -133668,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)) } } @@ -133685,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)) } } @@ -133705,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 @@ -133723,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 { @@ -134018,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 @@ -134043,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 @@ -134088,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))))) @@ -136899,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 { @@ -136941,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)) @@ -137002,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) } } @@ -137076,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 { @@ -137144,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) } @@ -137156,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 @@ -137508,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: ; @@ -137676,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 } } @@ -137761,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 { @@ -137809,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 { @@ -137820,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)) @@ -137848,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 } @@ -137883,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))) } @@ -138136,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 { @@ -138152,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)) } } } @@ -138225,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)) @@ -138261,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 @@ -138274,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 } @@ -138287,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 } @@ -138350,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)) } } @@ -138871,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) @@ -139605,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 @@ -139893,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 @@ -140080,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 } @@ -140148,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 } @@ -140307,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) { @@ -140330,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 } @@ -140654,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}))}, } @@ -141071,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) @@ -141211,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 @@ -141238,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 } @@ -141256,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 } @@ -141269,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))) @@ -141278,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++ { @@ -141297,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, @@ -141312,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 } @@ -141327,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) @@ -141337,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') @@ -141347,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 } @@ -141408,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 } } @@ -141433,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)) } } } @@ -141477,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 } @@ -141510,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 { @@ -141519,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 { @@ -141547,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 { @@ -141603,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) @@ -141724,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) @@ -141734,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) @@ -141744,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) @@ -141757,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) @@ -141767,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) @@ -141783,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) @@ -141806,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 @@ -141828,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 @@ -141842,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)) } } @@ -141940,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 } } @@ -141953,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 @@ -143733,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)) } } @@ -143751,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') @@ -143838,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) } @@ -143919,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) } @@ -144089,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) @@ -145037,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 { @@ -145116,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 @@ -145141,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 @@ -145164,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 { @@ -145403,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) } @@ -145476,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)) } } @@ -146602,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 @@ -147795,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)) @@ -147961,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) @@ -147992,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) @@ -148068,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))) } @@ -148111,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 { @@ -148123,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)) } @@ -148243,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}))) @@ -148642,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 @@ -148658,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) } { @@ -148839,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 } @@ -148963,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 @@ -148972,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})) } @@ -149004,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 } } @@ -149058,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 } @@ -149129,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) } @@ -149145,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 { @@ -149404,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))) @@ -149518,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))) { @@ -149677,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))) @@ -149684,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)) @@ -149955,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 } @@ -149986,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))) } @@ -150001,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) @@ -150315,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 @@ -150347,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) } @@ -150379,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 @@ -150443,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 } @@ -150479,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, @@ -150510,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 } } @@ -150542,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) } } @@ -150605,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: ; @@ -150648,7 +151470,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -150822,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: @@ -150943,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))) } } } @@ -150967,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 { @@ -151046,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))) @@ -151059,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 { @@ -151694,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 { @@ -151938,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 @@ -151957,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, @@ -152004,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 } @@ -152013,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 { @@ -152027,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 { @@ -152051,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) } @@ -152069,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)) } @@ -152130,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) @@ -152207,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))) } } } @@ -152242,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 @@ -152265,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)) } } @@ -152277,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)) } @@ -152296,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))) } @@ -152343,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) } } @@ -152569,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)) } @@ -152582,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 } @@ -152758,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 @@ -152940,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 } @@ -153142,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 @@ -153359,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)) @@ -153371,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)) } } @@ -153382,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 } @@ -153669,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)) @@ -153811,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 } @@ -153819,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 } @@ -153831,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 } @@ -153839,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 } @@ -153847,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 } @@ -153859,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 } @@ -153879,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 } @@ -153891,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 } @@ -153899,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 } @@ -153911,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 } @@ -153919,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 } @@ -153927,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 } @@ -153943,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 } @@ -153975,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 } } @@ -154120,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 } @@ -154137,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 } @@ -154159,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 } @@ -154167,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 } } @@ -154184,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 @@ -154198,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 @@ -154354,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 { @@ -154534,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 @@ -155692,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) @@ -155725,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 @@ -155870,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)) @@ -155898,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 { @@ -156182,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) @@ -156293,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{ @@ -156315,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() { @@ -156989,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 @@ -157335,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 @@ -157401,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 @@ -157421,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 @@ -157442,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 364078e7..dd184fc5 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 -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-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) } @@ -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) } @@ -21115,7 +21381,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +22684,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -22454,6 +22741,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*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 -__23: - ; 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; 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: + ; +__282: ; __281: ; -__280: - ; -__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,39 +50984,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -50603,18 +51030,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -50987,17 +51414,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -51005,10 +51421,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -51016,11 +51432,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -51028,16 +51443,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - 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) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - 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: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + 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) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + 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) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -53775,222 +54243,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+6265) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+6279) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +63281,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+8042) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+8048) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+8056) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +77922,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+15179) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 5460, 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 + 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) - if !!(isQuick != 0) { - goto __304 + + 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 __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 __306 -__308: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __309 - } - goto __306 -__309: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__310: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __311 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+18139, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __313 -__312: - integrityCheckResultRow(tls, v) -__313: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__311: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __314 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+18159, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__314: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __317 + } + goto __315 +__317: ; - goto __306 -__306: + if !(bStrict != 0) { + goto __318 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __320 + } + goto __315 +__320: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __321 + } + 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 __327 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __328 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __329 +__328: + ; +__329: + ; +__327: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __330 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +95406,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -117049,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 @@ -117320,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 } @@ -117393,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: @@ -117443,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 } @@ -117591,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) @@ -117621,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 { @@ -117636,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 } @@ -117732,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 @@ -117743,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++ { @@ -117754,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) @@ -117827,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 } @@ -117861,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 { @@ -118004,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) @@ -118049,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 { @@ -118166,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) } @@ -118182,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 @@ -118191,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 } @@ -118399,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) @@ -118492,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 { @@ -118562,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 @@ -118572,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 @@ -118604,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 @@ -118741,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 @@ -118786,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 @@ -118894,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 @@ -118905,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 } @@ -118923,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) { @@ -118953,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: @@ -118961,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 @@ -119001,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: ; @@ -119025,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}, {}, } @@ -119148,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) @@ -119167,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 @@ -119179,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) { @@ -119196,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) @@ -119213,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)))) @@ -119247,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) @@ -119354,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)) @@ -119457,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 @@ -119582,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: ; @@ -119629,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)))) @@ -119706,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) @@ -120282,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) @@ -120315,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 @@ -120326,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 @@ -120400,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) @@ -120495,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 } } @@ -120578,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) { @@ -120731,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: @@ -120757,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 } @@ -120786,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) } @@ -120844,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 } @@ -121401,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)) @@ -121512,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) @@ -121818,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) @@ -121833,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 { @@ -121887,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) @@ -121992,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)) } @@ -122037,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 { @@ -122153,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 } @@ -122255,7 +123138,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15720) + jsonWrongNumArgs(tls, ctx, ts+15767) return __2: ; @@ -122330,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: @@ -122465,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)) } @@ -122562,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)) } @@ -122606,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) { @@ -122737,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) { @@ -122756,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 @@ -122852,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) } @@ -122876,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 @@ -122992,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 } @@ -123087,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 { @@ -123124,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 { @@ -123385,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) } @@ -123600,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)) @@ -124303,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 } @@ -124515,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 } @@ -125644,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 { @@ -125656,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)) } } @@ -125702,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 @@ -125887,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)) @@ -125910,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 { @@ -125958,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{ @@ -126001,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) { @@ -126042,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 { @@ -126054,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 @@ -126062,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 @@ -126088,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 { @@ -126124,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 @@ -126132,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)) } } @@ -126186,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: ; @@ -126220,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: @@ -126232,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) { @@ -126255,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 @@ -126266,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: @@ -126316,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: ; @@ -126333,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: ; @@ -126351,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) @@ -126389,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}))) @@ -126406,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 { @@ -126484,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 @@ -126508,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)) } @@ -126527,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)) } } @@ -126541,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) { @@ -126557,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)) } } @@ -126597,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 { @@ -126617,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)) } } } @@ -126634,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 } @@ -126649,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++ { @@ -126678,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) @@ -126707,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) @@ -126721,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) } @@ -126740,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) @@ -126749,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 } @@ -126764,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) @@ -126772,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))) } @@ -126782,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) @@ -127151,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) } @@ -127175,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) } @@ -128093,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 @@ -128102,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++ @@ -128110,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 @@ -128121,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: @@ -128146,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: ; @@ -128335,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 @@ -128345,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 @@ -128353,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 @@ -128465,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 @@ -128595,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})) @@ -128667,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 } @@ -128679,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 @@ -128707,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) @@ -128780,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}))) } } } @@ -128847,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 @@ -129105,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 } @@ -129116,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}))) } @@ -129129,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 @@ -129141,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 } @@ -129217,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 { @@ -129281,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++ { } @@ -129302,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 @@ -129409,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))) } } @@ -129427,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 } @@ -129445,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 } @@ -129463,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 } @@ -129486,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 } @@ -129532,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 @@ -129547,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 { @@ -129587,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 @@ -129597,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 } } @@ -129620,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) @@ -129645,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) @@ -129688,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 } @@ -129704,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 } @@ -129732,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))) } @@ -129787,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 @@ -129827,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 @@ -129835,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: @@ -129859,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) { @@ -129886,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++ @@ -129898,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: @@ -129925,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))) { @@ -129943,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 { @@ -129955,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++ } @@ -130019,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 @@ -130036,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 @@ -130048,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 } } } @@ -130077,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 { @@ -130091,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 } } } @@ -130140,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 } @@ -130164,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 @@ -130187,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))) { @@ -130201,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))) @@ -130211,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)) } } @@ -130239,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)) } } @@ -130295,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))) } } @@ -130332,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 @@ -130437,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 } @@ -130457,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 { @@ -130490,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, @@ -130498,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)) } @@ -130547,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 @@ -130557,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)) } @@ -130610,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 } } @@ -130630,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))) } @@ -130721,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) @@ -130753,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) } @@ -130785,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: @@ -130855,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 } @@ -130909,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)))) == '?' { @@ -130925,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 }())) @@ -130950,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) } } @@ -131009,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 } @@ -131125,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 { @@ -131142,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 @@ -131179,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 || @@ -131278,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 } @@ -131371,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) @@ -131379,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)) } } } @@ -131400,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, @@ -131430,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))) @@ -131446,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 { @@ -131463,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 { @@ -131480,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))) @@ -131500,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) @@ -131532,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 } @@ -131630,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 { @@ -131646,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)) @@ -131662,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) @@ -131696,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 { @@ -131726,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))) { @@ -131743,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) @@ -131773,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 @@ -131787,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) @@ -131816,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 @@ -131834,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 }())) } } @@ -131847,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) @@ -131858,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) } } @@ -131924,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) } } @@ -131951,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++ @@ -131968,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 { @@ -131981,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 } @@ -132082,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)) } } @@ -132099,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)) } } @@ -132119,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 @@ -132137,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 { @@ -132432,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 @@ -132457,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 @@ -132502,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))))) @@ -135313,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 { @@ -135355,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)) @@ -135416,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) } } @@ -135490,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 { @@ -135558,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) } @@ -135570,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 @@ -135922,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: ; @@ -136090,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 } } @@ -136175,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 { @@ -136223,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 { @@ -136234,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)) @@ -136262,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 } @@ -136297,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))) } @@ -136550,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 { @@ -136566,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)) } } } @@ -136639,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)) @@ -136675,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 @@ -136688,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 } @@ -136701,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 } @@ -136764,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)) } } @@ -137285,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) @@ -138019,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 @@ -138307,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 @@ -138494,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 } @@ -138562,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 } @@ -138721,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) { @@ -138744,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 } @@ -139068,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}))}, } @@ -139485,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) @@ -139625,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 @@ -139652,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 } @@ -139670,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 } @@ -139683,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))) @@ -139692,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++ { @@ -139711,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, @@ -139726,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 } @@ -139741,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) @@ -139751,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') @@ -139761,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 } @@ -139822,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 } } @@ -139847,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)) } } } @@ -139891,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 } @@ -139924,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 { @@ -139933,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 { @@ -139961,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 { @@ -140017,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) @@ -140138,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) @@ -140148,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) @@ -140158,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) @@ -140171,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) @@ -140181,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) @@ -140197,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) @@ -140220,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 @@ -140242,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 @@ -140256,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)) } } @@ -140354,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 } } @@ -140367,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 @@ -142147,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)) } } @@ -142165,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') @@ -142252,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) } @@ -142333,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) } @@ -142503,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) @@ -143451,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 { @@ -143530,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 @@ -143555,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 @@ -143578,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 { @@ -143817,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) } @@ -143890,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)) } } @@ -145016,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 @@ -146209,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)) @@ -146375,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) @@ -146406,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) @@ -146482,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))) } @@ -146525,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 { @@ -146537,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)) } @@ -146657,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}))) @@ -147056,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 @@ -147072,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) } { @@ -147253,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 } @@ -147377,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 @@ -147386,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})) } @@ -147418,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 } } @@ -147472,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 } @@ -147543,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) } @@ -147559,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 { @@ -147818,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))) @@ -147932,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))) { @@ -148091,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))) @@ -148098,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)) @@ -148369,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 } @@ -148400,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))) } @@ -148415,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) @@ -148729,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 @@ -148761,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) } @@ -148793,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 @@ -148857,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 } @@ -148893,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, @@ -148924,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 } } @@ -148956,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) } } @@ -149019,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: ; @@ -149062,7 +149980,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -149236,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: @@ -149357,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))) } } } @@ -149381,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 { @@ -149460,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))) @@ -149473,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 { @@ -150108,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 { @@ -150352,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 @@ -150371,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, @@ -150418,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 } @@ -150427,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 { @@ -150441,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 { @@ -150465,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) } @@ -150483,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)) } @@ -150544,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) @@ -150621,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))) } } } @@ -150656,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 @@ -150679,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)) } } @@ -150691,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)) } @@ -150710,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))) } @@ -150757,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) } } @@ -150983,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)) } @@ -150996,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 } @@ -151172,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 @@ -151354,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 } @@ -151556,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 @@ -151773,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)) @@ -151785,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)) } } @@ -151796,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 } @@ -152083,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)) @@ -152225,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 } @@ -152233,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 } @@ -152245,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 } @@ -152253,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 } @@ -152261,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 } @@ -152273,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 } @@ -152293,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 } @@ -152305,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 } @@ -152313,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 } @@ -152325,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 } @@ -152333,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 } @@ -152341,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 } @@ -152357,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 } @@ -152389,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 } } @@ -152534,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 } @@ -152551,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 } @@ -152573,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 } @@ -152581,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 } } @@ -152598,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 @@ -152612,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 @@ -152768,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 { @@ -152948,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 @@ -154106,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) @@ -154139,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 @@ -154284,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)) @@ -154312,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 { @@ -154596,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) @@ -154707,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{ @@ -154729,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() { @@ -155403,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 @@ -155749,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 @@ -155815,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 @@ -155835,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 @@ -155856,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 18433d04..74e2ff6e 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 -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-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) + 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), 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) } @@ -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) } @@ -17252,7 +17421,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +17731,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -17598,6 +17788,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*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 -__23: - ; 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - 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 - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) + goto __4 + +__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 + +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + 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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46025,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45741,18 +46071,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46125,17 +46455,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46143,10 +46462,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46154,11 +46473,10 @@ __350: ; goto __8 -__67: +__66: 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 !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46166,16 +46484,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 40 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 40 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 300)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 300)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 300)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 300)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 300)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 300)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 484)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 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) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 36)), bp+484) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: + ; +__735: + ; +__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 @@ -48913,222 +49284,222 @@ __120: *(*U32)(unsafe.Pointer(p + 156 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+500) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+500) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) - - if !(*(*int32)(unsafe.Pointer(bp + 500)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 156 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*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 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 500)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+500) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+500) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) + + if !(*(*int32)(unsafe.Pointer(bp + 500)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 568)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+568) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 568)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+568) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +58315,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __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 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +72956,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 524)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +90389,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 20 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 20 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+488, *(*int32)(unsafe.Pointer(pE + 36))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+84, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+76, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112119,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 @@ -112390,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 } @@ -112463,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: @@ -112513,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 } @@ -112661,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) @@ -112691,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 { @@ -112706,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 } @@ -112802,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 @@ -112813,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++ { @@ -112824,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) @@ -112897,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 } @@ -112931,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 { @@ -113074,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) @@ -113119,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 { @@ -113236,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) } @@ -113252,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 @@ -113261,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 } @@ -113469,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) @@ -113562,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 { @@ -113632,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 @@ -113642,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 @@ -113674,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 @@ -113811,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 @@ -113856,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 @@ -113964,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 @@ -113975,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 } @@ -113993,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) { @@ -114023,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: @@ -114031,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 @@ -114071,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: ; @@ -114094,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}, {}, } @@ -114217,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) @@ -114236,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 @@ -114248,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) { @@ -114265,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) @@ -114282,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)))) @@ -114316,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) @@ -114423,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)) @@ -114526,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 @@ -114651,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: ; @@ -114698,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)))) @@ -114775,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) @@ -115351,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) @@ -115384,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 @@ -115395,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 @@ -115469,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) @@ -115564,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 } } @@ -115646,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) { @@ -115799,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: @@ -115825,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 } @@ -115854,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) } @@ -115912,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 } @@ -116469,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)) @@ -116580,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) @@ -116886,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) @@ -116901,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 { @@ -116955,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) @@ -117060,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)) } @@ -117105,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 { @@ -117221,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 } @@ -117323,7 +118109,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117398,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: @@ -117533,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)) } @@ -117630,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)) } @@ -117674,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) { @@ -117805,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) { @@ -117824,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 @@ -117920,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) } @@ -117944,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 @@ -118060,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 } @@ -118155,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 { @@ -118192,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 { @@ -118446,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) } @@ -118661,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)) @@ -119364,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 } @@ -119576,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 } @@ -120705,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 { @@ -120717,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)) } } @@ -120763,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 @@ -120948,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)) @@ -120971,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 { @@ -121019,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{ @@ -121062,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) { @@ -121103,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 { @@ -121115,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 @@ -121123,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 @@ -121149,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 { @@ -121185,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 @@ -121193,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)) } } @@ -121247,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: ; @@ -121281,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: @@ -121293,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) { @@ -121316,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 @@ -121327,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: @@ -121377,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: ; @@ -121394,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: ; @@ -121412,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) @@ -121450,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}))) @@ -121467,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 { @@ -121543,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 @@ -121567,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)) } @@ -121586,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)) } } @@ -121600,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) { @@ -121616,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)) } } @@ -121656,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 { @@ -121676,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)) } } } @@ -121693,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 } @@ -121708,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++ { @@ -121737,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) @@ -121766,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) @@ -121780,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) } @@ -121799,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) @@ -121808,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 } @@ -121823,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) @@ -121831,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))) } @@ -121841,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) @@ -122209,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) } @@ -122233,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) } @@ -123149,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 @@ -123158,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++ @@ -123166,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 @@ -123177,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: @@ -123202,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: ; @@ -123391,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 @@ -123401,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 @@ -123409,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 @@ -123521,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 @@ -123651,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})) @@ -123723,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 } @@ -123735,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 @@ -123763,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) @@ -123836,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}))) } } } @@ -123900,6 +124686,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124149,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 } @@ -124160,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}))) } @@ -124173,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 @@ -124185,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 } @@ -124261,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 { @@ -124325,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++ { } @@ -124346,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 @@ -124453,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))) } } @@ -124471,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 } @@ -124489,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 } @@ -124507,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 } @@ -124530,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 } @@ -124576,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 @@ -124591,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 { @@ -124631,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 @@ -124641,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 } } @@ -124664,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) @@ -124689,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) @@ -124732,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 } @@ -124748,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 } @@ -124776,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))) } @@ -124831,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 @@ -124871,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 @@ -124879,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: @@ -124903,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) { @@ -124930,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++ @@ -124942,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: @@ -124969,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))) { @@ -124987,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 { @@ -124999,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++ } @@ -125063,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 @@ -125080,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 @@ -125092,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 } } } @@ -125121,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 { @@ -125135,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 } } } @@ -125184,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 } @@ -125208,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 @@ -125231,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))) { @@ -125245,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))) @@ -125255,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)) } } @@ -125283,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)) } } @@ -125339,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))) } } @@ -125376,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 @@ -125481,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 } @@ -125501,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 { @@ -125534,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, @@ -125542,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)) } @@ -125591,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 @@ -125601,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)) } @@ -125654,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 } } @@ -125674,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))) } @@ -125765,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) @@ -125797,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) } @@ -125829,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: @@ -125899,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 } @@ -125953,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)))) == '?' { @@ -125969,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 }())) @@ -125994,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) } } @@ -126053,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 } @@ -126169,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 { @@ -126186,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 @@ -126223,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 || @@ -126322,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 } @@ -126415,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) @@ -126423,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)) } } } @@ -126444,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, @@ -126474,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))) @@ -126490,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 { @@ -126507,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 { @@ -126524,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))) @@ -126544,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) @@ -126576,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 } @@ -126674,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 { @@ -126690,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)) @@ -126706,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) @@ -126740,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 { @@ -126770,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))) { @@ -126787,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) @@ -126817,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 @@ -126831,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) @@ -126860,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 @@ -126878,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 }())) } } @@ -126891,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) @@ -126902,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) } } @@ -126968,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) } } @@ -126995,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++ @@ -127012,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 { @@ -127025,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 } @@ -127126,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)) } } @@ -127143,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)) } } @@ -127163,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 @@ -127181,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 { @@ -127476,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 @@ -127501,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 @@ -127546,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))))) @@ -130352,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 { @@ -130394,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)) @@ -130455,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) } } @@ -130529,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 { @@ -130597,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) } @@ -130609,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 @@ -130961,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: ; @@ -131127,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 } } @@ -131212,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 { @@ -131260,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 { @@ -131271,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)) @@ -131299,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 } @@ -131334,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))) } @@ -131587,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 { @@ -131603,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)) } } } @@ -131676,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)) @@ -131712,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 @@ -131725,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 } @@ -131738,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 } @@ -131801,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)) } } @@ -132322,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) @@ -133040,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 @@ -133328,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 @@ -133513,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 } @@ -133581,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 } @@ -133739,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) { @@ -133762,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 } @@ -134085,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}))}, } @@ -134502,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) @@ -134641,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 @@ -134668,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 } @@ -134686,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 } @@ -134699,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) @@ -134708,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++ { @@ -134727,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, @@ -134742,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 } @@ -134757,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) @@ -134767,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') @@ -134777,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 } @@ -134838,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 } } @@ -134863,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)) } } } @@ -134907,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 } @@ -134940,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 { @@ -134949,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 { @@ -134977,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 { @@ -135033,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) @@ -135154,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) @@ -135164,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) @@ -135174,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) @@ -135187,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) @@ -135197,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) @@ -135213,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) @@ -135236,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 @@ -135258,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 @@ -135272,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)) } } @@ -135370,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 } } @@ -135383,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 @@ -137162,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)) } } @@ -137180,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') @@ -137267,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) } @@ -137348,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) } @@ -137518,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) @@ -138463,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 { @@ -138542,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 @@ -138567,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 @@ -138590,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 { @@ -138829,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) } @@ -138902,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)) } } @@ -140028,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 @@ -141220,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)) @@ -141386,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) @@ -141417,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) @@ -141493,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))) } @@ -141536,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 { @@ -141548,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)) } @@ -141668,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}))) @@ -142067,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 @@ -142083,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) } { @@ -142263,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 } @@ -142387,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 @@ -142396,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})) } @@ -142428,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 } } @@ -142482,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 } @@ -142553,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) } @@ -142569,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 { @@ -142828,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))) @@ -142942,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))) { @@ -143101,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))) @@ -143108,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)) @@ -143376,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 } @@ -143407,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))) } @@ -143422,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) @@ -143736,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 @@ -143768,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) } @@ -143800,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 @@ -143864,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 } @@ -143900,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, @@ -143931,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 } } @@ -143963,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) } } @@ -144026,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: ; @@ -144069,7 +144890,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144243,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: @@ -144364,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))) } } } @@ -144388,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 { @@ -144467,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))) @@ -144480,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 { @@ -145115,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 { @@ -145359,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 @@ -145378,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, @@ -145425,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 } @@ -145434,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 { @@ -145448,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 { @@ -145472,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) } @@ -145490,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)) } @@ -145551,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) @@ -145628,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))) } } } @@ -145663,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 @@ -145686,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)) } } @@ -145698,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)) } @@ -145717,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))) } @@ -145764,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) } } @@ -145990,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)) } @@ -146003,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 } @@ -146179,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 @@ -146361,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 } @@ -146563,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 @@ -146779,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{}))) @@ -146791,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)) } } @@ -146802,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 } @@ -147089,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)) @@ -147229,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 } @@ -147237,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 } @@ -147249,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 } @@ -147257,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 } @@ -147265,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 } @@ -147277,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 } @@ -147297,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 } @@ -147309,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 } @@ -147317,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 } @@ -147329,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 } @@ -147337,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 } @@ -147345,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 } @@ -147361,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 } @@ -147393,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 } } @@ -147538,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 } @@ -147555,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 } @@ -147577,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 } @@ -147585,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 } } @@ -147602,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 @@ -147616,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 @@ -147772,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 { @@ -147952,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 @@ -149106,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) @@ -149139,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 @@ -149284,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)) @@ -149312,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 { @@ -149596,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) @@ -149707,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{ @@ -149729,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() { @@ -150270,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 @@ -150580,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 @@ -150646,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 @@ -150666,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 @@ -150687,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 6645ed81..e7c31d8c 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -17343,7 +17513,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +17826,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -17692,6 +17883,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46130,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45845,18 +46176,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46229,17 +46560,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46247,10 +46567,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46258,11 +46578,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46270,16 +46589,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49017,222 +49389,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +58427,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73069,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +90506,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112247,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 @@ -112518,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 } @@ -112591,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: @@ -112641,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 } @@ -112789,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) @@ -112819,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 { @@ -112834,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 } @@ -112930,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 @@ -112941,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++ { @@ -112952,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) @@ -113025,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 } @@ -113059,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 { @@ -113202,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) @@ -113247,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 { @@ -113364,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) } @@ -113380,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 @@ -113389,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 } @@ -113597,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) @@ -113690,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 { @@ -113760,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 @@ -113770,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 @@ -113802,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 @@ -113939,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 @@ -113984,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 @@ -114092,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 @@ -114103,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 } @@ -114121,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) { @@ -114151,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: @@ -114159,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 @@ -114199,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: ; @@ -114223,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}, {}, } @@ -114346,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) @@ -114365,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 @@ -114377,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) { @@ -114394,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) @@ -114411,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)))) @@ -114445,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) @@ -114552,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)) @@ -114655,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 @@ -114780,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: ; @@ -114827,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)))) @@ -114904,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) @@ -115480,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) @@ -115513,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 @@ -115524,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 @@ -115598,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) @@ -115693,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 } } @@ -115776,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) { @@ -115929,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: @@ -115955,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 } @@ -115984,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) } @@ -116042,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 } @@ -116599,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)) @@ -116710,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) @@ -117016,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) @@ -117031,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 { @@ -117085,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) @@ -117190,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)) } @@ -117235,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 { @@ -117351,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 } @@ -117453,7 +118240,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117528,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: @@ -117663,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)) } @@ -117760,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)) } @@ -117804,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) { @@ -117935,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) { @@ -117954,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 @@ -118050,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) } @@ -118074,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 @@ -118190,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 } @@ -118285,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 { @@ -118322,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 { @@ -118583,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) } @@ -118798,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)) @@ -119501,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 } @@ -119713,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 } @@ -120842,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 { @@ -120854,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)) } } @@ -120900,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 @@ -121085,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)) @@ -121108,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 { @@ -121156,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{ @@ -121199,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) { @@ -121240,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 { @@ -121252,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 @@ -121260,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 @@ -121286,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 { @@ -121322,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 @@ -121330,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)) } } @@ -121384,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: ; @@ -121418,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: @@ -121430,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) { @@ -121453,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 @@ -121464,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: @@ -121514,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: ; @@ -121531,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: ; @@ -121549,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) @@ -121587,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}))) @@ -121604,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 { @@ -121682,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 @@ -121706,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)) } @@ -121725,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)) } } @@ -121739,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) { @@ -121755,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)) } } @@ -121795,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 { @@ -121815,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)) } } } @@ -121832,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 } @@ -121847,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++ { @@ -121876,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) @@ -121905,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) @@ -121919,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) } @@ -121938,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) @@ -121947,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 } @@ -121962,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) @@ -121970,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))) } @@ -121980,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) @@ -122349,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) } @@ -122373,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) } @@ -123291,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 @@ -123300,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++ @@ -123308,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 @@ -123319,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: @@ -123344,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: ; @@ -123533,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 @@ -123543,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 @@ -123551,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 @@ -123663,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 @@ -123793,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})) @@ -123865,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 } @@ -123877,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 @@ -123905,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) @@ -123978,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}))) } } } @@ -124045,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 @@ -124303,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 } @@ -124314,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}))) } @@ -124327,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 @@ -124339,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 } @@ -124415,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 { @@ -124479,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++ { } @@ -124500,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 @@ -124607,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))) } } @@ -124625,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 } @@ -124643,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 } @@ -124661,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 } @@ -124684,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 } @@ -124730,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 @@ -124745,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 { @@ -124785,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 @@ -124795,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 } } @@ -124818,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) @@ -124843,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) @@ -124886,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 } @@ -124902,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 } @@ -124930,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))) } @@ -124985,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 @@ -125025,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 @@ -125033,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: @@ -125057,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) { @@ -125084,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++ @@ -125096,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: @@ -125123,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))) { @@ -125141,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 { @@ -125153,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++ } @@ -125217,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 @@ -125234,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 @@ -125246,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 } } } @@ -125275,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 { @@ -125289,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 } } } @@ -125338,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 } @@ -125362,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 @@ -125385,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))) { @@ -125399,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))) @@ -125409,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)) } } @@ -125437,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)) } } @@ -125493,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))) } } @@ -125530,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 @@ -125635,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 } @@ -125655,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 { @@ -125688,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, @@ -125696,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)) } @@ -125745,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 @@ -125755,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)) } @@ -125808,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 } } @@ -125828,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))) } @@ -125919,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) @@ -125951,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) } @@ -125983,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: @@ -126053,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 } @@ -126107,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)))) == '?' { @@ -126123,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 }())) @@ -126148,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) } } @@ -126207,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 } @@ -126323,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 { @@ -126340,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 @@ -126377,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 || @@ -126476,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 } @@ -126569,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) @@ -126577,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)) } } } @@ -126598,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, @@ -126628,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))) @@ -126644,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 { @@ -126661,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 { @@ -126678,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))) @@ -126698,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) @@ -126730,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 } @@ -126828,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 { @@ -126844,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)) @@ -126860,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) @@ -126894,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 { @@ -126924,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))) { @@ -126941,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) @@ -126971,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 @@ -126985,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) @@ -127014,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 @@ -127032,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 }())) } } @@ -127045,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) @@ -127056,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) } } @@ -127122,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) } } @@ -127149,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++ @@ -127166,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 { @@ -127179,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 } @@ -127280,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)) } } @@ -127297,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)) } } @@ -127317,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 @@ -127335,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 { @@ -127630,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 @@ -127655,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 @@ -127700,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))))) @@ -130511,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 { @@ -130553,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)) @@ -130614,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) } } @@ -130688,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 { @@ -130756,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) } @@ -130768,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 @@ -131120,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: ; @@ -131288,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 } } @@ -131373,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 { @@ -131421,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 { @@ -131432,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)) @@ -131460,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 } @@ -131495,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))) } @@ -131748,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 { @@ -131764,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)) } } } @@ -131837,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)) @@ -131873,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 @@ -131886,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 } @@ -131899,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 } @@ -131962,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)) } } @@ -132483,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) @@ -133217,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 @@ -133505,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 @@ -133692,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 } @@ -133760,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 } @@ -133919,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) { @@ -133942,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 } @@ -134266,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}))}, } @@ -134683,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) @@ -134823,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 @@ -134850,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 } @@ -134868,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 } @@ -134881,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))) @@ -134890,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++ { @@ -134909,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, @@ -134924,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 } @@ -134939,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) @@ -134949,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') @@ -134959,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 } @@ -135020,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 } } @@ -135045,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)) } } } @@ -135089,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 } @@ -135122,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 { @@ -135131,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 { @@ -135159,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 { @@ -135215,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) @@ -135336,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) @@ -135346,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) @@ -135356,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) @@ -135369,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) @@ -135379,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) @@ -135395,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) @@ -135418,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 @@ -135440,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 @@ -135454,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)) } } @@ -135552,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 } } @@ -135565,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 @@ -137345,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)) } } @@ -137363,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') @@ -137450,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) } @@ -137531,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) } @@ -137701,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) @@ -138649,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 { @@ -138728,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 @@ -138753,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 @@ -138776,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 { @@ -139015,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) } @@ -139088,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)) } } @@ -140214,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 @@ -141407,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)) @@ -141573,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) @@ -141604,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) @@ -141680,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))) } @@ -141723,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 { @@ -141735,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)) } @@ -141855,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}))) @@ -142254,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 @@ -142270,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) } { @@ -142451,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 } @@ -142575,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 @@ -142584,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})) } @@ -142616,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 } } @@ -142670,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 } @@ -142741,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) } @@ -142757,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 { @@ -143016,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))) @@ -143130,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))) { @@ -143289,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))) @@ -143296,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)) @@ -143567,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 } @@ -143598,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))) } @@ -143613,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) @@ -143927,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 @@ -143959,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) } @@ -143991,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 @@ -144055,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 } @@ -144091,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, @@ -144122,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 } } @@ -144154,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) } } @@ -144217,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: ; @@ -144260,7 +145082,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144434,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: @@ -144555,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))) } } } @@ -144579,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 { @@ -144658,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))) @@ -144671,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 { @@ -145306,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 { @@ -145550,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 @@ -145569,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, @@ -145616,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 } @@ -145625,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 { @@ -145639,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 { @@ -145663,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) } @@ -145681,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)) } @@ -145742,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) @@ -145819,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))) } } } @@ -145854,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 @@ -145877,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)) } } @@ -145889,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)) } @@ -145908,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))) } @@ -145955,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) } } @@ -146181,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)) } @@ -146194,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 } @@ -146370,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 @@ -146552,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 } @@ -146754,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 @@ -146971,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{}))) @@ -146983,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)) } } @@ -146994,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 } @@ -147281,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)) @@ -147423,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 } @@ -147431,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 } @@ -147443,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 } @@ -147451,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 } @@ -147459,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 } @@ -147471,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 } @@ -147491,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 } @@ -147503,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 } @@ -147511,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 } @@ -147523,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 } @@ -147531,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 } @@ -147539,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 } @@ -147555,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 } @@ -147587,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 } } @@ -147732,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 } @@ -147749,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 } @@ -147771,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 } @@ -147779,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 } } @@ -147796,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 @@ -147810,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 @@ -147966,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 { @@ -148146,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 @@ -149304,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) @@ -149337,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 @@ -149482,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)) @@ -149510,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 { @@ -149794,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) @@ -149905,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{ @@ -149927,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() { @@ -150468,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 @@ -150778,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 @@ -150844,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 @@ -150864,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 @@ -150885,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 88ed4d4b..2837204c 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 -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-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) + 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(*(*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), 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) } @@ -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) } @@ -17293,7 +17461,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +17771,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -17639,6 +17828,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*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 -__23: - ; 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - 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 - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) + goto __4 + +__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 + +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + 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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46068,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45785,18 +46114,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46169,17 +46498,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46187,10 +46505,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46198,11 +46516,10 @@ __350: ; goto __8 -__67: +__66: 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 !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46210,16 +46527,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 40 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 40 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 304)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 304)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 304)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 304)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 304)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 304)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 520)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 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) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 36)), bp+520) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: + ; +__735: + ; +__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 @@ -48957,222 +49327,222 @@ __120: *(*U32)(unsafe.Pointer(p + 164 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+536) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) - - if !(*(*int32)(unsafe.Pointer(bp + 536)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 164 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*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 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+536) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 616)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) + + if !(*(*int32)(unsafe.Pointer(bp + 536)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 624)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+624) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 616)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 624)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+624) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +58366,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __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 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73009,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 528)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +90442,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 20 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 20 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+504, *(*int32)(unsafe.Pointer(pE + 36))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+88, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+80, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112180,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 @@ -112451,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 } @@ -112524,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: @@ -112574,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 } @@ -112722,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) @@ -112752,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 { @@ -112767,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 } @@ -112863,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 @@ -112874,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++ { @@ -112885,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) @@ -112958,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 } @@ -112992,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 { @@ -113135,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) @@ -113180,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 { @@ -113297,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) } @@ -113313,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 @@ -113322,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 } @@ -113530,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) @@ -113623,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 { @@ -113693,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 @@ -113703,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 @@ -113735,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 @@ -113872,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 @@ -113917,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 @@ -114025,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 @@ -114036,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 } @@ -114054,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) { @@ -114084,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: @@ -114092,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 @@ -114132,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: ; @@ -114155,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}, {}, } @@ -114278,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) @@ -114297,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 @@ -114309,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) { @@ -114326,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) @@ -114343,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)))) @@ -114377,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) @@ -114484,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)) @@ -114587,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 @@ -114712,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: ; @@ -114759,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)))) @@ -114836,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) @@ -115412,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) @@ -115530,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) @@ -115707,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) { @@ -115860,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: @@ -115886,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 } @@ -115915,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) } @@ -115973,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 } @@ -116530,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)) @@ -116641,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) @@ -116947,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) @@ -116962,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 { @@ -117016,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) @@ -117121,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)) } @@ -117166,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 { @@ -117282,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 } @@ -117384,7 +118169,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117459,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: @@ -117594,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)) } @@ -117691,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)) } @@ -117735,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) { @@ -117866,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) { @@ -117885,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 @@ -117981,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) } @@ -118005,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 @@ -118121,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 } @@ -118216,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 { @@ -118253,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 { @@ -118511,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) } @@ -118726,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)) @@ -119429,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 } @@ -119641,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 } @@ -120770,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 { @@ -120782,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)) } } @@ -120828,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 @@ -121013,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)) @@ -121036,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 { @@ -121084,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{ @@ -121127,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) { @@ -121168,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 { @@ -121180,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 @@ -121188,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 @@ -121214,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 { @@ -121250,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 @@ -121258,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)) } } @@ -121312,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: ; @@ -121346,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: @@ -121358,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) { @@ -121381,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 @@ -121392,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: @@ -121442,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: ; @@ -121459,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: ; @@ -121477,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) @@ -121515,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}))) @@ -121532,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 { @@ -121608,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 @@ -121632,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)) } @@ -121651,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)) } } @@ -121665,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) { @@ -121681,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)) } } @@ -121721,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 { @@ -121741,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)) } } } @@ -121758,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 } @@ -121773,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++ { @@ -121802,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) @@ -121831,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) @@ -121845,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) } @@ -121864,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) @@ -121873,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 } @@ -121888,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) @@ -121896,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))) } @@ -121906,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) @@ -122274,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) } @@ -122298,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) } @@ -123215,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 @@ -123224,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++ @@ -123232,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 @@ -123243,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: @@ -123268,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: ; @@ -123457,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 @@ -123467,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 @@ -123475,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 @@ -123587,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 @@ -123717,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})) @@ -123789,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 } @@ -123801,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 @@ -123829,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) @@ -123902,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}))) } } } @@ -123966,6 +124751,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124218,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 } @@ -124229,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}))) } @@ -124242,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 @@ -124254,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 } @@ -124330,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 { @@ -124394,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++ { } @@ -124415,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 @@ -124522,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))) } } @@ -124540,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 } @@ -124558,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 } @@ -124576,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 } @@ -124599,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 } @@ -124645,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 @@ -124660,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 { @@ -124700,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 @@ -124710,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 } } @@ -124733,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) @@ -124758,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) @@ -124801,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 } @@ -124817,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 } @@ -124845,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))) } @@ -124900,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 @@ -124940,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 @@ -124948,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: @@ -124972,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) { @@ -124999,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++ @@ -125011,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: @@ -125038,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))) { @@ -125056,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 { @@ -125068,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++ } @@ -125132,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 @@ -125149,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 @@ -125161,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 } } } @@ -125190,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 { @@ -125204,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 } } } @@ -125253,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 } @@ -125277,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 @@ -125300,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))) { @@ -125314,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))) @@ -125324,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)) } } @@ -125352,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)) } } @@ -125408,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))) } } @@ -125445,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 @@ -125550,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 } @@ -125570,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 { @@ -125603,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, @@ -125611,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)) } @@ -125660,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 @@ -125670,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)) } @@ -125723,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 } } @@ -125743,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))) } @@ -125834,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) @@ -125866,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) } @@ -125898,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: @@ -125968,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 } @@ -126022,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)))) == '?' { @@ -126038,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 }())) @@ -126063,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) } } @@ -126122,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 } @@ -126238,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 { @@ -126255,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 @@ -126292,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 || @@ -126391,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 } @@ -126484,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) @@ -126492,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)) } } } @@ -126513,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, @@ -126543,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))) @@ -126559,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 { @@ -126576,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 { @@ -126593,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))) @@ -126613,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) @@ -126645,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 } @@ -126743,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 { @@ -126759,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)) @@ -126775,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) @@ -126809,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 { @@ -126839,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))) { @@ -126856,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) @@ -126886,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 @@ -126900,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) @@ -126929,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 @@ -126947,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 }())) } } @@ -126960,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) @@ -126971,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) } } @@ -127037,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) } } @@ -127064,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++ @@ -127081,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 { @@ -127094,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 } @@ -127195,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)) } } @@ -127212,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)) } } @@ -127232,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 @@ -127250,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 { @@ -127545,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 @@ -127570,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 @@ -127615,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))))) @@ -130421,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 { @@ -130463,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)) @@ -130524,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) } } @@ -130598,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 { @@ -130666,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) } @@ -130678,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 @@ -131030,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: ; @@ -131196,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 } } @@ -131281,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 { @@ -131329,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 { @@ -131340,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)) @@ -131368,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 } @@ -131403,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))) } @@ -131656,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 { @@ -131672,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)) } } } @@ -131745,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)) @@ -131781,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 @@ -131794,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 } @@ -131807,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 } @@ -131870,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)) } } @@ -132391,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) @@ -133114,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 @@ -133402,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 @@ -133587,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 } @@ -133655,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 } @@ -133813,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) { @@ -133836,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 } @@ -134160,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}))}, } @@ -134577,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) @@ -134716,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 @@ -134743,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 } @@ -134761,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 } @@ -134774,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) @@ -134783,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++ { @@ -134802,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, @@ -134817,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 } @@ -134832,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) @@ -134842,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') @@ -134852,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 } @@ -134913,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 } } @@ -134938,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)) } } } @@ -134982,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 } @@ -135015,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 { @@ -135024,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 { @@ -135052,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 { @@ -135108,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) @@ -135229,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) @@ -135239,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) @@ -135249,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) @@ -135262,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) @@ -135272,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) @@ -135288,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) @@ -135311,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 @@ -135333,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 @@ -135347,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)) } } @@ -135445,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 } } @@ -135458,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 @@ -137239,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)) } } @@ -137257,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') @@ -137344,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) } @@ -137425,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) } @@ -137595,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) @@ -138549,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 { @@ -138628,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 @@ -138653,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 @@ -138676,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 { @@ -138915,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) } @@ -138988,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)) } } @@ -140114,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 @@ -141306,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)) @@ -141472,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) @@ -141503,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) @@ -141579,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))) } @@ -141622,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 { @@ -141634,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)) } @@ -141754,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}))) @@ -142154,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 @@ -142170,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) } { @@ -142351,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 } @@ -142475,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 @@ -142484,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})) } @@ -142516,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 } } @@ -142570,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 } @@ -142641,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) } @@ -142657,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 { @@ -142916,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))) @@ -143030,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))) { @@ -143189,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))) @@ -143196,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)) @@ -143467,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 } @@ -143498,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))) } @@ -143513,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) @@ -143827,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 @@ -143859,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) } @@ -143891,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 @@ -143955,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 } @@ -143991,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, @@ -144022,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 } } @@ -144054,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) } } @@ -144117,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: ; @@ -144160,7 +144980,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144334,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: @@ -144455,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))) } } } @@ -144479,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 { @@ -144558,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))) @@ -144571,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 { @@ -145206,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 { @@ -145450,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 @@ -145469,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, @@ -145516,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 } @@ -145525,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 { @@ -145539,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 { @@ -145563,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) } @@ -145581,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)) } @@ -145642,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) @@ -145719,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))) } } } @@ -145754,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 @@ -145777,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)) } } @@ -145789,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)) } @@ -145808,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))) } @@ -145855,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) } } @@ -146081,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)) } @@ -146094,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 } @@ -146270,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 @@ -146452,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 } @@ -146654,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 @@ -146870,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{}))) @@ -146882,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)) } } @@ -146893,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 } @@ -147180,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)) @@ -147320,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 } @@ -147328,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 } @@ -147340,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 } @@ -147348,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 } @@ -147356,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 } @@ -147368,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 } @@ -147388,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 } @@ -147400,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 } @@ -147408,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 } @@ -147420,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 } @@ -147428,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 } @@ -147436,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 } @@ -147452,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 } @@ -147484,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 } } @@ -147629,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 } @@ -147646,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 } @@ -147668,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 } @@ -147676,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 } } @@ -147693,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 @@ -147707,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 @@ -147863,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 { @@ -148043,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 @@ -149200,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) @@ -149233,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 @@ -149378,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)) @@ -149406,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 { @@ -149690,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) @@ -149801,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{ @@ -149823,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() { @@ -150364,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 @@ -150674,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 @@ -150740,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 @@ -150760,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 @@ -150781,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 6645ed81..e7c31d8c 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -17343,7 +17513,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +17826,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -17692,6 +17883,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46130,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45845,18 +46176,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46229,17 +46560,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46247,10 +46567,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46258,11 +46578,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46270,16 +46589,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49017,222 +49389,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5855) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5869) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +58427,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7632) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73069,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14769) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17680, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17700, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +90506,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112247,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 @@ -112518,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 } @@ -112591,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: @@ -112641,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 } @@ -112789,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) @@ -112819,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 { @@ -112834,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 } @@ -112930,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 @@ -112941,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++ { @@ -112952,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) @@ -113025,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 } @@ -113059,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 { @@ -113202,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) @@ -113247,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 { @@ -113364,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) } @@ -113380,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 @@ -113389,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 } @@ -113597,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) @@ -113690,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 { @@ -113760,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 @@ -113770,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 @@ -113802,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 @@ -113939,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 @@ -113984,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 @@ -114092,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 @@ -114103,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 } @@ -114121,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) { @@ -114151,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: @@ -114159,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 @@ -114199,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: ; @@ -114223,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}, {}, } @@ -114346,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) @@ -114365,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 @@ -114377,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) { @@ -114394,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) @@ -114411,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)))) @@ -114445,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) @@ -114552,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)) @@ -114655,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 @@ -114780,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: ; @@ -114827,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)))) @@ -114904,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) @@ -115480,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) @@ -115513,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 @@ -115524,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 @@ -115598,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) @@ -115693,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 } } @@ -115776,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) { @@ -115929,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: @@ -115955,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 } @@ -115984,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) } @@ -116042,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 } @@ -116599,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)) @@ -116710,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) @@ -117016,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) @@ -117031,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 { @@ -117085,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) @@ -117190,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)) } @@ -117235,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 { @@ -117351,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 } @@ -117453,7 +118240,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15310) + jsonWrongNumArgs(tls, ctx, ts+15357) return __2: ; @@ -117528,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: @@ -117663,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)) } @@ -117760,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)) } @@ -117804,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) { @@ -117935,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) { @@ -117954,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 @@ -118050,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) } @@ -118074,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 @@ -118190,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 } @@ -118285,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 { @@ -118322,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 { @@ -118583,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) } @@ -118798,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)) @@ -119501,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 } @@ -119713,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 } @@ -120842,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 { @@ -120854,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)) } } @@ -120900,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 @@ -121085,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)) @@ -121108,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 { @@ -121156,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{ @@ -121199,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) { @@ -121240,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 { @@ -121252,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 @@ -121260,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 @@ -121286,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 { @@ -121322,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 @@ -121330,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)) } } @@ -121384,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: ; @@ -121418,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: @@ -121430,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) { @@ -121453,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 @@ -121464,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: @@ -121514,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: ; @@ -121531,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: ; @@ -121549,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) @@ -121587,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}))) @@ -121604,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 { @@ -121682,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 @@ -121706,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)) } @@ -121725,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)) } } @@ -121739,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) { @@ -121755,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)) } } @@ -121795,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 { @@ -121815,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)) } } } @@ -121832,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 } @@ -121847,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++ { @@ -121876,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) @@ -121905,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) @@ -121919,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) } @@ -121938,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) @@ -121947,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 } @@ -121962,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) @@ -121970,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))) } @@ -121980,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) @@ -122349,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) } @@ -122373,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) } @@ -123291,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 @@ -123300,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++ @@ -123308,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 @@ -123319,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: @@ -123344,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: ; @@ -123533,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 @@ -123543,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 @@ -123551,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 @@ -123663,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 @@ -123793,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})) @@ -123865,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 } @@ -123877,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 @@ -123905,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) @@ -123978,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}))) } } } @@ -124045,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 @@ -124303,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 } @@ -124314,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}))) } @@ -124327,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 @@ -124339,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 } @@ -124415,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 { @@ -124479,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++ { } @@ -124500,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 @@ -124607,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))) } } @@ -124625,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 } @@ -124643,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 } @@ -124661,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 } @@ -124684,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 } @@ -124730,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 @@ -124745,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 { @@ -124785,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 @@ -124795,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 } } @@ -124818,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) @@ -124843,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) @@ -124886,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 } @@ -124902,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 } @@ -124930,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))) } @@ -124985,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 @@ -125025,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 @@ -125033,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: @@ -125057,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) { @@ -125084,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++ @@ -125096,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: @@ -125123,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))) { @@ -125141,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 { @@ -125153,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++ } @@ -125217,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 @@ -125234,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 @@ -125246,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 } } } @@ -125275,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 { @@ -125289,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 } } } @@ -125338,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 } @@ -125362,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 @@ -125385,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))) { @@ -125399,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))) @@ -125409,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)) } } @@ -125437,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)) } } @@ -125493,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))) } } @@ -125530,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 @@ -125635,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 } @@ -125655,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 { @@ -125688,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, @@ -125696,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)) } @@ -125745,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 @@ -125755,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)) } @@ -125808,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 } } @@ -125828,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))) } @@ -125919,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) @@ -125951,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) } @@ -125983,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: @@ -126053,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 } @@ -126107,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)))) == '?' { @@ -126123,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 }())) @@ -126148,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) } } @@ -126207,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 } @@ -126323,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 { @@ -126340,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 @@ -126377,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 || @@ -126476,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 } @@ -126569,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) @@ -126577,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)) } } } @@ -126598,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, @@ -126628,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))) @@ -126644,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 { @@ -126661,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 { @@ -126678,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))) @@ -126698,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) @@ -126730,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 } @@ -126828,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 { @@ -126844,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)) @@ -126860,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) @@ -126894,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 { @@ -126924,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))) { @@ -126941,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) @@ -126971,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 @@ -126985,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) @@ -127014,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 @@ -127032,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 }())) } } @@ -127045,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) @@ -127056,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) } } @@ -127122,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) } } @@ -127149,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++ @@ -127166,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 { @@ -127179,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 } @@ -127280,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)) } } @@ -127297,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)) } } @@ -127317,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 @@ -127335,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 { @@ -127630,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 @@ -127655,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 @@ -127700,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))))) @@ -130511,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 { @@ -130553,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)) @@ -130614,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) } } @@ -130688,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 { @@ -130756,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) } @@ -130768,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 @@ -131120,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: ; @@ -131288,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 } } @@ -131373,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 { @@ -131421,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 { @@ -131432,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)) @@ -131460,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 } @@ -131495,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))) } @@ -131748,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 { @@ -131764,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)) } } } @@ -131837,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)) @@ -131873,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 @@ -131886,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 } @@ -131899,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 } @@ -131962,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)) } } @@ -132483,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) @@ -133217,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 @@ -133505,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 @@ -133692,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 } @@ -133760,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 } @@ -133919,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) { @@ -133942,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 } @@ -134266,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}))}, } @@ -134683,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) @@ -134823,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 @@ -134850,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 } @@ -134868,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 } @@ -134881,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))) @@ -134890,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++ { @@ -134909,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, @@ -134924,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 } @@ -134939,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) @@ -134949,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') @@ -134959,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 } @@ -135020,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 } } @@ -135045,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)) } } } @@ -135089,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 } @@ -135122,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 { @@ -135131,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 { @@ -135159,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 { @@ -135215,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) @@ -135336,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) @@ -135346,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) @@ -135356,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) @@ -135369,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) @@ -135379,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) @@ -135395,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) @@ -135418,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 @@ -135440,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 @@ -135454,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)) } } @@ -135552,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 } } @@ -135565,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 @@ -137345,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)) } } @@ -137363,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') @@ -137450,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) } @@ -137531,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) } @@ -137701,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) @@ -138649,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 { @@ -138728,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 @@ -138753,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 @@ -138776,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 { @@ -139015,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) } @@ -139088,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)) } } @@ -140214,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 @@ -141407,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)) @@ -141573,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) @@ -141604,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) @@ -141680,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))) } @@ -141723,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 { @@ -141735,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)) } @@ -141855,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}))) @@ -142254,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 @@ -142270,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) } { @@ -142451,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 } @@ -142575,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 @@ -142584,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})) } @@ -142616,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 } } @@ -142670,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 } @@ -142741,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) } @@ -142757,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 { @@ -143016,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))) @@ -143130,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))) { @@ -143289,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))) @@ -143296,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)) @@ -143567,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 } @@ -143598,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))) } @@ -143613,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) @@ -143927,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 @@ -143959,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) } @@ -143991,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 @@ -144055,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 } @@ -144091,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, @@ -144122,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 } } @@ -144154,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) } } @@ -144217,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: ; @@ -144260,7 +145082,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1527 + zText = ts + 1547 __14: ; iCol = 0 @@ -144434,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: @@ -144555,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))) } } } @@ -144579,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 { @@ -144658,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))) @@ -144671,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 { @@ -145306,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 { @@ -145550,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 @@ -145569,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, @@ -145616,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 } @@ -145625,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 { @@ -145639,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 { @@ -145663,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) } @@ -145681,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)) } @@ -145742,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) @@ -145819,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))) } } } @@ -145854,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 @@ -145877,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)) } } @@ -145889,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)) } @@ -145908,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))) } @@ -145955,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) } } @@ -146181,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)) } @@ -146194,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 } @@ -146370,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 @@ -146552,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 } @@ -146754,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 @@ -146971,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{}))) @@ -146983,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)) } } @@ -146994,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 } @@ -147281,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)) @@ -147423,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 } @@ -147431,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 } @@ -147443,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 } @@ -147451,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 } @@ -147459,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 } @@ -147471,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 } @@ -147491,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 } @@ -147503,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 } @@ -147511,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 } @@ -147523,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 } @@ -147531,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 } @@ -147539,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 } @@ -147555,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 } @@ -147587,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 } } @@ -147732,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 } @@ -147749,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 } @@ -147771,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 } @@ -147779,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 } } @@ -147796,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 @@ -147810,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 @@ -147966,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 { @@ -148146,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 @@ -149304,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) @@ -149337,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 @@ -149482,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)) @@ -149510,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 { @@ -149794,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) @@ -149905,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{ @@ -149927,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() { @@ -150468,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 @@ -150778,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 @@ -150844,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 @@ -150864,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 @@ -150885,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 ef10ae4b..77fd9810 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 -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-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) + 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), 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) } @@ -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) } @@ -17977,7 +18146,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18456,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18323,6 +18513,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*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 -__23: - ; 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - 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 - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+144, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+144, Bft(1), 7, 0x80) + goto __4 + +__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 + +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + 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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46750,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46466,18 +46796,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46850,17 +47180,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46868,10 +47187,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46879,11 +47198,10 @@ __350: ; goto __8 -__67: +__66: 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 !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46891,16 +47209,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 40 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 40 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 116)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 300)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 300)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 300)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 300)) < 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 300)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 300)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 300)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 300)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 300)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 300)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 300)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 484)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 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) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 36)), bp+484) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 484)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: + ; +__735: + ; +__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 @@ -49638,222 +50009,222 @@ __120: *(*U32)(unsafe.Pointer(p + 156 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+500) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+500) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) - - if !(*(*int32)(unsafe.Pointer(bp + 500)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 156 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*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 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 500)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+500) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+500) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 536)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 500))) + + if !(*(*int32)(unsafe.Pointer(bp + 500)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 568)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+568) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 568)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+568) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59039,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __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 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73677,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 524)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91112,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 20 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 20 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+488, *(*int32)(unsafe.Pointer(pE + 36))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 760)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+84, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+76, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*68, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112844,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 @@ -113115,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 } @@ -113188,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: @@ -113238,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 } @@ -113386,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) @@ -113416,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 { @@ -113431,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 } @@ -113527,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 @@ -113538,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++ { @@ -113549,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) @@ -113622,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 } @@ -113656,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 { @@ -113799,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) @@ -113844,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 { @@ -113961,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) } @@ -113977,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 @@ -113986,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 } @@ -114194,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) @@ -114287,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 { @@ -114357,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 @@ -114367,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 @@ -114399,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 @@ -114536,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 @@ -114581,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 @@ -114689,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 @@ -114700,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 } @@ -114718,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) { @@ -114748,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: @@ -114756,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 @@ -114796,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: ; @@ -114819,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}, {}, } @@ -114942,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) @@ -114961,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 @@ -114973,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) { @@ -114990,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) @@ -115007,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)))) @@ -115041,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) @@ -115148,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)) @@ -115251,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 @@ -115376,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: ; @@ -115423,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)))) @@ -115500,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) @@ -116076,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) @@ -116109,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 @@ -116120,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 @@ -116194,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) @@ -116289,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 } } @@ -116371,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) { @@ -116524,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: @@ -116550,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 } @@ -116579,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) } @@ -116637,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 } @@ -117194,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)) @@ -117305,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) @@ -117611,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) @@ -117626,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 { @@ -117680,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) @@ -117785,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)) } @@ -117830,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 { @@ -117946,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 } @@ -118048,7 +118834,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118123,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: @@ -118258,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)) } @@ -118355,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)) } @@ -118399,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) { @@ -118530,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) { @@ -118549,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 @@ -118645,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) } @@ -118669,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 @@ -118785,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 } @@ -118880,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 { @@ -118917,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 { @@ -119171,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) } @@ -119386,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)) @@ -120084,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 } @@ -120296,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 } @@ -121425,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 { @@ -121437,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)) } } @@ -121483,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 @@ -121668,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)) @@ -121691,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 { @@ -121739,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{ @@ -121782,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) { @@ -121823,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 { @@ -121835,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 @@ -121843,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 @@ -121869,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 { @@ -121905,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 @@ -121913,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)) } } @@ -121967,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: ; @@ -122001,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: @@ -122013,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) { @@ -122036,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 @@ -122047,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: @@ -122097,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: ; @@ -122114,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: ; @@ -122132,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) @@ -122170,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}))) @@ -122187,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 { @@ -122263,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 @@ -122287,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)) } @@ -122306,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)) } } @@ -122320,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) { @@ -122336,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)) } } @@ -122376,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 { @@ -122396,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)) } } } @@ -122413,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 } @@ -122428,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++ { @@ -122457,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) @@ -122486,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) @@ -122500,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) } @@ -122519,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) @@ -122528,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 } @@ -122543,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) @@ -122551,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))) } @@ -122561,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) @@ -122929,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) } @@ -122953,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) } @@ -123869,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 @@ -123878,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++ @@ -123886,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 @@ -123897,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: @@ -123922,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: ; @@ -124111,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 @@ -124121,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 @@ -124129,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 @@ -124241,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 @@ -124371,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})) @@ -124443,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 } @@ -124455,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 @@ -124483,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) @@ -124556,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}))) } } } @@ -124620,6 +125406,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124869,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 } @@ -124880,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}))) } @@ -124893,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 @@ -124905,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 } @@ -124981,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 { @@ -125045,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++ { } @@ -125066,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 @@ -125173,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))) } } @@ -125191,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 } @@ -125209,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 } @@ -125227,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 } @@ -125250,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 } @@ -125296,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 @@ -125311,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 { @@ -125351,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 @@ -125361,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 } } @@ -125384,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) @@ -125409,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) @@ -125452,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 } @@ -125468,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 } @@ -125496,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))) } @@ -125551,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 @@ -125591,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 @@ -125599,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: @@ -125623,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) { @@ -125650,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++ @@ -125662,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: @@ -125689,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))) { @@ -125707,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 { @@ -125719,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++ } @@ -125783,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 @@ -125800,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 @@ -125812,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 } } } @@ -125841,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 { @@ -125855,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 } } } @@ -125904,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 } @@ -125928,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 @@ -125951,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))) { @@ -125965,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))) @@ -125975,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)) } } @@ -126003,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)) } } @@ -126059,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))) } } @@ -126096,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 @@ -126201,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 } @@ -126221,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 { @@ -126254,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, @@ -126262,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)) } @@ -126311,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 @@ -126321,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)) } @@ -126374,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 } } @@ -126394,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))) } @@ -126485,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) @@ -126517,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) } @@ -126549,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: @@ -126619,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 } @@ -126673,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)))) == '?' { @@ -126689,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 }())) @@ -126714,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) } } @@ -126773,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 } @@ -126889,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 { @@ -126906,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 @@ -126943,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 || @@ -127042,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 } @@ -127135,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) @@ -127143,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)) } } } @@ -127164,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, @@ -127194,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))) @@ -127210,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 { @@ -127227,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 { @@ -127244,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))) @@ -127264,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) @@ -127296,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 } @@ -127394,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 { @@ -127410,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)) @@ -127426,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) @@ -127460,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 { @@ -127490,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))) { @@ -127507,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) @@ -127537,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 @@ -127551,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) @@ -127580,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 @@ -127598,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 }())) } } @@ -127611,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) @@ -127622,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) } } @@ -127688,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) } } @@ -127715,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++ @@ -127732,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 { @@ -127745,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 } @@ -127846,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)) } } @@ -127863,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)) } } @@ -127883,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 @@ -127901,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 { @@ -128196,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 @@ -128221,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 @@ -128266,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))))) @@ -131072,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 { @@ -131114,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)) @@ -131175,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) } } @@ -131249,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 { @@ -131317,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) } @@ -131329,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 @@ -131681,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: ; @@ -131847,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 } } @@ -131932,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 { @@ -131980,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 { @@ -131991,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)) @@ -132019,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 } @@ -132054,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))) } @@ -132307,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 { @@ -132323,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)) } } } @@ -132396,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)) @@ -132432,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 @@ -132445,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 } @@ -132458,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 } @@ -132521,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)) } } @@ -133042,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) @@ -133760,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 @@ -134048,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 @@ -134233,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 } @@ -134301,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 } @@ -134459,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) { @@ -134482,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 } @@ -134805,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}))}, } @@ -135222,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) @@ -135361,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 @@ -135388,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 } @@ -135406,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 } @@ -135419,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) @@ -135428,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++ { @@ -135447,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, @@ -135462,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 } @@ -135477,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) @@ -135487,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') @@ -135497,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 } @@ -135558,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 } } @@ -135583,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)) } } } @@ -135627,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 } @@ -135660,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 { @@ -135669,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 { @@ -135697,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 { @@ -135753,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) @@ -135874,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) @@ -135884,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) @@ -135894,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) @@ -135907,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) @@ -135917,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) @@ -135933,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) @@ -135956,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 @@ -135978,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 @@ -135992,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)) } } @@ -136090,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 } } @@ -136103,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 @@ -137882,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)) } } @@ -137900,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') @@ -137987,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) } @@ -138068,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) } @@ -138238,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) @@ -139183,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 { @@ -139262,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 @@ -139287,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 @@ -139310,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 { @@ -139549,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) } @@ -139622,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)) } } @@ -140748,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 @@ -141940,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)) @@ -142106,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) @@ -142137,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) @@ -142213,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))) } @@ -142256,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 { @@ -142268,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)) } @@ -142388,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}))) @@ -142787,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 @@ -142803,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) } { @@ -142983,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 } @@ -143107,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 @@ -143116,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})) } @@ -143148,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 } } @@ -143202,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 } @@ -143273,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) } @@ -143289,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 { @@ -143548,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))) @@ -143662,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))) { @@ -143821,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))) @@ -143828,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)) @@ -144096,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 } @@ -144127,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))) } @@ -144142,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) @@ -144456,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 @@ -144488,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) } @@ -144520,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 @@ -144584,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 } @@ -144620,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, @@ -144651,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 } } @@ -144683,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) } } @@ -144746,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: ; @@ -144789,7 +145610,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -144963,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: @@ -145084,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))) } } } @@ -145108,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 { @@ -145187,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))) @@ -145200,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 { @@ -145835,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 { @@ -146079,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 @@ -146098,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, @@ -146145,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 } @@ -146154,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 { @@ -146168,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 { @@ -146192,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) } @@ -146210,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)) } @@ -146271,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) @@ -146348,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))) } } } @@ -146383,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 @@ -146406,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)) } } @@ -146418,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)) } @@ -146437,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))) } @@ -146484,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) } } @@ -146710,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)) } @@ -146723,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 } @@ -146899,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 @@ -147081,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 } @@ -147283,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 @@ -147499,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{}))) @@ -147511,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)) } } @@ -147522,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 } @@ -147809,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)) @@ -147949,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 } @@ -147957,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 } @@ -147969,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 } @@ -147977,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 } @@ -147985,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 } @@ -147997,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 } @@ -148017,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 } @@ -148029,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 } @@ -148037,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 } @@ -148049,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 } @@ -148057,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 } @@ -148065,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 } @@ -148081,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 } @@ -148113,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 } } @@ -148258,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 } @@ -148275,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 } @@ -148297,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 } @@ -148305,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 } } @@ -148322,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 @@ -148336,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 @@ -148492,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 { @@ -148672,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 @@ -149826,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) @@ -149859,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 @@ -150004,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)) @@ -150032,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 { @@ -150316,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) @@ -150427,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{ @@ -150449,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() { @@ -150993,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 @@ -151303,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 @@ -151369,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 @@ -151389,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 @@ -151410,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 f04aec3c..e4775c89 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -18065,7 +18235,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18548,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18414,6 +18605,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46852,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46567,18 +46898,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46951,17 +47282,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46969,10 +47289,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46980,11 +47300,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46992,16 +47311,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49739,222 +50111,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59148,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73787,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91226,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112969,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 @@ -113240,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 } @@ -113313,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: @@ -113363,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 } @@ -113511,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) @@ -113541,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 { @@ -113556,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 } @@ -113652,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 @@ -113663,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++ { @@ -113674,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) @@ -113747,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 } @@ -113781,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 { @@ -113924,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) @@ -113969,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 { @@ -114086,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) } @@ -114102,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 @@ -114111,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 } @@ -114319,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) @@ -114412,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 { @@ -114482,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 @@ -114492,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 @@ -114524,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 @@ -114661,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 @@ -114706,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 @@ -114814,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 @@ -114825,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 } @@ -114843,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) { @@ -114873,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: @@ -114881,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 @@ -114921,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: ; @@ -114945,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}, {}, } @@ -115068,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) @@ -115087,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 @@ -115099,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) { @@ -115116,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) @@ -115133,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)))) @@ -115167,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) @@ -115274,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)) @@ -115377,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 @@ -115502,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: ; @@ -115549,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)))) @@ -115626,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) @@ -116202,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) @@ -116235,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 @@ -116246,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 @@ -116320,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) @@ -116415,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 } } @@ -116498,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) { @@ -116651,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: @@ -116677,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 } @@ -116706,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) } @@ -116764,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 } @@ -117321,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)) @@ -117432,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) @@ -117738,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) @@ -117753,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 { @@ -117807,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) @@ -117912,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)) } @@ -117957,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 { @@ -118073,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 } @@ -118175,7 +118962,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118250,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: @@ -118385,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)) } @@ -118482,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)) } @@ -118526,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) { @@ -118657,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) { @@ -118676,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 @@ -118772,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) } @@ -118796,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 @@ -118912,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 } @@ -119007,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 { @@ -119044,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 { @@ -119305,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) } @@ -119520,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)) @@ -120218,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 } @@ -120430,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 } @@ -121559,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 { @@ -121571,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)) } } @@ -121617,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 @@ -121802,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)) @@ -121825,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 { @@ -121873,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{ @@ -121916,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) { @@ -121957,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 { @@ -121969,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 @@ -121977,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 @@ -122003,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 { @@ -122039,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 @@ -122047,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)) } } @@ -122101,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: ; @@ -122135,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: @@ -122147,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) { @@ -122170,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 @@ -122181,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: @@ -122231,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: ; @@ -122248,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: ; @@ -122266,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) @@ -122304,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}))) @@ -122321,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 { @@ -122399,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 @@ -122423,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)) } @@ -122442,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)) } } @@ -122456,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) { @@ -122472,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)) } } @@ -122512,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 { @@ -122532,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)) } } } @@ -122549,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 } @@ -122564,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++ { @@ -122593,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) @@ -122622,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) @@ -122636,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) } @@ -122655,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) @@ -122664,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 } @@ -122679,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) @@ -122687,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))) } @@ -122697,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) @@ -123066,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) } @@ -123090,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) } @@ -124008,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 @@ -124017,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++ @@ -124025,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 @@ -124036,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: @@ -124061,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: ; @@ -124250,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 @@ -124260,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 @@ -124268,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 @@ -124380,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 @@ -124510,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})) @@ -124582,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 } @@ -124594,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 @@ -124622,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) @@ -124695,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}))) } } } @@ -124762,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 @@ -125020,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 } @@ -125031,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}))) } @@ -125044,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 @@ -125056,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 } @@ -125132,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 { @@ -125196,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++ { } @@ -125217,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 @@ -125324,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))) } } @@ -125342,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 } @@ -125360,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 } @@ -125378,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 } @@ -125401,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 } @@ -125447,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 @@ -125462,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 { @@ -125502,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 @@ -125512,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 } } @@ -125535,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) @@ -125560,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) @@ -125603,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 } @@ -125619,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 } @@ -125647,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))) } @@ -125702,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 @@ -125742,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 @@ -125750,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: @@ -125774,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) { @@ -125801,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++ @@ -125813,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: @@ -125840,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))) { @@ -125858,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 { @@ -125870,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++ } @@ -125934,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 @@ -125951,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 @@ -125963,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 } } } @@ -125992,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 { @@ -126006,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 } } } @@ -126055,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 } @@ -126079,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 @@ -126102,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))) { @@ -126116,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))) @@ -126126,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)) } } @@ -126154,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)) } } @@ -126210,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))) } } @@ -126247,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 @@ -126352,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 } @@ -126372,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 { @@ -126405,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, @@ -126413,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)) } @@ -126462,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 @@ -126472,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)) } @@ -126525,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 } } @@ -126545,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))) } @@ -126636,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) @@ -126668,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) } @@ -126700,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: @@ -126770,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 } @@ -126824,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)))) == '?' { @@ -126840,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 }())) @@ -126865,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) } } @@ -126924,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 } @@ -127040,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 { @@ -127057,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 @@ -127094,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 || @@ -127193,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 } @@ -127286,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) @@ -127294,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)) } } } @@ -127315,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, @@ -127345,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))) @@ -127361,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 { @@ -127378,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 { @@ -127395,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))) @@ -127415,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) @@ -127447,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 } @@ -127545,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 { @@ -127561,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)) @@ -127577,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) @@ -127611,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 { @@ -127641,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))) { @@ -127658,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) @@ -127688,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 @@ -127702,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) @@ -127731,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 @@ -127749,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 }())) } } @@ -127762,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) @@ -127773,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) } } @@ -127839,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) } } @@ -127866,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++ @@ -127883,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 { @@ -127896,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 } @@ -127997,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)) } } @@ -128014,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)) } } @@ -128034,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 @@ -128052,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 { @@ -128347,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 @@ -128372,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 @@ -128417,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))))) @@ -131228,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 { @@ -131270,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)) @@ -131331,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) } } @@ -131405,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 { @@ -131473,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) } @@ -131485,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 @@ -131837,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: ; @@ -132005,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 } } @@ -132090,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 { @@ -132138,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 { @@ -132149,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)) @@ -132177,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 } @@ -132212,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))) } @@ -132465,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 { @@ -132481,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)) } } } @@ -132554,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)) @@ -132590,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 @@ -132603,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 } @@ -132616,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 } @@ -132679,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)) } } @@ -133200,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) @@ -133934,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 @@ -134222,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 @@ -134409,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 } @@ -134477,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 } @@ -134636,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) { @@ -134659,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 } @@ -134983,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}))}, } @@ -135400,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) @@ -135540,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 @@ -135567,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 } @@ -135585,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 } @@ -135598,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))) @@ -135607,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++ { @@ -135626,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, @@ -135641,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 } @@ -135656,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) @@ -135666,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') @@ -135676,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 } @@ -135737,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 } } @@ -135762,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)) } } } @@ -135806,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 } @@ -135839,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 { @@ -135848,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 { @@ -135876,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 { @@ -135932,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) @@ -136053,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) @@ -136063,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) @@ -136073,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) @@ -136086,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) @@ -136096,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) @@ -136112,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) @@ -136135,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 @@ -136157,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 @@ -136171,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)) } } @@ -136269,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 } } @@ -136282,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 @@ -138062,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)) } } @@ -138080,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') @@ -138167,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) } @@ -138248,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) } @@ -138418,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) @@ -139366,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 { @@ -139445,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 @@ -139470,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 @@ -139493,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 { @@ -139732,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) } @@ -139805,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)) } } @@ -140931,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 @@ -142124,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)) @@ -142290,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) @@ -142321,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) @@ -142397,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))) } @@ -142440,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 { @@ -142452,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)) } @@ -142572,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}))) @@ -142971,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 @@ -142987,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) } { @@ -143168,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 } @@ -143292,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 @@ -143301,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})) } @@ -143333,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 } } @@ -143387,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 } @@ -143458,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) } @@ -143474,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 { @@ -143733,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))) @@ -143847,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))) { @@ -144006,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))) @@ -144013,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)) @@ -144284,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 } @@ -144315,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))) } @@ -144330,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) @@ -144644,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 @@ -144676,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) } @@ -144708,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 @@ -144772,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 } @@ -144808,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, @@ -144839,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 } } @@ -144871,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) } } @@ -144934,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: ; @@ -144977,7 +145799,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145151,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: @@ -145272,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))) } } } @@ -145296,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 { @@ -145375,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))) @@ -145388,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 { @@ -146023,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 { @@ -146267,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 @@ -146286,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, @@ -146333,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 } @@ -146342,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 { @@ -146356,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 { @@ -146380,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) } @@ -146398,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)) } @@ -146459,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) @@ -146536,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))) } } } @@ -146571,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 @@ -146594,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)) } } @@ -146606,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)) } @@ -146625,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))) } @@ -146672,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) } } @@ -146898,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)) } @@ -146911,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 } @@ -147087,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 @@ -147269,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 } @@ -147471,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 @@ -147688,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{}))) @@ -147700,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)) } } @@ -147711,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 } @@ -147998,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)) @@ -148140,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 } @@ -148148,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 } @@ -148160,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 } @@ -148168,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 } @@ -148176,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 } @@ -148188,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 } @@ -148208,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 } @@ -148220,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 } @@ -148228,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 } @@ -148240,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 } @@ -148248,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 } @@ -148256,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 } @@ -148272,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 } @@ -148304,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 } } @@ -148449,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 } @@ -148466,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 } @@ -148488,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 } @@ -148496,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 } } @@ -148513,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 @@ -148527,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 @@ -148683,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 { @@ -148863,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 @@ -150021,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) @@ -150054,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 @@ -150199,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)) @@ -150227,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 { @@ -150511,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) @@ -150622,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{ @@ -150644,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() { @@ -151188,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 @@ -151498,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 @@ -151564,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 @@ -151584,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 @@ -151605,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 0751b56d..f98a2145 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 -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-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) + 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(*(*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), 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) } @@ -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) } @@ -17983,7 +18151,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18461,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18329,6 +18518,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*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 -__23: - ; 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - 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 - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 20 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 7, 0x80) + goto __4 + +__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 + +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*20)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + 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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46758,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46475,18 +46804,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46859,17 +47188,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46877,10 +47195,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46888,11 +47206,10 @@ __350: ; goto __8 -__67: +__66: 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 !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -46900,16 +47217,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 36)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+76) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+76) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 40 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 40 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 120)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint32((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*16)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 304)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 304)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 304)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 304)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 304)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 304)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 304)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 304)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 520)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 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) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 36)), bp+520) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 36))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) +__737: + ; +__735: + ; +__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 @@ -49647,222 +50017,222 @@ __120: *(*U32)(unsafe.Pointer(p + 164 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+536) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 36)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) - - if !(*(*int32)(unsafe.Pointer(bp + 536)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 164 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*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 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+536) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 36)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 616)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536))) + + if !(*(*int32)(unsafe.Pointer(bp + 536)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 624)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 36)), bp+624) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 36)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 616)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 624)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+624) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*20)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59055,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __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 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*16)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73695,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 40 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 40 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 528)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, (int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSql))/1, uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91130,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 116)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 20 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 16 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 20 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 36 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(uint32(unsafe.Sizeof(SrcList{}))+uint32(nNotReady)*uint32(unsafe.Sizeof(SrcItem{})))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*48)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+504, *(*int32)(unsafe.Pointer(pE + 36))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+496, *(*int32)(unsafe.Pointer(pE + 36))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 768)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 140)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+88, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+80, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*72, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112870,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 @@ -113141,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 } @@ -113214,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: @@ -113264,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 } @@ -113412,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) @@ -113442,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 { @@ -113457,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 } @@ -113553,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 @@ -113564,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++ { @@ -113575,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) @@ -113648,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 } @@ -113682,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 { @@ -113825,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) @@ -113870,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 { @@ -113987,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) } @@ -114003,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 @@ -114012,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 } @@ -114220,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) @@ -114313,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 { @@ -114383,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 @@ -114393,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 @@ -114425,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 @@ -114562,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 @@ -114607,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 @@ -114715,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 @@ -114726,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 } @@ -114744,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) { @@ -114774,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: @@ -114782,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 @@ -114822,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: ; @@ -114845,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}, {}, } @@ -114968,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) @@ -114987,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 @@ -114999,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) { @@ -115016,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) @@ -115033,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)))) @@ -115067,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) @@ -115174,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)) @@ -115277,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 @@ -115402,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: ; @@ -115449,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)))) @@ -115526,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) @@ -116102,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) @@ -116220,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) @@ -116397,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) { @@ -116550,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: @@ -116576,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 } @@ -116605,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) } @@ -116663,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 } @@ -117220,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)) @@ -117331,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) @@ -117637,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) @@ -117652,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 { @@ -117706,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) @@ -117811,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)) } @@ -117856,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 { @@ -117972,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 } @@ -118074,7 +118859,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118149,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: @@ -118284,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)) } @@ -118381,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)) } @@ -118425,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) { @@ -118556,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) { @@ -118575,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 @@ -118671,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) } @@ -118695,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 @@ -118811,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 } @@ -118906,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 { @@ -118943,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 { @@ -119201,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) } @@ -119416,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)) @@ -120114,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 } @@ -120326,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 } @@ -121455,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 { @@ -121467,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)) } } @@ -121513,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 @@ -121698,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)) @@ -121721,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 { @@ -121769,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{ @@ -121812,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) { @@ -121853,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 { @@ -121865,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 @@ -121873,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 @@ -121899,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 { @@ -121935,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 @@ -121943,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)) } } @@ -121997,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: ; @@ -122031,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: @@ -122043,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) { @@ -122066,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 @@ -122077,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: @@ -122127,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: ; @@ -122144,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: ; @@ -122162,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) @@ -122200,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}))) @@ -122217,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 { @@ -122293,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 @@ -122317,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)) } @@ -122336,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)) } } @@ -122350,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) { @@ -122366,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)) } } @@ -122406,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 { @@ -122426,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)) } } } @@ -122443,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 } @@ -122458,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++ { @@ -122487,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) @@ -122516,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) @@ -122530,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) } @@ -122549,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) @@ -122558,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 } @@ -122573,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) @@ -122581,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))) } @@ -122591,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) @@ -122959,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) } @@ -122983,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) } @@ -123900,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 @@ -123909,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++ @@ -123917,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 @@ -123928,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: @@ -123953,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: ; @@ -124142,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 @@ -124152,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 @@ -124160,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 @@ -124272,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 @@ -124402,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})) @@ -124474,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 } @@ -124486,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 @@ -124514,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) @@ -124587,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}))) } } } @@ -124651,6 +125436,8 @@ type sqlite3rbu = struct { FnPagePerSector int32 FiOalSz I64 FnPhaseOneStep I64 + FpRenameArg uintptr + FxRename uintptr FiMaxFrame U32 FmLock U32 FnFrame int32 @@ -124903,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 } @@ -124914,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}))) } @@ -124927,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 @@ -124939,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 } @@ -125015,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 { @@ -125079,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++ { } @@ -125100,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 @@ -125207,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))) } } @@ -125225,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 } @@ -125243,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 } @@ -125261,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 } @@ -125284,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 } @@ -125330,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 @@ -125345,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 { @@ -125385,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 @@ -125395,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 } } @@ -125418,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) @@ -125443,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) @@ -125486,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 } @@ -125502,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 } @@ -125530,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))) } @@ -125585,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 @@ -125625,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 @@ -125633,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: @@ -125657,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) { @@ -125684,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++ @@ -125696,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: @@ -125723,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))) { @@ -125741,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 { @@ -125753,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++ } @@ -125817,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 @@ -125834,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 @@ -125846,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 } } } @@ -125875,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 { @@ -125889,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 } } } @@ -125938,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 } @@ -125962,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 @@ -125985,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))) { @@ -125999,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))) @@ -126009,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)) } } @@ -126037,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)) } } @@ -126093,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))) } } @@ -126130,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 @@ -126235,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 } @@ -126255,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 { @@ -126288,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, @@ -126296,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)) } @@ -126345,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 @@ -126355,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)) } @@ -126408,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 } } @@ -126428,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))) } @@ -126519,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) @@ -126551,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) } @@ -126583,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: @@ -126653,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 } @@ -126707,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)))) == '?' { @@ -126723,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 }())) @@ -126748,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) } } @@ -126807,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 } @@ -126923,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 { @@ -126940,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 @@ -126977,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 || @@ -127076,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 } @@ -127169,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) @@ -127177,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)) } } } @@ -127198,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, @@ -127228,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))) @@ -127244,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 { @@ -127261,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 { @@ -127278,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))) @@ -127298,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) @@ -127330,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 } @@ -127428,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 { @@ -127444,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)) @@ -127460,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) @@ -127494,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 { @@ -127524,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))) { @@ -127541,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) @@ -127571,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 @@ -127585,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) @@ -127614,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 @@ -127632,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 }())) } } @@ -127645,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) @@ -127656,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) } } @@ -127722,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) } } @@ -127749,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++ @@ -127766,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 { @@ -127779,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 } @@ -127880,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)) } } @@ -127897,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)) } } @@ -127917,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 @@ -127935,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 { @@ -128230,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 @@ -128255,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 @@ -128300,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))))) @@ -131106,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 { @@ -131148,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)) @@ -131209,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) } } @@ -131283,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 { @@ -131351,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) } @@ -131363,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 @@ -131715,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: ; @@ -131881,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 } } @@ -131966,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 { @@ -132014,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 { @@ -132025,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)) @@ -132053,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 } @@ -132088,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))) } @@ -132341,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 { @@ -132357,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)) } } } @@ -132430,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)) @@ -132466,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 @@ -132479,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 } @@ -132492,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 } @@ -132555,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)) } } @@ -133076,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) @@ -133799,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 @@ -134087,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 @@ -134272,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 } @@ -134340,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 } @@ -134498,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) { @@ -134521,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 } @@ -134845,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}))}, } @@ -135262,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) @@ -135401,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 @@ -135428,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 } @@ -135446,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 } @@ -135459,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) @@ -135468,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++ { @@ -135487,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, @@ -135502,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 } @@ -135517,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) @@ -135527,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') @@ -135537,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 } @@ -135598,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 } } @@ -135623,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)) } } } @@ -135667,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 } @@ -135700,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 { @@ -135709,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 { @@ -135737,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 { @@ -135793,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) @@ -135914,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) @@ -135924,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) @@ -135934,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) @@ -135947,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) @@ -135957,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) @@ -135973,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) @@ -135996,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 @@ -136018,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 @@ -136032,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)) } } @@ -136130,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 } } @@ -136143,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 @@ -137924,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)) } } @@ -137942,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') @@ -138029,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) } @@ -138110,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) } @@ -138280,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) @@ -139234,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 { @@ -139313,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 @@ -139338,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 @@ -139361,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 { @@ -139600,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) } @@ -139673,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)) } } @@ -140799,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 @@ -141991,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)) @@ -142157,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) @@ -142188,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) @@ -142264,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))) } @@ -142307,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 { @@ -142319,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)) } @@ -142439,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}))) @@ -142839,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 @@ -142855,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) } { @@ -143036,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 } @@ -143160,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 @@ -143169,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})) } @@ -143201,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 } } @@ -143255,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 } @@ -143326,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) } @@ -143342,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 { @@ -143601,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))) @@ -143715,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))) { @@ -143874,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))) @@ -143881,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)) @@ -144152,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 } @@ -144183,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))) } @@ -144198,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) @@ -144512,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 @@ -144544,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) } @@ -144576,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 @@ -144640,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 } @@ -144676,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, @@ -144707,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 } } @@ -144739,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) } } @@ -144802,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: ; @@ -144845,7 +145665,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145019,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: @@ -145140,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))) } } } @@ -145164,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 { @@ -145243,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))) @@ -145256,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 { @@ -145891,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 { @@ -146135,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 @@ -146154,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, @@ -146201,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 } @@ -146210,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 { @@ -146224,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 { @@ -146248,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) } @@ -146266,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)) } @@ -146327,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) @@ -146404,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))) } } } @@ -146439,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 @@ -146462,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)) } } @@ -146474,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)) } @@ -146493,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))) } @@ -146540,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) } } @@ -146766,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)) } @@ -146779,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 } @@ -146955,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 @@ -147137,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 } @@ -147339,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 @@ -147555,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{}))) @@ -147567,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)) } } @@ -147578,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 } @@ -147865,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)) @@ -148005,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 } @@ -148013,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 } @@ -148025,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 } @@ -148033,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 } @@ -148041,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 } @@ -148053,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 } @@ -148073,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 } @@ -148085,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 } @@ -148093,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 } @@ -148105,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 } @@ -148113,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 } @@ -148121,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 } @@ -148137,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 } @@ -148169,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 } } @@ -148314,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 } @@ -148331,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 } @@ -148353,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 } @@ -148361,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 } } @@ -148378,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 @@ -148392,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 @@ -148548,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 { @@ -148728,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 @@ -149885,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) @@ -149918,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 @@ -150063,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)) @@ -150091,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 { @@ -150375,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) @@ -150486,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{ @@ -150508,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() { @@ -151052,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 @@ -151362,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 @@ -151428,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 @@ -151448,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 @@ -151469,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 b8e284dc..0d5307e6 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 -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-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) + 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(*(*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) } @@ -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) } @@ -18074,7 +18244,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18557,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18423,6 +18614,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46861,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46576,18 +46907,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -46960,17 +47291,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -46978,10 +47298,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -46989,11 +47309,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -47001,16 +47320,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49748,222 +50120,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59157,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73796,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91235,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -112978,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 @@ -113249,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 } @@ -113322,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: @@ -113372,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 } @@ -113520,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) @@ -113550,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 { @@ -113565,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 } @@ -113661,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 @@ -113672,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++ { @@ -113683,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) @@ -113756,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 } @@ -113790,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 { @@ -113933,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) @@ -113978,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 { @@ -114095,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) } @@ -114111,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 @@ -114120,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 } @@ -114328,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) @@ -114421,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 { @@ -114491,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 @@ -114501,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 @@ -114533,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 @@ -114670,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 @@ -114715,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 @@ -114823,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 @@ -114834,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 } @@ -114852,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) { @@ -114882,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: @@ -114890,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 @@ -114930,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: ; @@ -114954,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}, {}, } @@ -115077,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) @@ -115096,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 @@ -115108,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) { @@ -115125,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) @@ -115142,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)))) @@ -115176,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) @@ -115283,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)) @@ -115386,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 @@ -115511,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: ; @@ -115558,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)))) @@ -115635,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) @@ -116211,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) @@ -116244,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 @@ -116255,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 @@ -116329,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) @@ -116424,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 } } @@ -116507,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) { @@ -116660,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: @@ -116686,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 } @@ -116715,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) } @@ -116773,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 } @@ -117330,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)) @@ -117441,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) @@ -117747,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) @@ -117762,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 { @@ -117816,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) @@ -117921,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)) } @@ -117966,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 { @@ -118082,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 } @@ -118184,7 +118971,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118259,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: @@ -118394,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)) } @@ -118491,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)) } @@ -118535,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) { @@ -118666,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) { @@ -118685,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 @@ -118781,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) } @@ -118805,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 @@ -118921,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 } @@ -119016,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 { @@ -119053,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 { @@ -119314,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) } @@ -119529,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)) @@ -120227,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 } @@ -120439,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 } @@ -121568,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 { @@ -121580,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)) } } @@ -121626,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 @@ -121811,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)) @@ -121834,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 { @@ -121882,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{ @@ -121925,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) { @@ -121966,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 { @@ -121978,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 @@ -121986,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 @@ -122012,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 { @@ -122048,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 @@ -122056,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)) } } @@ -122110,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: ; @@ -122144,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: @@ -122156,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) { @@ -122179,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 @@ -122190,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: @@ -122240,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: ; @@ -122257,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: ; @@ -122275,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) @@ -122313,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}))) @@ -122330,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 { @@ -122408,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 @@ -122432,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)) } @@ -122451,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)) } } @@ -122465,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) { @@ -122481,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)) } } @@ -122521,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 { @@ -122541,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)) } } } @@ -122558,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 } @@ -122573,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++ { @@ -122602,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) @@ -122631,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) @@ -122645,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) } @@ -122664,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) @@ -122673,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 } @@ -122688,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) @@ -122696,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))) } @@ -122706,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) @@ -123075,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) } @@ -123099,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) } @@ -124017,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 @@ -124026,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++ @@ -124034,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 @@ -124045,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: @@ -124070,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: ; @@ -124259,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 @@ -124269,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 @@ -124277,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 @@ -124389,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 @@ -124519,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})) @@ -124591,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 } @@ -124603,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 @@ -124631,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) @@ -124704,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}))) } } } @@ -124771,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 @@ -125029,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 } @@ -125040,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}))) } @@ -125053,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 @@ -125065,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 } @@ -125141,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 { @@ -125205,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++ { } @@ -125226,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 @@ -125333,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))) } } @@ -125351,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 } @@ -125369,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 } @@ -125387,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 } @@ -125410,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 } @@ -125456,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 @@ -125471,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 { @@ -125511,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 @@ -125521,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 } } @@ -125544,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) @@ -125569,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) @@ -125612,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 } @@ -125628,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 } @@ -125656,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))) } @@ -125711,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 @@ -125751,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 @@ -125759,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: @@ -125783,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) { @@ -125810,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++ @@ -125822,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: @@ -125849,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))) { @@ -125867,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 { @@ -125879,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++ } @@ -125943,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 @@ -125960,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 @@ -125972,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 } } } @@ -126001,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 { @@ -126015,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 } } } @@ -126064,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 } @@ -126088,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 @@ -126111,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))) { @@ -126125,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))) @@ -126135,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)) } } @@ -126163,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)) } } @@ -126219,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))) } } @@ -126256,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 @@ -126361,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 } @@ -126381,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 { @@ -126414,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, @@ -126422,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)) } @@ -126471,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 @@ -126481,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)) } @@ -126534,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 } } @@ -126554,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))) } @@ -126645,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) @@ -126677,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) } @@ -126709,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: @@ -126779,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 } @@ -126833,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)))) == '?' { @@ -126849,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 }())) @@ -126874,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) } } @@ -126933,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 } @@ -127049,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 { @@ -127066,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 @@ -127103,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 || @@ -127202,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 } @@ -127295,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) @@ -127303,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)) } } } @@ -127324,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, @@ -127354,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))) @@ -127370,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 { @@ -127387,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 { @@ -127404,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))) @@ -127424,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) @@ -127456,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 } @@ -127554,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 { @@ -127570,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)) @@ -127586,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) @@ -127620,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 { @@ -127650,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))) { @@ -127667,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) @@ -127697,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 @@ -127711,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) @@ -127740,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 @@ -127758,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 }())) } } @@ -127771,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) @@ -127782,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) } } @@ -127848,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) } } @@ -127875,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++ @@ -127892,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 { @@ -127905,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 } @@ -128006,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)) } } @@ -128023,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)) } } @@ -128043,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 @@ -128061,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 { @@ -128356,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 @@ -128381,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 @@ -128426,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))))) @@ -131237,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 { @@ -131279,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)) @@ -131340,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) } } @@ -131414,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 { @@ -131482,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) } @@ -131494,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 @@ -131846,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: ; @@ -132014,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 } } @@ -132099,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 { @@ -132147,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 { @@ -132158,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)) @@ -132186,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 } @@ -132221,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))) } @@ -132474,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 { @@ -132490,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)) } } } @@ -132563,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)) @@ -132599,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 @@ -132612,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 } @@ -132625,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 } @@ -132688,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)) } } @@ -133209,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) @@ -133943,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 @@ -134231,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 @@ -134418,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 } @@ -134486,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 } @@ -134645,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) { @@ -134668,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 } @@ -134992,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}))}, } @@ -135409,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) @@ -135549,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 @@ -135576,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 } @@ -135594,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 } @@ -135607,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))) @@ -135616,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++ { @@ -135635,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, @@ -135650,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 } @@ -135665,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) @@ -135675,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') @@ -135685,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 } @@ -135746,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 } } @@ -135771,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)) } } } @@ -135815,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 } @@ -135848,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 { @@ -135857,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 { @@ -135885,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 { @@ -135941,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) @@ -136062,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) @@ -136072,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) @@ -136082,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) @@ -136095,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) @@ -136105,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) @@ -136121,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) @@ -136144,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 @@ -136166,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 @@ -136180,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)) } } @@ -136278,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 } } @@ -136291,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 @@ -138071,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)) } } @@ -138089,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') @@ -138176,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) } @@ -138257,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) } @@ -138427,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) @@ -139375,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 { @@ -139454,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 @@ -139479,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 @@ -139502,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 { @@ -139741,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) } @@ -139814,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)) } } @@ -140940,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 @@ -142133,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)) @@ -142299,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) @@ -142330,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) @@ -142406,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))) } @@ -142449,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 { @@ -142461,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)) } @@ -142581,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}))) @@ -142980,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 @@ -142996,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) } { @@ -143177,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 } @@ -143301,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 @@ -143310,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})) } @@ -143342,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 } } @@ -143396,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 } @@ -143467,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) } @@ -143483,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 { @@ -143742,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))) @@ -143856,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))) { @@ -144015,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))) @@ -144022,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)) @@ -144293,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 } @@ -144324,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))) } @@ -144339,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) @@ -144653,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 @@ -144685,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) } @@ -144717,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 @@ -144781,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 } @@ -144817,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, @@ -144848,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 } } @@ -144880,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) } } @@ -144943,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: ; @@ -144986,7 +145808,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145160,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: @@ -145281,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))) } } } @@ -145305,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 { @@ -145384,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))) @@ -145397,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 { @@ -146032,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 { @@ -146276,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 @@ -146295,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, @@ -146342,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 } @@ -146351,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 { @@ -146365,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 { @@ -146389,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) } @@ -146407,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)) } @@ -146468,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) @@ -146545,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))) } } } @@ -146580,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 @@ -146603,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)) } } @@ -146615,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)) } @@ -146634,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))) } @@ -146681,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) } } @@ -146907,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)) } @@ -146920,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 } @@ -147096,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 @@ -147278,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 } @@ -147480,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 @@ -147697,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{}))) @@ -147709,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)) } } @@ -147720,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 } @@ -148007,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)) @@ -148149,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 } @@ -148157,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 } @@ -148169,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 } @@ -148177,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 } @@ -148185,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 } @@ -148197,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 } @@ -148217,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 } @@ -148229,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 } @@ -148237,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 } @@ -148249,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 } @@ -148257,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 } @@ -148265,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 } @@ -148281,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 } @@ -148313,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 } } @@ -148458,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 } @@ -148475,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 } @@ -148497,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 } @@ -148505,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 } } @@ -148522,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 @@ -148536,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 @@ -148692,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 { @@ -148872,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 @@ -150030,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) @@ -150063,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 @@ -150208,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)) @@ -150236,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 { @@ -150520,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) @@ -150631,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{ @@ -150653,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() { @@ -151197,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 @@ -151507,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 @@ -151573,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 @@ -151593,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 @@ -151614,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 00999754..ee951a11 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 -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-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) + 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(*(*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) } @@ -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) } @@ -18088,7 +18258,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18571,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18437,6 +18628,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46910,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46625,18 +46956,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47009,17 +47340,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -47027,10 +47347,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -47038,11 +47358,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -47050,16 +47369,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49797,222 +50169,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59206,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73850,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91299,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -113047,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 @@ -113318,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 } @@ -113391,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: @@ -113441,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 } @@ -113589,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) @@ -113619,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 { @@ -113634,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 } @@ -113730,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 @@ -113741,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++ { @@ -113752,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) @@ -113825,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 } @@ -113859,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 { @@ -114002,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) @@ -114052,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 { @@ -114174,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) } @@ -114190,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 @@ -114199,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 } @@ -114407,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) @@ -114500,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 { @@ -114570,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 @@ -114580,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 @@ -114617,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 @@ -114754,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 @@ -114799,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 @@ -114907,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 @@ -114918,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 } @@ -114936,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) { @@ -114966,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: @@ -114974,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 @@ -115014,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: ; @@ -115038,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}, {}, } @@ -115161,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) @@ -115180,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 @@ -115192,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) { @@ -115209,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) @@ -115226,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)))) @@ -115260,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) @@ -115367,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 { @@ -115485,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 @@ -115610,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: ; @@ -115657,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)))) @@ -115734,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) @@ -116310,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) @@ -116343,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 @@ -116354,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 @@ -116428,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) @@ -116523,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 } } @@ -116606,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) { @@ -116759,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: @@ -116785,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 } @@ -116814,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) } @@ -116872,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 } @@ -117429,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)) @@ -117540,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) @@ -117846,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) @@ -117861,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 { @@ -117915,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) @@ -118020,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)) } @@ -118065,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 { @@ -118181,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 } @@ -118283,7 +119070,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118358,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: @@ -118493,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)) } @@ -118590,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)) } @@ -118634,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) { @@ -118765,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) { @@ -118784,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 @@ -118880,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) } @@ -118904,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 @@ -119020,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 } @@ -119115,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 { @@ -119152,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 { @@ -119413,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) } @@ -119628,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)) @@ -120326,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 } @@ -120538,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 } @@ -121667,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 { @@ -121679,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)) } } @@ -121725,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 @@ -121910,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)) @@ -121933,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 { @@ -121981,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{ @@ -122024,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) { @@ -122065,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 { @@ -122077,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 @@ -122085,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 @@ -122111,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 { @@ -122147,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 @@ -122155,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)) } } @@ -122209,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: ; @@ -122243,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: @@ -122255,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) { @@ -122278,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 @@ -122289,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: @@ -122339,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: ; @@ -122356,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: ; @@ -122374,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) @@ -122412,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}))) @@ -122429,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 { @@ -122507,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 @@ -122531,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)) } @@ -122550,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)) } } @@ -122564,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) { @@ -122580,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)) } } @@ -122620,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 { @@ -122640,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)) } } } @@ -122657,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 } @@ -122672,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++ { @@ -122701,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) @@ -122730,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) @@ -122744,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) } @@ -122763,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) @@ -122772,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 } @@ -122787,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) @@ -122795,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))) } @@ -122805,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) @@ -123174,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) } @@ -123198,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) } @@ -124116,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 @@ -124125,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++ @@ -124133,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 @@ -124144,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: @@ -124169,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: ; @@ -124358,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 @@ -124368,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 @@ -124376,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 @@ -124488,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 @@ -124618,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})) @@ -124690,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 } @@ -124702,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 @@ -124730,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) @@ -124803,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}))) } } } @@ -124870,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 @@ -125128,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 } @@ -125139,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}))) } @@ -125152,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 @@ -125164,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 } @@ -125240,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 { @@ -125304,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++ { } @@ -125325,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 @@ -125432,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))) } } @@ -125450,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 } @@ -125468,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 } @@ -125486,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 } @@ -125509,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 } @@ -125555,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 @@ -125570,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 { @@ -125610,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 @@ -125620,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 } } @@ -125643,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) @@ -125668,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) @@ -125711,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 } @@ -125727,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 } @@ -125755,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))) } @@ -125810,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 @@ -125850,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 @@ -125858,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: @@ -125882,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) { @@ -125909,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++ @@ -125921,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: @@ -125948,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))) { @@ -125966,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 { @@ -125978,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++ } @@ -126042,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 @@ -126059,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 @@ -126071,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 } } } @@ -126100,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 { @@ -126114,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 } } } @@ -126163,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 } @@ -126187,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 @@ -126210,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))) { @@ -126224,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))) @@ -126234,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)) } } @@ -126262,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)) } } @@ -126318,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))) } } @@ -126355,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 @@ -126460,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 } @@ -126480,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 { @@ -126513,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, @@ -126521,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)) } @@ -126570,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 @@ -126580,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)) } @@ -126633,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 } } @@ -126653,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))) } @@ -126744,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) @@ -126776,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) } @@ -126808,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: @@ -126878,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 } @@ -126932,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)))) == '?' { @@ -126948,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 }())) @@ -126973,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) } } @@ -127032,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 } @@ -127148,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 { @@ -127165,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 @@ -127202,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 || @@ -127301,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 } @@ -127394,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) @@ -127402,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)) } } } @@ -127423,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, @@ -127453,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))) @@ -127469,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 { @@ -127486,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 { @@ -127503,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))) @@ -127523,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) @@ -127555,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 } @@ -127653,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 { @@ -127669,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)) @@ -127685,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) @@ -127719,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 { @@ -127749,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))) { @@ -127766,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) @@ -127796,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 @@ -127810,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) @@ -127839,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 @@ -127857,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 }())) } } @@ -127870,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) @@ -127881,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) } } @@ -127947,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) } } @@ -127974,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++ @@ -127991,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 { @@ -128004,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 } @@ -128105,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)) } } @@ -128122,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)) } } @@ -128142,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 @@ -128160,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 { @@ -128455,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 @@ -128480,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 @@ -128525,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))))) @@ -131336,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 { @@ -131378,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)) @@ -131439,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) } } @@ -131513,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 { @@ -131581,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) } @@ -131593,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 @@ -131945,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: ; @@ -132113,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 } } @@ -132198,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 { @@ -132246,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 { @@ -132257,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)) @@ -132285,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 } @@ -132320,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))) } @@ -132573,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 { @@ -132589,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)) } } } @@ -132662,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)) @@ -132698,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 @@ -132711,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 } @@ -132724,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 } @@ -132787,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)) } } @@ -133308,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) @@ -134042,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 @@ -134330,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 @@ -134517,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 } @@ -134585,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 } @@ -134744,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) { @@ -134767,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 } @@ -135091,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}))}, } @@ -135508,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) @@ -135648,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 @@ -135675,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 } @@ -135693,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 } @@ -135706,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))) @@ -135715,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++ { @@ -135734,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, @@ -135749,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 } @@ -135764,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) @@ -135774,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') @@ -135784,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 } @@ -135845,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 } } @@ -135870,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)) } } } @@ -135914,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 } @@ -135947,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 { @@ -135956,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 { @@ -135984,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 { @@ -136040,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) @@ -136161,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) @@ -136171,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) @@ -136181,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) @@ -136194,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) @@ -136204,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) @@ -136220,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) @@ -136243,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 @@ -136265,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 @@ -136279,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)) } } @@ -136377,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 } } @@ -136390,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 @@ -138170,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)) } } @@ -138188,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') @@ -138275,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) } @@ -138356,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) } @@ -138526,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) @@ -139474,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 { @@ -139553,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 @@ -139578,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 @@ -139601,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 { @@ -139840,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) } @@ -139913,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)) } } @@ -141039,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 @@ -142232,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)) @@ -142398,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) @@ -142429,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) @@ -142505,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))) } @@ -142548,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 { @@ -142560,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)) } @@ -142680,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}))) @@ -143079,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 @@ -143095,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) } { @@ -143276,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 } @@ -143400,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 @@ -143409,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})) } @@ -143441,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 } } @@ -143495,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 } @@ -143566,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) } @@ -143582,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 { @@ -143841,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))) @@ -143955,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))) { @@ -144114,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))) @@ -144121,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)) @@ -144392,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 } @@ -144423,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))) } @@ -144438,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) @@ -144752,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 @@ -144784,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) } @@ -144816,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 @@ -144880,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 } @@ -144916,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, @@ -144947,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 } } @@ -144979,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) } } @@ -145042,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: ; @@ -145085,7 +145907,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145259,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: @@ -145380,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))) } } } @@ -145404,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 { @@ -145483,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))) @@ -145496,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 { @@ -146131,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 { @@ -146375,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 @@ -146394,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, @@ -146441,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 } @@ -146450,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 { @@ -146464,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 { @@ -146488,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) } @@ -146506,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)) } @@ -146567,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) @@ -146644,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))) } } } @@ -146679,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 @@ -146702,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)) } } @@ -146714,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)) } @@ -146733,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))) } @@ -146780,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) } } @@ -147006,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)) } @@ -147019,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 } @@ -147195,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 @@ -147377,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 } @@ -147579,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 @@ -147796,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{}))) @@ -147808,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)) } } @@ -147819,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 } @@ -148106,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)) @@ -148248,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 } @@ -148256,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 } @@ -148268,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 } @@ -148276,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 } @@ -148284,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 } @@ -148296,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 } @@ -148316,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 } @@ -148328,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 } @@ -148336,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 } @@ -148348,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 } @@ -148356,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 } @@ -148364,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 } @@ -148380,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 } @@ -148412,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 } } @@ -148557,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 } @@ -148574,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 } @@ -148596,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 } @@ -148604,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 } } @@ -148621,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 @@ -148635,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 @@ -148791,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 { @@ -148971,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 @@ -150129,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) @@ -150162,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 @@ -150307,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)) @@ -150335,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 { @@ -150619,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) @@ -150730,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{ @@ -150752,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() { @@ -151296,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 @@ -151606,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 @@ -151672,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 @@ -151692,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 @@ -151713,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 f9c89ed5..299da005 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 -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-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) + 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(*(*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) } @@ -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) } @@ -18083,7 +18253,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18566,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18432,6 +18623,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46905,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46620,18 +46951,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47004,17 +47335,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -47022,10 +47342,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -47033,11 +47353,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -47045,16 +47364,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49792,222 +50164,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59201,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73845,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91294,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -113042,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 @@ -113313,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 } @@ -113386,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: @@ -113436,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 } @@ -113584,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) @@ -113614,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 { @@ -113629,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 } @@ -113725,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 @@ -113736,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++ { @@ -113747,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) @@ -113820,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 } @@ -113854,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 { @@ -113997,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) @@ -114047,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 { @@ -114169,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) } @@ -114185,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 @@ -114194,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 } @@ -114402,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) @@ -114495,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 { @@ -114565,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 @@ -114575,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 @@ -114612,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 @@ -114749,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 @@ -114794,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 @@ -114902,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 @@ -114913,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 } @@ -114931,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) { @@ -114961,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: @@ -114969,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 @@ -115009,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: ; @@ -115033,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}, {}, } @@ -115156,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) @@ -115175,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 @@ -115187,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) { @@ -115204,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) @@ -115221,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)))) @@ -115255,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) @@ -115362,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 { @@ -115480,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 @@ -115605,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: ; @@ -115652,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)))) @@ -115729,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) @@ -116305,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) @@ -116338,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 @@ -116349,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 @@ -116423,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) @@ -116518,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 } } @@ -116601,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) { @@ -116754,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: @@ -116780,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 } @@ -116809,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) } @@ -116867,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 } @@ -117424,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)) @@ -117535,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) @@ -117841,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) @@ -117856,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 { @@ -117910,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) @@ -118015,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)) } @@ -118060,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 { @@ -118176,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 } @@ -118278,7 +119065,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118353,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: @@ -118488,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)) } @@ -118585,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)) } @@ -118629,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) { @@ -118760,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) { @@ -118779,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 @@ -118875,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) } @@ -118899,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 @@ -119015,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 } @@ -119110,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 { @@ -119147,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 { @@ -119408,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) } @@ -119623,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)) @@ -120321,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 } @@ -120533,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 } @@ -121662,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 { @@ -121674,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)) } } @@ -121720,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 @@ -121905,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)) @@ -121928,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 { @@ -121976,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{ @@ -122019,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) { @@ -122060,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 { @@ -122072,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 @@ -122080,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 @@ -122106,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 { @@ -122142,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 @@ -122150,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)) } } @@ -122204,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: ; @@ -122238,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: @@ -122250,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) { @@ -122273,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 @@ -122284,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: @@ -122334,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: ; @@ -122351,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: ; @@ -122369,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) @@ -122407,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}))) @@ -122424,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 { @@ -122502,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 @@ -122526,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)) } @@ -122545,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)) } } @@ -122559,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) { @@ -122575,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)) } } @@ -122615,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 { @@ -122635,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)) } } } @@ -122652,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 } @@ -122667,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++ { @@ -122696,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) @@ -122725,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) @@ -122739,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) } @@ -122758,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) @@ -122767,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 } @@ -122782,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) @@ -122790,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))) } @@ -122800,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) @@ -123169,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) } @@ -123193,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) } @@ -124111,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 @@ -124120,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++ @@ -124128,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 @@ -124139,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: @@ -124164,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: ; @@ -124353,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 @@ -124363,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 @@ -124371,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 @@ -124483,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 @@ -124613,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})) @@ -124685,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 } @@ -124697,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 @@ -124725,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) @@ -124798,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}))) } } } @@ -124865,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 @@ -125123,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 } @@ -125134,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}))) } @@ -125147,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 @@ -125159,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 } @@ -125235,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 { @@ -125299,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++ { } @@ -125320,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 @@ -125427,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))) } } @@ -125445,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 } @@ -125463,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 } @@ -125481,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 } @@ -125504,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 } @@ -125550,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 @@ -125565,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 { @@ -125605,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 @@ -125615,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 } } @@ -125638,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) @@ -125663,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) @@ -125706,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 } @@ -125722,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 } @@ -125750,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))) } @@ -125805,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 @@ -125845,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 @@ -125853,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: @@ -125877,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) { @@ -125904,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++ @@ -125916,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: @@ -125943,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))) { @@ -125961,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 { @@ -125973,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++ } @@ -126037,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 @@ -126054,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 @@ -126066,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 } } } @@ -126095,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 { @@ -126109,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 } } } @@ -126158,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 } @@ -126182,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 @@ -126205,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))) { @@ -126219,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))) @@ -126229,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)) } } @@ -126257,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)) } } @@ -126313,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))) } } @@ -126350,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 @@ -126455,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 } @@ -126475,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 { @@ -126508,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, @@ -126516,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)) } @@ -126565,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 @@ -126575,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)) } @@ -126628,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 } } @@ -126648,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))) } @@ -126739,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) @@ -126771,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) } @@ -126803,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: @@ -126873,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 } @@ -126927,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)))) == '?' { @@ -126943,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 }())) @@ -126968,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) } } @@ -127027,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 } @@ -127143,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 { @@ -127160,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 @@ -127197,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 || @@ -127296,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 } @@ -127389,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) @@ -127397,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)) } } } @@ -127418,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, @@ -127448,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))) @@ -127464,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 { @@ -127481,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 { @@ -127498,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))) @@ -127518,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) @@ -127550,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 } @@ -127648,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 { @@ -127664,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)) @@ -127680,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) @@ -127714,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 { @@ -127744,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))) { @@ -127761,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) @@ -127791,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 @@ -127805,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) @@ -127834,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 @@ -127852,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 }())) } } @@ -127865,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) @@ -127876,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) } } @@ -127942,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) } } @@ -127969,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++ @@ -127986,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 { @@ -127999,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 } @@ -128100,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)) } } @@ -128117,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)) } } @@ -128137,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 @@ -128155,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 { @@ -128450,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 @@ -128475,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 @@ -128520,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))))) @@ -131331,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 { @@ -131373,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)) @@ -131434,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) } } @@ -131508,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 { @@ -131576,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) } @@ -131588,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 @@ -131940,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: ; @@ -132108,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 } } @@ -132193,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 { @@ -132241,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 { @@ -132252,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)) @@ -132280,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 } @@ -132315,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))) } @@ -132568,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 { @@ -132584,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)) } } } @@ -132657,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)) @@ -132693,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 @@ -132706,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 } @@ -132719,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 } @@ -132782,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)) } } @@ -133303,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) @@ -134037,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 @@ -134325,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 @@ -134512,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 } @@ -134580,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 } @@ -134739,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) { @@ -134762,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 } @@ -135086,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}))}, } @@ -135503,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) @@ -135643,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 @@ -135670,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 } @@ -135688,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 } @@ -135701,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))) @@ -135710,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++ { @@ -135729,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, @@ -135744,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 } @@ -135759,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) @@ -135769,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') @@ -135779,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 } @@ -135840,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 } } @@ -135865,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)) } } } @@ -135909,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 } @@ -135942,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 { @@ -135951,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 { @@ -135979,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 { @@ -136035,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) @@ -136156,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) @@ -136166,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) @@ -136176,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) @@ -136189,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) @@ -136199,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) @@ -136215,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) @@ -136238,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 @@ -136260,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 @@ -136274,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)) } } @@ -136372,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 } } @@ -136385,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 @@ -138165,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)) } } @@ -138183,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') @@ -138270,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) } @@ -138351,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) } @@ -138521,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) @@ -139469,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 { @@ -139548,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 @@ -139573,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 @@ -139596,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 { @@ -139835,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) } @@ -139908,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)) } } @@ -141034,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 @@ -142227,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)) @@ -142393,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) @@ -142424,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) @@ -142500,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))) } @@ -142543,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 { @@ -142555,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)) } @@ -142675,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}))) @@ -143074,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 @@ -143090,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) } { @@ -143271,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 } @@ -143395,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 @@ -143404,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})) } @@ -143436,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 } } @@ -143490,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 } @@ -143561,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) } @@ -143577,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 { @@ -143836,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))) @@ -143950,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))) { @@ -144109,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))) @@ -144116,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)) @@ -144387,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 } @@ -144418,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))) } @@ -144433,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) @@ -144747,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 @@ -144779,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) } @@ -144811,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 @@ -144875,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 } @@ -144911,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, @@ -144942,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 } } @@ -144974,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) } } @@ -145037,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: ; @@ -145080,7 +145902,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145254,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: @@ -145375,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))) } } } @@ -145399,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 { @@ -145478,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))) @@ -145491,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 { @@ -146126,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 { @@ -146370,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 @@ -146389,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, @@ -146436,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 } @@ -146445,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 { @@ -146459,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 { @@ -146483,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) } @@ -146501,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)) } @@ -146562,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) @@ -146639,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))) } } } @@ -146674,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 @@ -146697,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)) } } @@ -146709,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)) } @@ -146728,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))) } @@ -146775,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) } } @@ -147001,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)) } @@ -147014,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 } @@ -147190,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 @@ -147372,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 } @@ -147574,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 @@ -147791,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{}))) @@ -147803,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)) } } @@ -147814,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 } @@ -148101,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)) @@ -148243,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 } @@ -148251,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 } @@ -148263,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 } @@ -148271,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 } @@ -148279,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 } @@ -148291,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 } @@ -148311,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 } @@ -148323,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 } @@ -148331,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 } @@ -148343,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 } @@ -148351,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 } @@ -148359,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 } @@ -148375,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 } @@ -148407,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 } } @@ -148552,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 } @@ -148569,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 } @@ -148591,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 } @@ -148599,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 } } @@ -148616,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 @@ -148630,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 @@ -148786,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 { @@ -148966,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 @@ -150124,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) @@ -150157,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 @@ -150302,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)) @@ -150330,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 { @@ -150614,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) @@ -150725,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{ @@ -150747,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() { @@ -151291,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 @@ -151601,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 @@ -151667,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 @@ -151687,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 @@ -151708,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 440f9e7b..b07db89e 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 -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-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) + 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(*(*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) } @@ -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) } @@ -18079,7 +18249,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +18562,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -18428,6 +18619,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +46901,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -46616,18 +46947,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47000,17 +47331,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -47018,10 +47338,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -47029,11 +47349,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -47041,16 +47360,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -49788,222 +50160,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +59197,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +73841,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 @@ -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) - if !!(isQuick != 0) { - goto __298 + + 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 __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 __300 -__302: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) == 0 && !(bStrict != 0)) { - goto __303 - } - goto __300 -__303: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)) != 0) { - goto __305 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) != COLTYPE_ANY) { - goto __308 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __311 + } + goto __309 +__311: ; - goto __300 -__300: + if !(bStrict != 0) { + goto __312 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) == 0 && !(doTypeCheck != 0)) { + goto __314 + } + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 + } + 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 __321 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __323 +__322: + ; +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +91290,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x8000>>15) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x8000>>15) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -113038,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 @@ -113309,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 } @@ -113382,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: @@ -113432,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 } @@ -113580,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) @@ -113610,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 { @@ -113625,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 } @@ -113721,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 @@ -113732,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++ { @@ -113743,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) @@ -113816,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 } @@ -113850,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 { @@ -113993,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) @@ -114043,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 { @@ -114165,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) } @@ -114181,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 @@ -114190,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 } @@ -114398,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) @@ -114491,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 { @@ -114561,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 @@ -114571,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 @@ -114608,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 @@ -114745,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 @@ -114790,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 @@ -114898,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 @@ -114909,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 } @@ -114927,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) { @@ -114957,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: @@ -114965,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 @@ -115005,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: ; @@ -115029,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}, {}, } @@ -115152,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) @@ -115171,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 @@ -115183,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) { @@ -115200,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) @@ -115217,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)))) @@ -115251,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) @@ -115358,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 { @@ -115476,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 @@ -115601,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: ; @@ -115648,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)))) @@ -115725,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) @@ -116301,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) @@ -116334,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 @@ -116345,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 @@ -116419,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) @@ -116514,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 } } @@ -116597,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) { @@ -116750,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: @@ -116776,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 } @@ -116805,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) } @@ -116863,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 } @@ -117420,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)) @@ -117531,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) @@ -117837,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) @@ -117852,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 { @@ -117906,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) @@ -118011,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)) } @@ -118056,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 { @@ -118172,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 } @@ -118274,7 +119061,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15317) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -118349,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: @@ -118484,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)) } @@ -118581,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)) } @@ -118625,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) { @@ -118756,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) { @@ -118775,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 @@ -118871,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) } @@ -118895,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 @@ -119011,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 } @@ -119106,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 { @@ -119143,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 { @@ -119404,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) } @@ -119619,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)) @@ -120317,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 } @@ -120529,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 } @@ -121658,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 { @@ -121670,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)) } } @@ -121716,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 @@ -121901,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)) @@ -121924,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 { @@ -121972,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{ @@ -122015,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) { @@ -122056,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 { @@ -122068,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 @@ -122076,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 @@ -122102,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 { @@ -122138,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 @@ -122146,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)) } } @@ -122200,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: ; @@ -122234,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: @@ -122246,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) { @@ -122269,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 @@ -122280,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: @@ -122330,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: ; @@ -122347,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: ; @@ -122365,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) @@ -122403,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}))) @@ -122420,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 { @@ -122498,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 @@ -122522,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)) } @@ -122541,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)) } } @@ -122555,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) { @@ -122571,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)) } } @@ -122611,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 { @@ -122631,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)) } } } @@ -122648,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 } @@ -122663,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++ { @@ -122692,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) @@ -122721,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) @@ -122735,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) } @@ -122754,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) @@ -122763,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 } @@ -122778,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) @@ -122786,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))) } @@ -122796,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) @@ -123165,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) } @@ -123189,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) } @@ -124107,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 @@ -124116,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++ @@ -124124,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 @@ -124135,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: @@ -124160,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: ; @@ -124349,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 @@ -124359,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 @@ -124367,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 @@ -124479,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 @@ -124609,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})) @@ -124681,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 } @@ -124693,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 @@ -124721,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) @@ -124794,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}))) } } } @@ -124861,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 @@ -125119,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 } @@ -125130,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}))) } @@ -125143,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 @@ -125155,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 } @@ -125231,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 { @@ -125295,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++ { } @@ -125316,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 @@ -125423,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))) } } @@ -125441,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 } @@ -125459,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 } @@ -125477,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 } @@ -125500,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 } @@ -125546,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 @@ -125561,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 { @@ -125601,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 @@ -125611,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 } } @@ -125634,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) @@ -125659,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) @@ -125702,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 } @@ -125718,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 } @@ -125746,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))) } @@ -125801,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 @@ -125841,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 @@ -125849,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: @@ -125873,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) { @@ -125900,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++ @@ -125912,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: @@ -125939,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))) { @@ -125957,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 { @@ -125969,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++ } @@ -126033,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 @@ -126050,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 @@ -126062,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 } } } @@ -126091,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 { @@ -126105,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 } } } @@ -126154,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 } @@ -126178,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 @@ -126201,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))) { @@ -126215,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))) @@ -126225,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)) } } @@ -126253,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)) } } @@ -126309,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))) } } @@ -126346,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 @@ -126451,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 } @@ -126471,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 { @@ -126504,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, @@ -126512,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)) } @@ -126561,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 @@ -126571,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)) } @@ -126624,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 } } @@ -126644,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))) } @@ -126735,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) @@ -126767,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) } @@ -126799,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: @@ -126869,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 } @@ -126923,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)))) == '?' { @@ -126939,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 }())) @@ -126964,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) } } @@ -127023,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 } @@ -127139,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 { @@ -127156,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 @@ -127193,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 || @@ -127292,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 } @@ -127385,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) @@ -127393,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)) } } } @@ -127414,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, @@ -127444,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))) @@ -127460,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 { @@ -127477,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 { @@ -127494,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))) @@ -127514,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) @@ -127546,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 } @@ -127644,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 { @@ -127660,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)) @@ -127676,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) @@ -127710,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 { @@ -127740,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))) { @@ -127757,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) @@ -127787,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 @@ -127801,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) @@ -127830,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 @@ -127848,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 }())) } } @@ -127861,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) @@ -127872,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) } } @@ -127938,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) } } @@ -127965,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++ @@ -127982,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 { @@ -127995,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 } @@ -128096,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)) } } @@ -128113,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)) } } @@ -128133,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 @@ -128151,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 { @@ -128446,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 @@ -128471,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 @@ -128516,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))))) @@ -131327,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 { @@ -131369,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)) @@ -131430,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) } } @@ -131504,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 { @@ -131572,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) } @@ -131584,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 @@ -131936,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: ; @@ -132104,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 } } @@ -132189,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 { @@ -132237,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 { @@ -132248,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)) @@ -132276,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 } @@ -132311,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))) } @@ -132564,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 { @@ -132580,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)) } } } @@ -132653,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)) @@ -132689,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 @@ -132702,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 } @@ -132715,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 } @@ -132778,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)) } } @@ -133299,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) @@ -134033,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 @@ -134321,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 @@ -134508,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 } @@ -134576,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 } @@ -134735,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) { @@ -134758,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 } @@ -135082,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}))}, } @@ -135499,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) @@ -135639,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 @@ -135666,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 } @@ -135684,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 } @@ -135697,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))) @@ -135706,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++ { @@ -135725,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, @@ -135740,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 } @@ -135755,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) @@ -135765,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') @@ -135775,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 } @@ -135836,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 } } @@ -135861,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)) } } } @@ -135905,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 } @@ -135938,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 { @@ -135947,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 { @@ -135975,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 { @@ -136031,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) @@ -136152,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) @@ -136162,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) @@ -136172,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) @@ -136185,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) @@ -136195,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) @@ -136211,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) @@ -136234,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 @@ -136256,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 @@ -136270,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)) } } @@ -136368,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 } } @@ -136381,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 @@ -138161,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)) } } @@ -138179,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') @@ -138266,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) } @@ -138347,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) } @@ -138517,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) @@ -139465,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 { @@ -139544,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 @@ -139569,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 @@ -139592,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 { @@ -139831,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) } @@ -139904,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)) } } @@ -141030,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 @@ -142223,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)) @@ -142389,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) @@ -142420,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) @@ -142496,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))) } @@ -142539,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 { @@ -142551,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)) } @@ -142671,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}))) @@ -143070,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 @@ -143086,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) } { @@ -143267,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 } @@ -143391,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 @@ -143400,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})) } @@ -143432,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 } } @@ -143486,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 } @@ -143557,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) } @@ -143573,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 { @@ -143832,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))) @@ -143946,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))) { @@ -144105,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))) @@ -144112,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)) @@ -144383,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 } @@ -144414,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))) } @@ -144429,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) @@ -144743,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 @@ -144775,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) } @@ -144807,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 @@ -144871,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 } @@ -144907,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, @@ -144938,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 } } @@ -144970,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) } } @@ -145033,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: ; @@ -145076,7 +145898,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1534 + zText = ts + 1554 __14: ; iCol = 0 @@ -145250,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: @@ -145371,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))) } } } @@ -145395,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 { @@ -145474,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))) @@ -145487,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 { @@ -146122,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 { @@ -146366,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 @@ -146385,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, @@ -146432,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 } @@ -146441,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 { @@ -146455,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 { @@ -146479,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) } @@ -146497,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)) } @@ -146558,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) @@ -146635,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))) } } } @@ -146670,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 @@ -146693,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)) } } @@ -146705,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)) } @@ -146724,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))) } @@ -146771,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) } } @@ -146997,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)) } @@ -147010,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 } @@ -147186,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 @@ -147368,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 } @@ -147570,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 @@ -147787,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{}))) @@ -147799,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)) } } @@ -147810,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 } @@ -148097,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)) @@ -148239,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 } @@ -148247,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 } @@ -148259,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 } @@ -148267,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 } @@ -148275,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 } @@ -148287,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 } @@ -148307,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 } @@ -148319,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 } @@ -148327,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 } @@ -148339,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 } @@ -148347,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 } @@ -148355,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 } @@ -148371,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 } @@ -148403,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 } } @@ -148548,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 } @@ -148565,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 } @@ -148587,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 } @@ -148595,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 } } @@ -148612,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 @@ -148626,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 @@ -148782,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 { @@ -148962,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 @@ -150120,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) @@ -150153,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 @@ -150298,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)) @@ -150326,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 { @@ -150610,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) @@ -150721,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{ @@ -150743,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() { @@ -151287,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 @@ -151597,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 @@ -151663,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 @@ -151683,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 @@ -151704,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 390c0498..7c17e3fa 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -17104,7 +17270,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69665) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +45727,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45505,18 +45773,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -45889,17 +46157,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -45907,10 +46164,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -45918,11 +46175,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -45930,16 +46186,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -48677,222 +48986,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5843) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96008, ts+5837) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +58004,15 @@ 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+7614) == 0 { return 1 } if Xsqlite3StrICmp(tls, z, ts+7620) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7626) == 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +72643,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14757) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 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 + 16081, + ts + 16089, + ts + 16100, + ts + 16103, + ts + 16110, + ts + 16071, + ts + 16076, + 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) - if !!(isQuick != 0) { - goto __291 + + 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 __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 __293 -__295: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __296 - } - goto __293 -__296: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__297: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __298 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17668, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __300 -__299: - integrityCheckResultRow(tls, v) -__300: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__298: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __301 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17688, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__301: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __304 + } + goto __302 +__304: ; - goto __293 -__293: + if !(bStrict != 0) { + goto __305 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __307 + } + goto __302 +__307: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __308 + } + 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 __314 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __315 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __316 +__315: + ; +__316: + ; +__314: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __317 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +90045,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -111851,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 @@ -112122,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 } @@ -112195,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: @@ -112245,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 } @@ -112393,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) @@ -112423,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 { @@ -112438,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 } @@ -112534,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 @@ -112545,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++ { @@ -112556,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) @@ -112629,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 } @@ -112663,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 { @@ -112806,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) @@ -112851,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 { @@ -112968,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) } @@ -113201,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) @@ -113294,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 { @@ -113364,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 @@ -113374,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 @@ -113406,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 @@ -113543,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 @@ -113588,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 @@ -113696,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 @@ -113707,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 } @@ -113725,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) { @@ -113755,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: @@ -113763,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 @@ -113803,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: ; @@ -113827,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}, {}, } @@ -113950,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) @@ -113969,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 @@ -113981,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) { @@ -113998,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) @@ -114015,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)))) @@ -114049,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) @@ -114156,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)) @@ -114259,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 @@ -114431,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)))) @@ -115084,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) @@ -115117,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 @@ -115128,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 @@ -115202,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) @@ -115297,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 } } @@ -115380,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) { @@ -115533,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: @@ -115559,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 } @@ -115588,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) } @@ -115646,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 } @@ -116203,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)) @@ -116314,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) @@ -116620,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) @@ -116635,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 { @@ -116689,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) @@ -116794,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)) } @@ -116839,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 { @@ -116955,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 } @@ -117057,7 +117772,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15298) + jsonWrongNumArgs(tls, ctx, ts+15325) return __2: ; @@ -117132,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: @@ -117267,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)) } @@ -117364,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)) } @@ -117408,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) { @@ -117539,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) { @@ -117558,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 @@ -117654,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) } @@ -117678,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 @@ -117794,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 } @@ -117889,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 { @@ -117926,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 { @@ -118187,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) } @@ -118402,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)) @@ -119100,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 } @@ -119312,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 } @@ -120441,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 { @@ -120453,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)) } } @@ -120499,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 @@ -120684,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)) @@ -120707,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 { @@ -120755,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{ @@ -120798,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) { @@ -120839,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 { @@ -120851,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 @@ -120859,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 @@ -120885,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 { @@ -120921,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 @@ -120929,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)) } } @@ -120983,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: ; @@ -121017,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: @@ -121029,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) { @@ -121052,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 @@ -121063,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: @@ -121113,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: ; @@ -121130,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: ; @@ -121148,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) @@ -121186,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}))) @@ -121203,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 { @@ -121281,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)) @@ -121305,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)) } @@ -121324,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)) } } @@ -121338,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) { @@ -121354,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)) } } @@ -121394,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 { @@ -121414,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)) } } } @@ -121431,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 } @@ -121446,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++ { @@ -121475,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) @@ -121504,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) @@ -121518,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) } @@ -121537,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) @@ -121546,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 } @@ -121561,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) @@ -121569,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))) } @@ -121579,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) @@ -121948,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) } @@ -121972,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) } @@ -122890,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 @@ -122899,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++ @@ -122907,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 @@ -122918,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: @@ -122943,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: ; @@ -123132,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 @@ -123142,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 @@ -123150,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 @@ -123262,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 @@ -123392,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})) @@ -123464,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 } @@ -123476,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 @@ -123504,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) @@ -123577,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}))) } } } @@ -123644,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 @@ -123902,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 } @@ -123913,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}))) } @@ -123926,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 @@ -123938,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 } @@ -124014,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 { @@ -124078,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++ { } @@ -124099,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 @@ -124206,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))) } } @@ -124224,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 } @@ -124242,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 } @@ -124260,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 } @@ -124283,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 } @@ -124329,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 @@ -124344,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 { @@ -124384,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 @@ -124394,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 } } @@ -124417,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) @@ -124442,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) @@ -124489,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 } @@ -124507,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 } @@ -124529,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))) } @@ -124589,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 @@ -124624,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 @@ -124632,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: @@ -124656,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 @@ -124683,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++ @@ -124695,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: @@ -124728,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))) { @@ -124740,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 { @@ -124752,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++ } @@ -124821,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 @@ -124833,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 @@ -124845,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 @@ -124864,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 } } } @@ -124874,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 { @@ -124892,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 } } } @@ -124937,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 } @@ -124961,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 @@ -124989,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))) { @@ -124998,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))) @@ -125008,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)) } } @@ -125039,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 @@ -125047,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)) } } @@ -125092,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))) } } @@ -125129,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 @@ -125234,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 } @@ -125254,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 { @@ -125287,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, @@ -125295,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 @@ -125306,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)) } @@ -125344,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 @@ -125356,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))) @@ -125374,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)) } @@ -125412,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 } } @@ -125427,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 }(), @@ -125453,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, @@ -125521,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) @@ -125550,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) } @@ -125582,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: @@ -125652,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 } @@ -125706,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)))) == '?' { @@ -125722,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 @@ -125747,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) } } @@ -125806,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 } @@ -125922,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 { @@ -125939,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 @@ -125976,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 || @@ -126075,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 } @@ -126168,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) @@ -126176,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)) } } } @@ -126197,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, @@ -126227,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))) @@ -126243,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 { @@ -126260,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 { @@ -126277,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))) @@ -126297,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) @@ -126329,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 } @@ -126427,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 { @@ -126443,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)) @@ -126459,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) @@ -126493,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 { @@ -126523,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))) { @@ -126540,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) @@ -126570,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 @@ -126584,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) @@ -126613,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 @@ -126631,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 }())) } } @@ -126644,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) @@ -126655,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) } } @@ -126721,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) } } @@ -126748,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++ @@ -126765,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 { @@ -126778,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 } @@ -126879,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)) } } @@ -126896,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)) } } @@ -126916,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 @@ -126934,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 { @@ -127229,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 @@ -127254,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 @@ -127299,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))))) @@ -130110,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 { @@ -130152,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)) @@ -130213,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) } } @@ -130287,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 { @@ -130355,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) } @@ -130719,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: ; @@ -130887,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 @@ -130898,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 } } @@ -130977,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 { @@ -131020,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 { @@ -131031,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)) @@ -131059,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 } @@ -131094,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))) } @@ -131347,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 { @@ -131363,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)) } } } @@ -131436,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)) @@ -131472,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 @@ -131485,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 } @@ -131498,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 } @@ -131561,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)) } } @@ -132816,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 @@ -133104,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 @@ -133291,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 } @@ -133359,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 } @@ -133541,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 } @@ -133865,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}))}, } @@ -134282,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) @@ -134422,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 @@ -134449,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 } @@ -134467,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 } @@ -134480,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))) @@ -134489,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++ { @@ -134508,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, @@ -134523,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 } @@ -134538,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) @@ -134548,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') @@ -134558,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 } @@ -134619,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 } } @@ -134644,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)) } } } @@ -134688,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 } @@ -134721,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 { @@ -134758,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 { @@ -134814,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) @@ -134935,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) @@ -134945,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) @@ -134955,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) @@ -134968,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) @@ -134978,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) @@ -134994,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) @@ -135017,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 @@ -135039,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 @@ -135053,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)) } } @@ -135151,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 } } @@ -135164,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 @@ -136944,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)) } } @@ -136962,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') @@ -137049,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) } @@ -137130,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) } @@ -137300,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) @@ -138248,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 { @@ -138327,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 @@ -138352,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 @@ -138375,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 { @@ -138614,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) } @@ -138687,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)) } } @@ -139813,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 @@ -141172,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) @@ -141203,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) @@ -141279,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))) } @@ -141322,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 { @@ -141334,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)) } @@ -141454,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}))) @@ -141853,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 @@ -141869,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) } { @@ -142050,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 } @@ -142174,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 @@ -142183,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})) } @@ -142215,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 } } @@ -142269,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 } @@ -142356,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 { @@ -142615,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))) @@ -142729,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))) { @@ -142888,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))) @@ -142895,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)) @@ -143166,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 } @@ -143197,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))) } @@ -143212,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) @@ -143526,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 @@ -143558,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) } @@ -143590,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 }(), @@ -143606,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 @@ -143654,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 } @@ -143690,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, @@ -143721,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 } } @@ -143753,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) } } @@ -143816,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: ; @@ -144033,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: @@ -144154,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))) } } } @@ -144178,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 { @@ -144257,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))) @@ -144270,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 { @@ -144905,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 { @@ -145149,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 @@ -145168,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, @@ -145215,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 } @@ -145224,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 { @@ -145238,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 { @@ -145262,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) } @@ -145280,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)) } @@ -145341,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) @@ -145418,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))) } } } @@ -145453,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 @@ -145476,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)) } } @@ -145488,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)) } @@ -145507,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))) } @@ -145554,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) } } @@ -145780,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)) } @@ -145793,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 } @@ -145969,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 @@ -146151,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 } @@ -146353,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 @@ -146570,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{}))) @@ -146582,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)) } } @@ -146593,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 } @@ -146880,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)) @@ -147022,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 } @@ -147030,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 } @@ -147042,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 } @@ -147050,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 } @@ -147058,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 } @@ -147070,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 } @@ -147090,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 } @@ -147102,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 } @@ -147110,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 } @@ -147122,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 } @@ -147130,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 } @@ -147138,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 } @@ -147154,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 } @@ -147186,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 } } @@ -147331,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 } @@ -147348,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 } @@ -147370,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 } @@ -147378,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 } } @@ -147395,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 @@ -147409,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 @@ -147565,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 { @@ -147745,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 @@ -148903,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) @@ -148936,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 @@ -149081,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)) @@ -149109,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 { @@ -149504,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{ @@ -149526,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() { @@ -150377,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 @@ -150443,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 @@ -150463,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 @@ -150484,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 f98b959a..a58faba5 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -16834,7 +17004,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +17317,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -17183,6 +17374,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +45520,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45235,18 +45566,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -45619,17 +45950,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -45637,10 +45957,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -45648,11 +45968,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -45660,16 +45979,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -48407,222 +48779,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5846) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5860) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +57798,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7623) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7637) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +72440,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14760) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 5041, ts + 16052, - ts + 16057, - ts + 16065, - ts + 16076, - ts + 16079, - ts + 16086, - ts + 16047, - 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) - if !!(isQuick != 0) { - goto __291 + + 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 __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 __293 -__295: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __296 - } - goto __293 -__296: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__297: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __298 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17671, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __300 -__299: - integrityCheckResultRow(tls, v) -__300: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__298: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __301 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17691, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__301: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __304 + } + goto __302 +__304: ; - goto __293 -__293: + if !(bStrict != 0) { + goto __305 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __307 + } + goto __302 +__307: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __308 + } + 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 __314 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __315 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __316 +__315: + ; +__316: + ; +__314: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __317 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +89840,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -111581,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 @@ -111852,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 } @@ -111925,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: @@ -111975,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 } @@ -112123,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) @@ -112153,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 { @@ -112168,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 } @@ -112264,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 @@ -112275,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++ { @@ -112286,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) @@ -112359,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 } @@ -112393,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 { @@ -112536,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) @@ -112581,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 { @@ -112698,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) } @@ -112714,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 @@ -112723,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 } @@ -112931,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) @@ -113024,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 { @@ -113094,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 @@ -113104,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 @@ -113136,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 @@ -113273,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 @@ -113318,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 @@ -113426,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 @@ -113437,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 } @@ -113455,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) { @@ -113485,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: @@ -113493,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 @@ -113533,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: ; @@ -113557,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}, {}, } @@ -113680,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) @@ -113699,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 @@ -113711,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) { @@ -113728,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) @@ -113745,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)))) @@ -113779,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) @@ -113886,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)) @@ -113989,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 @@ -114114,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: ; @@ -114161,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)))) @@ -114238,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) @@ -114814,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) @@ -114847,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 @@ -114858,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 @@ -114932,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) @@ -115027,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 } } @@ -115110,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) { @@ -115263,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: @@ -115289,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 } @@ -115318,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) } @@ -115376,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 } @@ -115933,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)) @@ -116044,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) @@ -116350,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) @@ -116365,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 { @@ -116419,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) @@ -116524,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)) } @@ -116569,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 { @@ -116685,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 } @@ -116787,7 +117574,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15301) + jsonWrongNumArgs(tls, ctx, ts+15348) return __2: ; @@ -116862,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: @@ -116997,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)) } @@ -117094,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)) } @@ -117138,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) { @@ -117269,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) { @@ -117288,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 @@ -117384,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) } @@ -117408,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 @@ -117524,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 } @@ -117619,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 { @@ -117656,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 { @@ -117917,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) } @@ -118132,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)) @@ -118835,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 } @@ -119047,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 } @@ -120176,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 { @@ -120188,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)) } } @@ -120234,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 @@ -120419,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)) @@ -120442,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 { @@ -120490,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{ @@ -120533,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) { @@ -120574,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 { @@ -120586,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 @@ -120594,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 @@ -120620,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 { @@ -120656,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 @@ -120664,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)) } } @@ -120718,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: ; @@ -120752,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: @@ -120764,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) { @@ -120787,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 @@ -120798,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: @@ -120848,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: ; @@ -120865,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: ; @@ -120883,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) @@ -120921,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}))) @@ -120938,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 { @@ -121016,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 @@ -121040,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)) } @@ -121059,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)) } } @@ -121073,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) { @@ -121089,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)) } } @@ -121129,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 { @@ -121149,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)) } } } @@ -121166,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 } @@ -121181,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++ { @@ -121210,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) @@ -121239,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) @@ -121253,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) } @@ -121272,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) @@ -121281,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 } @@ -121296,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) @@ -121304,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))) } @@ -121314,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) @@ -121683,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) } @@ -121707,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) } @@ -122625,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 @@ -122634,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++ @@ -122642,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 @@ -122653,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: @@ -122678,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: ; @@ -122867,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 @@ -122877,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 @@ -122885,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 @@ -122997,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 @@ -123127,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})) @@ -123199,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 } @@ -123211,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 @@ -123239,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) @@ -123312,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}))) } } } @@ -123379,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 @@ -123637,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 } @@ -123648,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}))) } @@ -123661,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 @@ -123673,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 } @@ -123749,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 { @@ -123813,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++ { } @@ -123834,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 @@ -123941,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))) } } @@ -123959,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 } @@ -123977,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 } @@ -123995,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 } @@ -124018,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 } @@ -124064,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 @@ -124079,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 { @@ -124119,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 @@ -124129,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 } } @@ -124152,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) @@ -124177,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) @@ -124220,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 } @@ -124236,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 } @@ -124264,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))) } @@ -124319,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 @@ -124359,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 @@ -124367,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: @@ -124391,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) { @@ -124418,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++ @@ -124430,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: @@ -124457,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))) { @@ -124475,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 { @@ -124487,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++ } @@ -124551,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 @@ -124568,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 @@ -124580,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 } } } @@ -124609,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 { @@ -124623,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 } } } @@ -124672,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 } @@ -124696,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 @@ -124719,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))) { @@ -124733,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))) @@ -124743,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)) } } @@ -124771,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)) } } @@ -124827,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))) } } @@ -124864,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 @@ -124969,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 } @@ -124989,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 { @@ -125022,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, @@ -125030,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)) } @@ -125079,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 @@ -125089,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)) } @@ -125142,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 } } @@ -125162,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))) } @@ -125253,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) @@ -125285,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) } @@ -125317,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: @@ -125387,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 } @@ -125441,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)))) == '?' { @@ -125457,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 }())) @@ -125482,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) } } @@ -125541,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 } @@ -125657,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 { @@ -125674,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 @@ -125711,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 || @@ -125810,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 } @@ -125903,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) @@ -125911,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)) } } } @@ -125932,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, @@ -125962,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))) @@ -125978,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 { @@ -125995,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 { @@ -126012,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))) @@ -126032,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) @@ -126064,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 } @@ -126162,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 { @@ -126178,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)) @@ -126194,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) @@ -126228,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 { @@ -126258,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))) { @@ -126275,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) @@ -126305,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 @@ -126319,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) @@ -126348,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 @@ -126366,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 }())) } } @@ -126379,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) @@ -126390,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) } } @@ -126456,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) } } @@ -126483,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++ @@ -126500,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 { @@ -126513,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 } @@ -126614,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)) } } @@ -126631,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)) } } @@ -126651,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 @@ -126669,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 { @@ -126964,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 @@ -126989,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 @@ -127034,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))))) @@ -129845,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 { @@ -129887,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)) @@ -129948,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) } } @@ -130022,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 { @@ -130090,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) } @@ -130102,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 @@ -130454,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: ; @@ -130622,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 } } @@ -130707,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 { @@ -130755,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 { @@ -130766,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)) @@ -130794,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 } @@ -130829,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))) } @@ -131082,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 { @@ -131098,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)) } } } @@ -131171,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)) @@ -131207,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 @@ -131220,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 } @@ -131233,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 } @@ -131296,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)) } } @@ -131817,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) @@ -132551,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 @@ -132839,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 @@ -133026,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 } @@ -133094,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 } @@ -133253,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) { @@ -133276,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 } @@ -133600,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}))}, } @@ -134017,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) @@ -134157,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 @@ -134184,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 } @@ -134202,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 } @@ -134215,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))) @@ -134224,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++ { @@ -134243,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, @@ -134258,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 } @@ -134273,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) @@ -134283,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') @@ -134293,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 } @@ -134354,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 } } @@ -134379,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)) } } } @@ -134423,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 } @@ -134456,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 { @@ -134465,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 { @@ -134493,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 { @@ -134549,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) @@ -134670,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) @@ -134680,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) @@ -134690,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) @@ -134703,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) @@ -134713,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) @@ -134729,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) @@ -134752,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 @@ -134774,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 @@ -134788,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)) } } @@ -134886,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 } } @@ -134899,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 @@ -136679,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)) } } @@ -136697,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') @@ -136784,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) } @@ -136865,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) } @@ -137035,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) @@ -137983,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 { @@ -138062,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 @@ -138087,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 @@ -138110,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 { @@ -138349,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) } @@ -138422,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)) } } @@ -139548,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 @@ -140741,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)) @@ -140907,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) @@ -140938,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) @@ -141014,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))) } @@ -141057,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 { @@ -141069,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)) } @@ -141189,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}))) @@ -141588,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 @@ -141604,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) } { @@ -141785,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 } @@ -141909,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 @@ -141918,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})) } @@ -141950,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 } } @@ -142004,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 } @@ -142075,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) } @@ -142091,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 { @@ -142350,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))) @@ -142464,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))) { @@ -142623,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))) @@ -142630,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)) @@ -142901,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 } @@ -142932,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))) } @@ -142947,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) @@ -143261,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 @@ -143293,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) } @@ -143325,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 @@ -143389,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 } @@ -143425,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, @@ -143456,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 } } @@ -143488,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) } } @@ -143551,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: ; @@ -143594,7 +144416,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1518 + zText = ts + 1538 __14: ; iCol = 0 @@ -143768,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: @@ -143889,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))) } } } @@ -143913,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 { @@ -143992,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))) @@ -144005,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 { @@ -144640,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 { @@ -144884,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 @@ -144903,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, @@ -144950,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 } @@ -144959,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 { @@ -144973,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 { @@ -144997,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) } @@ -145015,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)) } @@ -145076,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) @@ -145153,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))) } } } @@ -145188,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 @@ -145211,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)) } } @@ -145223,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)) } @@ -145242,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))) } @@ -145289,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) } } @@ -145515,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)) } @@ -145528,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 } @@ -145704,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 @@ -145886,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 } @@ -146088,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 @@ -146305,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{}))) @@ -146317,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)) } } @@ -146328,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 } @@ -146615,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)) @@ -146757,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 } @@ -146765,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 } @@ -146777,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 } @@ -146785,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 } @@ -146793,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 } @@ -146805,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 } @@ -146825,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 } @@ -146837,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 } @@ -146845,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 } @@ -146857,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 } @@ -146865,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 } @@ -146873,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 } @@ -146889,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 } @@ -146921,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 } } @@ -147066,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 } @@ -147083,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 } @@ -147105,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 } @@ -147113,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 } } @@ -147130,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 @@ -147144,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 @@ -147300,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 { @@ -147480,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 @@ -148638,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) @@ -148671,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 @@ -148816,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)) @@ -148844,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 { @@ -149128,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) @@ -149239,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{ @@ -149261,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() { @@ -149802,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 @@ -150112,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 @@ -150178,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 @@ -150198,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 @@ -150219,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 bb161f0e..a9532862 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 -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-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) + 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) { @@ -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) } @@ -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) } @@ -16839,7 +17009,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { 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,34 +17322,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -17188,6 +17379,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +45525,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -45240,18 +45571,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -45624,17 +45955,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -45642,10 +45962,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -45653,11 +45973,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -45665,16 +45984,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -48412,222 +48784,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5846) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5860) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +57803,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+7623) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+7637) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +72445,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14760) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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 + 5041, ts + 16052, - ts + 16057, - ts + 16065, - ts + 16076, - ts + 16079, - ts + 16086, - ts + 16047, - 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) - if !!(isQuick != 0) { - goto __291 + + 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 __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 __293 -__295: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __296 - } - goto __293 -__296: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__297: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __298 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17671, libc.VaList(bp+368, (*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 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __300 -__299: - integrityCheckResultRow(tls, v) -__300: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__298: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __301 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17691, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], - (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__301: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __304 + } + goto __302 +__304: ; - goto __293 -__293: + if !(bStrict != 0) { + goto __305 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __307 + } + goto __302 +__307: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __308 + } + 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 __314 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __315 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __316 +__315: + ; +__316: + ; +__314: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __317 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +89845,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -111586,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 @@ -111857,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 } @@ -111930,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: @@ -111980,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 } @@ -112128,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) @@ -112158,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 { @@ -112173,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 } @@ -112269,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 @@ -112280,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++ { @@ -112291,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) @@ -112364,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 } @@ -112398,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 { @@ -112541,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) @@ -112586,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 { @@ -112703,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) } @@ -112719,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 @@ -112728,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 } @@ -112936,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) @@ -113029,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 { @@ -113099,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 @@ -113109,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 @@ -113141,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 @@ -113278,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 @@ -113323,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 @@ -113431,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 @@ -113442,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 } @@ -113460,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) { @@ -113490,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: @@ -113498,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 @@ -113538,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: ; @@ -113562,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}, {}, } @@ -113685,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) @@ -113704,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 @@ -113716,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) { @@ -113733,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) @@ -113750,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)))) @@ -113784,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) @@ -113891,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)) @@ -113994,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 @@ -114119,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: ; @@ -114166,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)))) @@ -114243,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) @@ -114819,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) @@ -114852,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 @@ -114863,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 @@ -114937,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) @@ -115032,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 } } @@ -115115,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) { @@ -115268,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: @@ -115294,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 } @@ -115323,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) } @@ -115381,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 } @@ -115938,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)) @@ -116049,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) @@ -116355,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) @@ -116370,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 { @@ -116424,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) @@ -116529,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)) } @@ -116574,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 { @@ -116690,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 } @@ -116792,7 +117579,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15301) + jsonWrongNumArgs(tls, ctx, ts+15348) return __2: ; @@ -116867,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: @@ -117002,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)) } @@ -117099,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)) } @@ -117143,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) { @@ -117274,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) { @@ -117293,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 @@ -117389,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) } @@ -117413,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 @@ -117529,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 } @@ -117624,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 { @@ -117661,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 { @@ -117922,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) } @@ -118137,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)) @@ -118840,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 } @@ -119052,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 } @@ -120181,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 { @@ -120193,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)) } } @@ -120239,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 @@ -120424,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)) @@ -120447,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 { @@ -120495,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{ @@ -120538,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) { @@ -120579,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 { @@ -120591,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 @@ -120599,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 @@ -120625,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 { @@ -120661,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 @@ -120669,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)) } } @@ -120723,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: ; @@ -120757,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: @@ -120769,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) { @@ -120792,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 @@ -120803,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: @@ -120853,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: ; @@ -120870,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: ; @@ -120888,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) @@ -120926,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}))) @@ -120943,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 { @@ -121021,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 @@ -121045,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)) } @@ -121064,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)) } } @@ -121078,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) { @@ -121094,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)) } } @@ -121134,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 { @@ -121154,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)) } } } @@ -121171,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 } @@ -121186,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++ { @@ -121215,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) @@ -121244,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) @@ -121258,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) } @@ -121277,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) @@ -121286,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 } @@ -121301,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) @@ -121309,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))) } @@ -121319,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) @@ -121688,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) } @@ -121712,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) } @@ -122630,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 @@ -122639,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++ @@ -122647,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 @@ -122658,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: @@ -122683,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: ; @@ -122872,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 @@ -122882,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 @@ -122890,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 @@ -123002,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 @@ -123132,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})) @@ -123204,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 } @@ -123216,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 @@ -123244,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) @@ -123317,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}))) } } } @@ -123384,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 @@ -123642,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 } @@ -123653,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}))) } @@ -123666,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 @@ -123678,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 } @@ -123754,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 { @@ -123818,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++ { } @@ -123839,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 @@ -123946,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))) } } @@ -123964,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 } @@ -123982,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 } @@ -124000,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 } @@ -124023,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 } @@ -124069,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 @@ -124084,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 { @@ -124124,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 @@ -124134,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 } } @@ -124157,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) @@ -124182,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) @@ -124225,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 } @@ -124241,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 } @@ -124269,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))) } @@ -124324,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 @@ -124364,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 @@ -124372,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: @@ -124396,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) { @@ -124423,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++ @@ -124435,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: @@ -124462,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))) { @@ -124480,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 { @@ -124492,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++ } @@ -124556,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 @@ -124573,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 @@ -124585,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 } } } @@ -124614,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 { @@ -124628,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 } } } @@ -124677,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 } @@ -124701,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 @@ -124724,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))) { @@ -124738,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))) @@ -124748,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)) } } @@ -124776,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)) } } @@ -124832,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))) } } @@ -124869,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 @@ -124974,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 } @@ -124994,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 { @@ -125027,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, @@ -125035,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)) } @@ -125084,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 @@ -125094,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)) } @@ -125147,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 } } @@ -125167,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))) } @@ -125258,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) @@ -125290,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) } @@ -125322,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: @@ -125392,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 } @@ -125446,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)))) == '?' { @@ -125462,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 }())) @@ -125487,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) } } @@ -125546,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 } @@ -125662,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 { @@ -125679,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 @@ -125716,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 || @@ -125815,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 } @@ -125908,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) @@ -125916,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)) } } } @@ -125937,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, @@ -125967,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))) @@ -125983,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 { @@ -126000,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 { @@ -126017,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))) @@ -126037,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) @@ -126069,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 } @@ -126167,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 { @@ -126183,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)) @@ -126199,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) @@ -126233,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 { @@ -126263,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))) { @@ -126280,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) @@ -126310,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 @@ -126324,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) @@ -126353,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 @@ -126371,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 }())) } } @@ -126384,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) @@ -126395,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) } } @@ -126461,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) } } @@ -126488,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++ @@ -126505,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 { @@ -126518,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 } @@ -126619,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)) } } @@ -126636,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)) } } @@ -126656,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 @@ -126674,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 { @@ -126969,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 @@ -126994,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 @@ -127039,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))))) @@ -129850,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 { @@ -129892,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)) @@ -129953,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) } } @@ -130027,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 { @@ -130095,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) } @@ -130107,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 @@ -130459,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: ; @@ -130627,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 } } @@ -130712,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 { @@ -130760,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 { @@ -130771,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)) @@ -130799,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 } @@ -130834,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))) } @@ -131087,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 { @@ -131103,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)) } } } @@ -131176,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)) @@ -131212,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 @@ -131225,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 } @@ -131238,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 } @@ -131301,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)) } } @@ -131822,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) @@ -132556,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 @@ -132844,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 @@ -133031,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 } @@ -133099,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 } @@ -133258,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) { @@ -133281,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 } @@ -133605,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}))}, } @@ -134022,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) @@ -134162,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 @@ -134189,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 } @@ -134207,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 } @@ -134220,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))) @@ -134229,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++ { @@ -134248,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, @@ -134263,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 } @@ -134278,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) @@ -134288,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') @@ -134298,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 } @@ -134359,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 } } @@ -134384,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)) } } } @@ -134428,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 } @@ -134461,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 { @@ -134470,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 { @@ -134498,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 { @@ -134554,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) @@ -134675,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) @@ -134685,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) @@ -134695,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) @@ -134708,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) @@ -134718,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) @@ -134734,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) @@ -134757,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 @@ -134779,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 @@ -134793,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)) } } @@ -134891,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 } } @@ -134904,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 @@ -136684,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)) } } @@ -136702,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') @@ -136789,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) } @@ -136870,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) } @@ -137040,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) @@ -137988,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 { @@ -138067,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 @@ -138092,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 @@ -138115,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 { @@ -138354,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) } @@ -138427,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)) } } @@ -139553,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 @@ -140746,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)) @@ -140912,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) @@ -140943,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) @@ -141019,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))) } @@ -141062,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 { @@ -141074,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)) } @@ -141194,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}))) @@ -141593,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 @@ -141609,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) } { @@ -141790,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 } @@ -141914,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 @@ -141923,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})) } @@ -141955,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 } } @@ -142009,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 } @@ -142080,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) } @@ -142096,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 { @@ -142355,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))) @@ -142469,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))) { @@ -142628,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))) @@ -142635,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)) @@ -142906,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 } @@ -142937,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))) } @@ -142952,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) @@ -143266,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 @@ -143298,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) } @@ -143330,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 @@ -143394,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 } @@ -143430,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, @@ -143461,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 } } @@ -143493,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) } } @@ -143556,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: ; @@ -143599,7 +144421,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1518 + zText = ts + 1538 __14: ; iCol = 0 @@ -143773,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: @@ -143894,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))) } } } @@ -143918,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 { @@ -143997,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))) @@ -144010,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 { @@ -144645,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 { @@ -144889,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 @@ -144908,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, @@ -144955,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 } @@ -144964,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 { @@ -144978,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 { @@ -145002,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) } @@ -145020,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)) } @@ -145081,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) @@ -145158,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))) } } } @@ -145193,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 @@ -145216,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)) } } @@ -145228,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)) } @@ -145247,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))) } @@ -145294,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) } } @@ -145520,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)) } @@ -145533,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 } @@ -145709,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 @@ -145891,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 } @@ -146093,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 @@ -146310,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{}))) @@ -146322,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)) } } @@ -146333,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 } @@ -146620,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)) @@ -146762,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 } @@ -146770,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 } @@ -146782,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 } @@ -146790,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 } @@ -146798,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 } @@ -146810,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 } @@ -146830,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 } @@ -146842,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 } @@ -146850,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 } @@ -146862,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 } @@ -146870,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 } @@ -146878,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 } @@ -146894,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 } @@ -146926,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 } } @@ -147071,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 } @@ -147088,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 } @@ -147110,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 } @@ -147118,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 } } @@ -147135,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 @@ -147149,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 @@ -147305,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 { @@ -147485,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 @@ -148643,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) @@ -148676,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 @@ -148821,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)) @@ -148849,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 { @@ -149133,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) @@ -149244,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{ @@ -149266,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() { @@ -149807,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 @@ -150117,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 @@ -150183,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 @@ -150203,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 @@ -150224,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 3e332481..740fae3a 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 -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-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,34 +63219,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -63088,6 +63276,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +91523,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -91241,18 +91569,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -91625,17 +91953,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -91643,10 +91960,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -91654,11 +91971,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -91666,16 +91982,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -94413,222 +94782,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+7214) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+7228) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +103819,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+8991) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+8997) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+9005) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +118458,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16133) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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) - if !!(isQuick != 0) { - goto __305 + + 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 __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 __307 -__309: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __310 - } - goto __307 -__310: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__311: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __312 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+19056, 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 __313 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __314 -__313: - integrityCheckResultRow(tls, v) -__314: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__312: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __315 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+19076, - 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) -__315: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __318 + } + goto __316 +__318: ; - goto __307 -__307: + if !(bStrict != 0) { + goto __319 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __321 + } + goto __316 +__321: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __322 + } + 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 __328 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __329 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __330 +__329: + ; +__330: + ; +__328: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __331 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +135940,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -157686,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 @@ -157957,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 } @@ -158030,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: @@ -158080,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 } @@ -158228,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) @@ -158258,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 { @@ -158273,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 } @@ -158369,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 @@ -158380,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++ { @@ -158391,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) @@ -158464,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 } @@ -158498,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 { @@ -158641,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) @@ -158686,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 { @@ -158803,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) } @@ -158819,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 @@ -158828,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 } @@ -159036,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) @@ -159129,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 { @@ -159199,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 @@ -159209,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 @@ -159241,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 @@ -159378,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 @@ -159423,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 @@ -159531,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 @@ -159542,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 } @@ -159560,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) { @@ -159590,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: @@ -159598,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 @@ -159638,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: ; @@ -159662,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}, {}, } @@ -159785,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) @@ -159804,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 @@ -159816,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) { @@ -159833,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) @@ -159850,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)))) @@ -159884,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) @@ -159991,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)) @@ -160094,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 @@ -160219,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: ; @@ -160266,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)))) @@ -160343,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) @@ -160919,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) @@ -160952,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 @@ -160963,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 @@ -161037,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) @@ -161132,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 } } @@ -161215,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) { @@ -161368,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: @@ -161394,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 } @@ -161423,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) } @@ -161481,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 } @@ -162038,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)) @@ -162149,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) @@ -162455,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) @@ -162470,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 { @@ -162524,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) @@ -162629,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)) } @@ -162674,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 { @@ -162790,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 } @@ -162892,7 +163676,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+16674) + jsonWrongNumArgs(tls, ctx, ts+16721) return __2: ; @@ -162967,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: @@ -163102,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)) } @@ -163199,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)) } @@ -163243,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) { @@ -163374,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) { @@ -163393,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 @@ -163489,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) } @@ -163513,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 @@ -163629,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 } @@ -163724,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 { @@ -163761,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 { @@ -164022,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) } @@ -164237,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)) @@ -164935,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 } @@ -165147,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 } @@ -166276,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 { @@ -166288,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)) } } @@ -166334,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 @@ -166519,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)) @@ -166542,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 { @@ -166590,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{ @@ -166633,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) { @@ -166674,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 { @@ -166686,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 @@ -166694,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 @@ -166720,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 { @@ -166756,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 @@ -166764,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)) } } @@ -166818,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: ; @@ -166852,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: @@ -166864,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) { @@ -166887,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 @@ -166898,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: @@ -166948,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: ; @@ -166965,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: ; @@ -166983,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) @@ -167021,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}))) @@ -167038,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 { @@ -167116,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 @@ -167140,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)) } @@ -167159,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)) } } @@ -167173,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) { @@ -167189,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)) } } @@ -167229,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 { @@ -167249,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)) } } } @@ -167266,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 } @@ -167281,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++ { @@ -167310,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) @@ -167339,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) @@ -167353,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) } @@ -167372,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) @@ -167381,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 } @@ -167396,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) @@ -167404,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))) } @@ -167414,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) @@ -167783,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) } @@ -167807,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) } @@ -168725,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 @@ -168734,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++ @@ -168742,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 @@ -168753,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: @@ -168778,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: ; @@ -168967,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 @@ -168977,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 @@ -168985,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 @@ -169097,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 @@ -169227,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})) @@ -169299,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 } @@ -169311,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 @@ -169339,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) @@ -169412,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}))) } } } @@ -169479,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 @@ -169737,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 } @@ -169748,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}))) } @@ -169761,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 @@ -169773,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 } @@ -169849,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 { @@ -169913,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++ { } @@ -169934,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 @@ -170041,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))) } } @@ -170059,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 } @@ -170077,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 } @@ -170095,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 } @@ -170118,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 } @@ -170164,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 @@ -170179,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 { @@ -170219,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 @@ -170229,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 } } @@ -170252,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) @@ -170277,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) @@ -170320,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 } @@ -170336,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 } @@ -170364,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))) } @@ -170419,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 @@ -170459,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 @@ -170467,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: @@ -170491,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) { @@ -170518,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++ @@ -170530,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: @@ -170557,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))) { @@ -170575,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 { @@ -170587,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++ } @@ -170651,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 @@ -170668,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 @@ -170680,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 } } } @@ -170709,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 { @@ -170723,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 } } } @@ -170772,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 } @@ -170796,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 @@ -170819,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))) { @@ -170833,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))) @@ -170843,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)) } } @@ -170871,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)) } } @@ -170927,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))) } } @@ -170964,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 @@ -171069,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 } @@ -171089,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 { @@ -171122,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, @@ -171130,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)) } @@ -171179,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 @@ -171189,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)) } @@ -171242,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 } } @@ -171262,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))) } @@ -171353,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) @@ -171385,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) } @@ -171417,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: @@ -171487,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 } @@ -171541,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)))) == '?' { @@ -171557,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 }())) @@ -171582,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) } } @@ -171641,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 } @@ -171757,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 { @@ -171774,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 @@ -171811,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 || @@ -171910,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 } @@ -172003,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) @@ -172011,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)) } } } @@ -172032,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, @@ -172062,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))) @@ -172078,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 { @@ -172095,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 { @@ -172112,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))) @@ -172132,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) @@ -172164,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 } @@ -172262,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 { @@ -172278,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)) @@ -172294,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) @@ -172328,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 { @@ -172358,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))) { @@ -172375,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) @@ -172405,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 @@ -172419,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) @@ -172448,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 @@ -172466,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 }())) } } @@ -172479,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) @@ -172490,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) } } @@ -172556,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) } } @@ -172583,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++ @@ -172600,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 { @@ -172613,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 } @@ -172714,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)) } } @@ -172731,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)) } } @@ -172751,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 @@ -172769,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 { @@ -173064,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 @@ -173089,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 @@ -173134,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))))) @@ -175945,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 { @@ -175987,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)) @@ -176048,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) } } @@ -176122,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 { @@ -176190,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) } @@ -176202,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 @@ -176554,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: ; @@ -176722,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 } } @@ -176807,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 { @@ -176855,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 { @@ -176866,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)) @@ -176894,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 } @@ -176929,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))) } @@ -177182,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 { @@ -177198,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)) } } } @@ -177271,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)) @@ -177307,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 @@ -177320,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 } @@ -177333,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 } @@ -177396,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)) } } @@ -177917,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) @@ -178651,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 @@ -178939,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 @@ -179126,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 } @@ -179194,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 } @@ -179353,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) { @@ -179376,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 } @@ -179700,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}))}, } @@ -180117,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) @@ -180257,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 @@ -180284,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 } @@ -180302,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 } @@ -180315,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))) @@ -180324,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++ { @@ -180343,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, @@ -180358,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 } @@ -180373,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) @@ -180383,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') @@ -180393,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 } @@ -180454,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 } } @@ -180479,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)) } } } @@ -180523,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 } @@ -180556,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 { @@ -180565,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 { @@ -180593,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 { @@ -180649,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) @@ -180770,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) @@ -180780,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) @@ -180790,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) @@ -180803,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) @@ -180813,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) @@ -180829,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) @@ -180852,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 @@ -180874,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 @@ -180888,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)) } } @@ -180986,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 } } @@ -180999,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 @@ -182779,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)) } } @@ -182797,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') @@ -182884,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) } @@ -182965,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) } @@ -183135,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) @@ -184083,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 { @@ -184162,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 @@ -184187,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 @@ -184210,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 { @@ -184449,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) } @@ -184522,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)) } } @@ -185648,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 @@ -186841,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)) @@ -187007,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) @@ -187038,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) @@ -187114,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))) } @@ -187157,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 { @@ -187169,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)) } @@ -187289,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}))) @@ -187688,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 @@ -187704,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) } { @@ -187885,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 } @@ -188009,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 @@ -188018,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})) } @@ -188050,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 } } @@ -188104,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 } @@ -188175,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) } @@ -188191,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 { @@ -188450,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))) @@ -188564,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))) { @@ -188723,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))) @@ -188730,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)) @@ -189001,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 } @@ -189032,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))) } @@ -189047,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) @@ -189361,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 @@ -189393,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) } @@ -189425,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 @@ -189489,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 } @@ -189525,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, @@ -189556,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 } } @@ -189588,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) } } @@ -189651,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: ; @@ -189694,7 +190513,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1524 + zText = ts + 1544 __14: ; iCol = 0 @@ -189868,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: @@ -189989,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))) } } } @@ -190013,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 { @@ -190092,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))) @@ -190105,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 { @@ -190740,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 { @@ -190984,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 @@ -191003,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, @@ -191050,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 } @@ -191059,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 { @@ -191073,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 { @@ -191097,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) } @@ -191115,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)) } @@ -191176,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) @@ -191253,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))) } } } @@ -191288,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 @@ -191311,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)) } } @@ -191323,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)) } @@ -191342,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))) } @@ -191389,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) } } @@ -191615,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)) } @@ -191628,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 } @@ -191804,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 @@ -191986,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 } @@ -192188,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 @@ -192405,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{}))) @@ -192417,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)) } } @@ -192428,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 } @@ -192715,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)) @@ -192857,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 } @@ -192865,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 } @@ -192877,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 } @@ -192885,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 } @@ -192893,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 } @@ -192905,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 } @@ -192925,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 } @@ -192937,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 } @@ -192945,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 } @@ -192957,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 } @@ -192965,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 } @@ -192973,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 } @@ -192989,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 } @@ -193021,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 } } @@ -193166,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 } @@ -193183,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 } @@ -193205,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 } @@ -193213,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 } } @@ -193230,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 @@ -193244,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 @@ -193400,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 { @@ -193580,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 @@ -194738,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) @@ -194771,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 @@ -194916,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)) @@ -194944,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 { @@ -195228,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) @@ -195339,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{ @@ -195361,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() { @@ -195926,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 @@ -196199,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 @@ -196265,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 @@ -196285,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 @@ -196412,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 3e332481..740fae3a 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 -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-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,34 +63219,55 @@ 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 (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ - } - } else { - if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } - - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock @@ -63088,6 +63276,30 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { 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-- + } + } else { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- + } + (*MemStore)(unsafe.Pointer(p)).FnRdLock-- + } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + memdbLeave(tls, p) + return SQLITE_OK +} + func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -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 + goto __23 } - return Xsqlite3CorruptError(tls, 68453) -__22: + return Xsqlite3CorruptError(tls, 69731) +__23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { - goto __23 - } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp -__23: - ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + 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 - - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break - - } - fallthrough - case OP_VFilter: - { - var n int32 - - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } - - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break - - } - } - - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__1: + if !(1 != 0) { + goto __2 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 } + + 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 + +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0x40) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 7, 0x80) + goto __4 + +__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 + +__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 + } + + (*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 pTabCur uintptr - var pC25 uintptr - var nCellKey I64 - var pCur1 uintptr + var pCrsr7 uintptr var pC26 uintptr + var pTabCur uintptr + + var pC27 uintptr + var nCellKey I64 + var pCur2 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 - } - goto __265 -__266: - rB = rB + rA - goto __265 -__267: - rB = rB - rA - goto __265 -__268: - rB = rB * rA - goto __265 -__269: - if !(rA == float64(0)) { + default: goto __271 } - goto arithmetic_result_is_null -__271: - ; - rB = rB / rA - goto __265 - + goto __266 +__267: + rB = rB + rA + goto __266 +__268: + rB = rB - rA + goto __266 +__269: + rB = rB * rA + goto __266 __270: - iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) - if !(iA == int64(0)) { + if !(rA == float64(0)) { goto __272 } goto arithmetic_result_is_null __272: ; - if !(iA == int64(-1)) { + rB = rB / rA + goto __266 + +__271: + iA = Xsqlite3VdbeIntValue(tls, pIn1) + *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) + if !(iA == int64(0)) { goto __273 } - iA = int64(1) + goto arithmetic_result_is_null __273: ; - rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 - -__265: - ; - if !(Xsqlite3IsNaN(tls, rB) != 0) { + if !(iA == int64(-1)) { goto __274 } - goto arithmetic_result_is_null + iA = int64(1) __274: + ; + rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) + goto __266 + +__266: + ; + if !(Xsqlite3IsNaN(tls, rB) != 0) { + goto __275 + } + goto arithmetic_result_is_null +__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) +__288: + ; __287: ; -__286: - ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: + ; +__282: ; __281: ; -__280: - ; -__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,39 +91523,39 @@ __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: + ; +__290: ; __289: ; -__288: - ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 __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 @@ -91241,18 +91569,18 @@ __47: } return 0 }() - if !(rc != 0) { - goto __293 - } - goto abort_due_to_error -__293: - ; - rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __294 } goto abort_due_to_error __294: + ; + rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) + if !(rc != 0) { + goto __295 + } + goto abort_due_to_error +__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 jump_to_p2 -__298: - ; - iCompare = +1 - goto __297 -__296: - if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __299 } - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 - } goto jump_to_p2 -__301: - ; - iCompare = -1 - goto __300 __299: - if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { + ; + iCompare = +1 + goto __298 +__297: + if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { + goto __300 + } + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __302 } goto jump_to_p2 __302: ; - iCompare = 0 + iCompare = -1 + goto __301 __300: - ; -__297: - ; - goto __8 -__295: - ; - if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __303 } + goto jump_to_p2 +__303: + ; + iCompare = 0 +__301: + ; +__298: + ; + goto __8 +__296: + ; + if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { + 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: - ; - if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 - } - applyNumericAffinity(tls, pIn3, 0) __314: ; -__312: - ; - goto __311 -__310: - if !(int32(affinity) == SQLITE_AFF_TEXT) { + if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __315 } - if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + applyNumericAffinity(tls, pIn3, 0) +__315: + ; +__313: + ; + goto __312 +__311: + if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __316 } + if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { + 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) +__318: + ; __317: ; -__316: - ; 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 - } - iCompare = -iCompare -__331: - ; - if !(bRev != 0) { goto __332 } iCompare = -iCompare __332: ; - goto __329 -__330: + if !(bRev != 0) { + goto __333 + } + iCompare = -iCompare +__333: + ; + 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: - ; - pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 + goto __337 __336: ; -__334: + pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 +__337: + ; +__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 jump_to_p2 -__346: - ; - *(*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: - if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __347 } goto jump_to_p2 __347: ; + *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) + goto __346 __345: + if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { + goto __348 + } + + goto jump_to_p2 +__348: + ; +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -91625,17 +91953,6 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 - } - goto jump_to_p2 -__348: - ; - goto __8 - -__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 jump_to_p2 @@ -91643,10 +91960,10 @@ __349: ; goto __8 -__66: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 +__65: + c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { + if !(c1 != 0) { goto __350 } goto jump_to_p2 @@ -91654,11 +91971,10 @@ __350: ; goto __8 -__67: +__66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) - if !(doTheJump != 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __351 } goto jump_to_p2 @@ -91666,16 +91982,66 @@ __351: ; goto __8 +__67: + ; + 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 !((*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 +__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: - ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 - } - - 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 - } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor - p22 = iMap - U32(1) - goto op_column_restart -__370: - ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) - if !(rc != 0) { - goto __371 - } - goto abort_due_to_error -__371: - ; - goto __369 -__368: - if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 - } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) - if !(rc != 0) { - goto __373 - } - goto abort_due_to_error -__373: - ; - goto op_column_restart -__372: - ; -__369: - ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) - -__365: - ; - (*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(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(pC1)).FnHdrParsed = U16(0) - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 - } - - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) - - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 - } - goto op_column_corrupt -__378: - ; - goto __377 __376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow - - goto op_column_read_header -__377: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 + } + + 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 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor + p22 = iMap - U32(1) + goto op_column_restart +__379: + ; + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { goto __380 } goto abort_due_to_error __380: ; - goto op_column_restart -__379: - ; -__363: - ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { + goto __378 +__377: + if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { goto __381 } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 - } - - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 - } - libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) - if !(rc != SQLITE_OK) { - goto __387 + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __382 } goto abort_due_to_error +__382: + ; + goto op_column_restart +__381: + ; +__378: + ; + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) + +__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(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(pC3)).FnHdrParsed = U16(0) + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 + } + + (*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(pC3)).FpayloadSize) { + goto __387 + } + goto op_column_corrupt __387: ; - zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz goto __386 __385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + + goto op_column_read_header __386: ; + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 + } + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) + if !(rc != 0) { + goto __389 + } + goto abort_due_to_error +__389: + ; + goto op_column_restart +__388: + ; +__372: + ; + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 + } + + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 + } + + 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(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + if !(rc != SQLITE_OK) { + goto __396 + } + goto abort_due_to_error +__396: + ; + zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz + 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: - ; -__467: - ; -__465: - ; -__461: - ; - goto __457 -__456: - if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 - } - nHdr++ - nData = nData + uint64(8) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: - ; - 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 - } - serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) - if !(nData != 0) { - goto __477 - } - if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 - } - goto no_mem -__479: - ; - len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __478: ; __476: ; - nData = nData + U64(len1) - nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) - (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__474: ; -__457: +__470: ; -__453: - ; - if !(pRec == pData0) { - goto __480 - } - goto __451 -__480: - ; - pRec -= 56 - goto __450 -__450: - if 1 != 0 { - goto __449 - } - goto __451 -__451: - ; - if !(nHdr <= 126) { - goto __481 - } - - nHdr = nHdr + 1 - goto __482 -__481: - nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) - nHdr = nHdr + nVarint - if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __466 +__465: + if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __483 } nHdr++ + nData = nData + uint64(8) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) + goto __484 __483: ; -__482: - ; - nByte1 = I64(U64(nHdr) + nData) - - if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + 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 __485 } - - (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: - if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) + if !(nData != 0) { goto __486 } - goto too_big -__486: - ; - if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { + goto __488 } goto no_mem +__488: + ; + len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) + goto __487 +__486: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __487: ; __485: + ; + nData = nData + U64(len1) + nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) + (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type +__484: + ; +__466: + ; +__462: + ; + if !(pRec == pData0) { + goto __489 + } + goto __460 +__489: + ; + pRec -= 56 + goto __459 +__459: + if 1 != 0 { + goto __458 + } + goto __460 +__460: + ; + if !(nHdr <= 126) { + goto __490 + } + + nHdr = nHdr + 1 + goto __491 +__490: + nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) + nHdr = nHdr + nVarint + if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { + goto __492 + } + nHdr++ +__492: + ; +__491: + ; + nByte1 = I64(U64(nHdr) + nData) + + if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { + goto __493 + } + + (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc + goto __494 +__493: + if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { + goto __495 + } + goto too_big +__495: + ; + if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { + goto __496 + } + goto no_mem +__496: + ; +__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: - ; - goto __494 -__493: - if !(serial_type < U32(0x80)) { - goto __502 - } - *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) - if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 - } - - libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) - zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__505: ; goto __503 __502: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) - if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + if !(serial_type < U32(0x80)) { + goto __511 + } + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) + if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__513: + ; + goto __512 +__511: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) + if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { + goto __514 + } + + libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) + zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) +__514: + ; +__512: ; __503: ; -__494: - ; 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 abort_due_to_error -__536: - ; - goto __534 -__534: - ii++ - goto __533 - goto __535 -__535: - ; - goto __532 -__531: - ; - isSchemaChange = 0 -__532: - ; - ii = 0 -__537: - if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 - } - rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) - if !(rc != SQLITE_OK) { - goto __540 - } - goto abort_due_to_error -__540: - ; - goto __538 -__538: - ii++ - goto __537 - goto __539 -__539: - ; - if !(isSchemaChange != 0) { - goto __541 - } - Xsqlite3ExpirePreparedStatements(tls, db, 0) - Xsqlite3ResetAllSchemasOfConnection(tls, db) - *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: - ; -__526: - ; - if !(rc != 0) { - goto __542 - } - goto abort_due_to_error -__542: - ; -__543: - if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 - } - 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: - ; - if !(p12 == SAVEPOINT_RELEASE) { goto __545 } - - (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - Xsqlite3DbFree(tls, db, pSavepoint) - if !!(isTransaction != 0) { - goto __547 - } - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: - ; - goto __546 + goto abort_due_to_error __545: ; - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons - (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: + goto __543 +__543: + ii++ + goto __542 + goto __544 +__544: ; - if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __541 +__540: + ; + isSchemaChange = 0 +__541: + ; + ii = 0 +__546: + if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __548 } - rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __549 } goto abort_due_to_error __549: ; + goto __547 +__547: + ii++ + goto __546 + goto __548 __548: ; -__524: - ; -__522: - ; -__511: - ; - if !(rc != 0) { + if !(isSchemaChange != 0) { goto __550 } - goto abort_due_to_error + Xsqlite3ExpirePreparedStatements(tls, db, 0) + Xsqlite3ResetAllSchemasOfConnection(tls, db) + *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __550: ; - if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { +__535: + ; + if !(rc != 0) { goto __551 } + goto abort_due_to_error +__551: + ; +__552: + if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { + 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 __552 +__553: + ; + if !(p12 == SAVEPOINT_RELEASE) { + goto __554 + } + + (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + Xsqlite3DbFree(tls, db, pSavepoint) + if !!(isTransaction != 0) { + goto __556 + } + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- +__556: + ; + goto __555 +__554: + ; + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons +__555: + ; + if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { + goto __557 + } + rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) + if !(rc != SQLITE_OK) { + goto __558 + } + goto abort_due_to_error +__558: + ; +__557: + ; +__533: + ; +__531: + ; +__520: + ; + if !(rc != 0) { + goto __559 + } + goto abort_due_to_error +__559: + ; + if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { + 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++ +__628: + ; +__627: + ; +__625: + ; __619: ; -__618: - ; -__616: - ; -__610: - ; - 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: - ; -__608: - ; - if !(oc >= OP_SeekGE) { - goto __624 - } - if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __628 - } - if !(rc == SQLITE_DONE) { - goto __629 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: - goto abort_due_to_error -__630: - ; -__628: - ; - goto __627 -__626: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: - ; - goto __625 -__624: - ; - if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 - } - *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) - if !(rc != SQLITE_OK) { - goto __633 - } - if !(rc == SQLITE_DONE) { - goto __634 - } - rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: - goto abort_due_to_error -__635: - ; -__633: - ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __632: ; -__625: +__617: + ; + if !(oc >= OP_SeekGE) { + goto __633 + } + if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { + goto __635 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __637 + } + if !(rc == SQLITE_DONE) { + goto __638 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __639 +__638: + goto abort_due_to_error +__639: + ; +__637: + ; + goto __636 +__635: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__636: + ; + goto __634 +__633: + ; + if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { + goto __640 + } + *(*int32)(unsafe.Pointer(bp + 320)) = 0 + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) + if !(rc != SQLITE_OK) { + goto __642 + } + if !(rc == SQLITE_DONE) { + goto __643 + } + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 320)) = 1 + goto __644 +__643: + goto abort_due_to_error +__644: + ; +__642: + ; + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: + ; +__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 abort_due_to_error -__720: - ; - if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 - } - if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 - } - goto no_mem -__722: - ; -__721: - ; - goto __8 - -__114: - pOut = out2Prerelease(tls, p, pOp) - - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 - } - (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 - } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 - } - - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab - pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - - rc = (*struct { - f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) - Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - goto __728 -__727: - ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) - if !(rc != 0) { + if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __730 } - goto abort_due_to_error + if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { + goto __731 + } + goto no_mem +__731: + ; __730: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + goto __8 + +__114: + pOut = out2Prerelease(tls, p, pOp) + + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 + } + *(*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(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(pC17 + 48)), bp+584) + Xsqlite3VtabImportErrmsg(tls, p, pVtab) + if !(rc != 0) { + goto __738 + } + goto abort_due_to_error +__738: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + goto __737 +__736: ; -__726: + rc = Xsqlite3VdbeCursorRestore(tls, pC17) + if !(rc != 0) { + goto __739 + } + goto abort_due_to_error +__739: ; -__724: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 + } + (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) + goto __8 +__740: + ; + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: + ; +__735: + ; +__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 @@ -94413,222 +94782,222 @@ __120: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ __121: - ; - pC19 = *(*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 - } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: - ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) - - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: - ; - if !(rc != 0) { - goto __746 - } - goto abort_due_to_error -__746: - ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) - - if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 - } - goto jump_to_p2 -__747: - ; - goto __8 - -__122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) - goto next_tail - -__123: - ; - pC20 = *(*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) - goto next_tail - -__124: - ; - pC20 = *(*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) - -next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) - - if !(rc == SQLITE_OK) { - goto __748 - } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) - *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ - goto jump_to_p2_and_check_for_interrupt -__748: - ; - if !(rc != SQLITE_DONE) { - goto __749 - } - goto abort_due_to_error -__749: - ; - rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) - goto check_for_interrupt - -__125: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 - } - (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: - ; - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { - goto __751 - } - goto abort_due_to_error -__751: - ; - (*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, - int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), - func() int32 { - if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult - } - return 0 - }()) - - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) - if !(rc != 0) { - goto __752 - } - goto abort_due_to_error -__752: - ; - goto __8 - -__126: - ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - - rc = func() int32 { - if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { - return Xsqlite3VdbeMemExpandBlob(tls, pIn2) - } - return 0 - }() - if !(rc != 0) { + *(*int32)(unsafe.Pointer(bp + 600)) = 1 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { goto __753 } - goto abort_due_to_error + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 __753: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) - if !(rc != 0) { - goto __754 - } - goto abort_due_to_error + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) + + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) __754: ; - goto __8 - -__127: - ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) - - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).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 abort_due_to_error __755: ; - if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + + if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { goto __756 } - rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) - if !(rc != 0) { + goto jump_to_p2 +__756: + ; + goto __8 + +__122: + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) + goto next_tail + +__123: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + goto next_tail + +__124: + ; + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + +next_tail: + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) + + if !(rc == SQLITE_OK) { + goto __757 + } + (*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 +__757: + ; + if !(rc != SQLITE_DONE) { goto __758 } goto abort_due_to_error __758: ; - goto __757 -__756: - if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + rc = SQLITE_OK + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) + goto check_for_interrupt + +__125: + ; + 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 __759 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+7214) - goto abort_due_to_error + (*Vdbe)(unsafe.Pointer(p)).FnChange++ __759: ; -__757: - ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 - goto __8 - -__128: -__129: - ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - - rc = Xsqlite3VdbeCursorRestore(tls, pC24) - - if !(rc != SQLITE_OK) { + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { goto __760 } goto abort_due_to_error __760: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { + (*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(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(pC23)).FseekResult + } + return 0 + }()) + + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) + if !(rc != 0) { goto __761 } - *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) - if !(rc != SQLITE_OK) { + goto abort_due_to_error +__761: + ; + goto __8 + +__126: + ; + 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 + + rc = func() int32 { + if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { + return Xsqlite3VdbeMemExpandBlob(tls, pIn2) + } + return 0 + }() + if !(rc != 0) { + goto __762 + } + goto abort_due_to_error +__762: + ; + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) + if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + goto __8 + +__127: + ; + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) + + (*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 __764 } + goto abort_due_to_error +__764: + ; + if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { + goto __765 + } + rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) + if !(rc != 0) { + goto __767 + } + goto abort_due_to_error +__767: + ; + goto __766 +__765: + if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { + goto __768 + } + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+7228) + goto abort_due_to_error +__768: + ; +__766: + ; + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 + goto __8 + +__128: +__129: + ; + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + rc = Xsqlite3VdbeCursorRestore(tls, pC26) + + if !(rc != SQLITE_OK) { + goto __769 + } + goto abort_due_to_error +__769: + ; + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 + } + *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) + if !(rc != SQLITE_OK) { + goto __772 + } + goto abort_due_to_error +__772: + ; + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { + 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 + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: + if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { + goto __833 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: - if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 - } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + 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: - ; - if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 - } - if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 - } - goto __8 -__939: - ; - i10 = 1 -__940: - if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 - } - if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 - } - (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: - ; - goto __941 -__941: - i10++ - goto __940 - goto __942 __942: + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { + goto __947 + } + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { + goto __948 + } + goto __8 +__948: + ; + i10 = 1 +__949: + if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { + goto __951 + } + if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { + goto __952 + } + (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 +__952: + ; + goto __950 +__950: + i10++ + 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,15 +103819,15 @@ 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 { - return 1 - } - if Xsqlite3StrICmp(tls, z, ts+8991) == 0 { - return 1 - } if Xsqlite3StrICmp(tls, z, ts+8997) == 0 { return 1 } + if Xsqlite3StrICmp(tls, z, ts+9005) == 0 { + return 1 + } + 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 - case TK_COLUMN: - goto __5 - case TK_INTEGER: goto __6 - case TK_TRUEFALSE: + case TK_COLUMN: goto __7 - case TK_FLOAT: + case TK_INTEGER: goto __8 - case TK_STRING: + case TK_TRUEFALSE: goto __9 - default: + case TK_FLOAT: goto __10 - case TK_BLOB: + case TK_STRING: goto __11 - case TK_VARIABLE: + default: goto __12 - case TK_REGISTER: + case TK_BLOB: goto __13 - case TK_CAST: + case TK_VARIABLE: goto __14 - case TK_IS: + case TK_REGISTER: goto __15 - case TK_ISNOT: + case TK_CAST: goto __16 + case TK_IS: + goto __17 + case TK_ISNOT: + goto __18 case TK_LT: - goto __17 - case TK_LE: - goto __18 - case TK_GT: goto __19 - case TK_GE: + case TK_LE: goto __20 - case TK_NE: + case TK_GT: goto __21 - case TK_EQ: + case TK_GE: goto __22 - case TK_AND: + case TK_NE: goto __23 - case TK_OR: + case TK_EQ: goto __24 - case TK_PLUS: + case TK_AND: goto __25 - case TK_STAR: + case TK_OR: goto __26 - case TK_MINUS: + case TK_PLUS: goto __27 - case TK_REM: + case TK_STAR: goto __28 - case TK_BITAND: + case TK_MINUS: goto __29 - case TK_BITOR: + case TK_REM: goto __30 - case TK_SLASH: + case TK_BITAND: goto __31 - case TK_LSHIFT: + case TK_BITOR: goto __32 - case TK_RSHIFT: + case TK_SLASH: goto __33 - case TK_CONCAT: + case TK_LSHIFT: goto __34 - case TK_UMINUS: + case TK_RSHIFT: goto __35 - case TK_BITNOT: + case TK_CONCAT: goto __36 - case TK_NOT: + case TK_UMINUS: goto __37 - case TK_TRUTH: + case TK_BITNOT: goto __38 - case TK_ISNULL: + case TK_NOT: goto __39 - case TK_NOTNULL: + case TK_TRUTH: goto __40 - case TK_AGG_FUNCTION: + case TK_ISNULL: goto __41 - case TK_FUNCTION: + case TK_NOTNULL: goto __42 - case TK_EXISTS: + case TK_AGG_FUNCTION: goto __43 - case TK_SELECT: + case TK_FUNCTION: goto __44 - case TK_SELECT_COLUMN: + case TK_EXISTS: goto __45 - case TK_IN: + case TK_SELECT: goto __46 + case TK_SELECT_COLUMN: + goto __47 + case TK_IN: + goto __48 case TK_BETWEEN: - goto __47 - case TK_COLLATE: - goto __48 - case TK_SPAN: goto __49 - case TK_UPLUS: + case TK_COLLATE: goto __50 - - case TK_TRIGGER: + case TK_SPAN: goto __51 - - case TK_VECTOR: + case TK_UPLUS: goto __52 - case TK_IF_NULL_ROW: + case TK_TRIGGER: goto __53 - case TK_CASE: + case TK_VECTOR: goto __54 - case TK_RAISE: + + case TK_IF_NULL_ROW: goto __55 + + case TK_CASE: + goto __56 + case TK_RAISE: + 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 __60 -__59: - ; - if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) + + goto __62 __61: + if !(pTab != uintptr(0)) { + goto __63 + } + + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { + goto __64 + } + Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) +__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: - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) - return target - -__8: - ; - codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) - return target - __9: - ; - Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __10: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __11: + ; + Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) + return target + +__12: + ; + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) + return target + +__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) - } - } + Xsqlite3VdbeUsesBtree(tls, v, iDb) + pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema + Xsqlite3VdbeAddOp4Int(tls, v, + OP_Transaction, + iDb, + libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(1)<= (*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,237 +118458,242 @@ __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 - } - Xsqlite3MultiWrite(tls, pParse) -__26: - ; - if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } - Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) + Xsqlite3MultiWrite(tls, pParse) __27: ; - if !(memCnt != 0) { + if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __28 } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) + Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __28: ; - if !(pPk != 0) { + if !(memCnt != 0) { goto __29 } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) +__29: + ; + if !(pPk != 0) { + 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 - } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: - ; - if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __38: ; - if !(addrEphOpen != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __39 } - Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) + *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __39: ; - addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: - if !(pPk != 0) { + if !(addrEphOpen != 0) { goto __40 } + Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) +__40: + ; + addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) + goto __36 +__35: + if !(pPk != 0) { + goto __41 + } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) 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 - } - Xsqlite3AutoincrementEnd(tls, pParse) -__60: - ; - if !(memCnt != 0) { goto __61 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16133) + Xsqlite3AutoincrementEnd(tls, pParse) __61: ; + if !(memCnt != 0) { + goto __62 + } + 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 - } - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } - - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: - ; - if !(ipkColumn >= 0) { + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __101 } - if !(useTempTable != 0) { - goto __103 - } - Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: - if !(pSelect != 0) { - goto __105 + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) +__101: + ; + if !(ipkColumn >= 0) { + goto __102 } - goto __106 -__105: + if !(useTempTable != 0) { + goto __104 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) + goto __105 +__104: + if !(pSelect != 0) { + goto __106 + } + + 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: - ; -__99: - ; - if !(regRowCount != 0) { - goto __117 - } - Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; +__100: + ; + if !(regRowCount != 0) { + goto __119 + } + Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) +__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) - if !!(isQuick != 0) { - goto __305 + + 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 __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 __307 -__309: - ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { - goto __310 - } - goto __307 -__310: - ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 - } - 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 - } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__311: - ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __312 - } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+19056, 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 __313 - } - Xsqlite3VdbeGoto(tls, v, doError) - goto __314 -__313: - integrityCheckResultRow(tls, v) -__314: - ; - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__312: - ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { - goto __315 - } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+19076, - 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) -__315: + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __318 + } + goto __316 +__318: ; - goto __307 -__307: + if !(bStrict != 0) { + goto __319 + } + 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 !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { + goto __321 + } + goto __316 +__321: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __322 + } + 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 __328 + } + + 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, zErr1, -6) + if !(doTypeCheck != 0) { + goto __329 + } + Xsqlite3VdbeGoto(tls, v, labelError) + Xsqlite3VdbeJumpHere(tls, v, jmp2) + goto __330 +__329: + ; +__330: + ; +__328: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __331 + } + 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])) + + 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, 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: + ; + 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: ; - Xsqlite3VtabUnlockList(tls, db) - - if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { + 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 __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: - ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) -__10: - ; - if !(pzTail != 0) { - goto __14 - } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) __14: ; - if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { + goto __11 +__10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: + ; + if !(pzTail != 0) { goto __15 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail __15: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __16 } + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) +__16: + ; + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + 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 - } - schemaIsValid(tls, bp+16) -__19: - ; - if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) + schemaIsValid(tls, bp+16) __20: + ; + if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { + goto __21 + } + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) +__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: ; - computeLimitRegisters(tls, pParse, p, iEnd) - if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { + 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 __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,53 +135940,53 @@ __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 select_end -__66: - ; - if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __67 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) + goto select_end __67: ; - if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { + if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { goto __68 } - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __68: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { goto __69 } + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) +__69: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { + 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 - } - (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: - ; -__69: - ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __71 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) __71: ; - if !(pWin != 0) { +__70: + ; + if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { goto __72 } + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) +__72: + ; + if !(pWin != 0) { + goto __73 + } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) iBreak = 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: - if !(k > 0) { - goto __81 - } - *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 __80: - k-- - pItem2 += 32 - goto __79 - goto __81 -__81: - ; - if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { + if !(k > 0) { goto __82 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) + *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) + goto __81 +__81: + k-- + pItem2 += 32 + goto __80 + goto __82 __82: ; - if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { + if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { goto __83 } + (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) +__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 __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: - ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 - } - orderByGrp = 1 + ii1++ + goto __85 + goto __87 __87: ; -__83: + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { + goto __88 + } + orderByGrp = 1 +__88: ; - goto __75 -__74: +__84: + ; + 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 - } - if !(groupBySort != 0) { goto __118 } + if !(groupBySort != 0) { + 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 - } - pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: - ; - if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { goto __126 } + pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) +__126: + ; + if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { + 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 - } - fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: - ; -__143: - ; - if !(regAcc != 0) { goto __145 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) + fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) __145: ; - if !(minMaxFlag != 0) { +__144: + ; + if !(regAcc != 0) { goto __146 } - Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) __146: + ; + if !(minMaxFlag != 0) { + goto __147 + } + Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) +__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: - ; - nConstraint1++ -__86: - ; -__79: - ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) __88: ; - if !(nConstraint1 != 0) { + nConstraint1++ +__87: + ; +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __89 } - if !(regBignull != 0) { + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { goto __90 } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: + ; + if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { + goto __91 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) +__91: + ; + if !(nConstraint1 != 0) { + goto __92 + } + if !(regBignull != 0) { + 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)) +__101: + ; +__100: + ; __98: ; -__97: - ; -__95: - ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 - } - - 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 } + + if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { + goto __107 + } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) +__107: + ; + goto __106 __105: ; - goto __103 -__102: - ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: - if !(bRev != 0) { goto __108 } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) goto __109 __108: + if !(bRev != 0) { + goto __110 + } + (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) + 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 - } - (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: - ; -__111: - ; - if !(omitTable != 0) { goto __112 } - pIdx = uintptr(0) + (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) + goto __113 __112: ; +__113: + ; + if !(omitTable != 0) { + goto __114 + } + pIdx = uintptr(0) +__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 - } - nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) - if !(pOrTab == uintptr(0)) { goto __117 } + nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + if !(pOrTab == uintptr(0)) { + 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 __126 -__128: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 - } - goto __126 -__129: - ; - if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { goto __130 } - goto __126 + goto __128 __130: ; - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { goto __131 } - goto __126 + goto __128 __131: + ; + if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { + goto __132 + } + goto __128 +__132: + ; + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { + goto __133 + } + 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 __164 - goto __170 -__169: - 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 __164 + + goto __166 goto __172 __171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) - if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && + !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { goto __173 } - - goto __164 + goto __166 + goto __174 __173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) + if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { + goto __175 + } + + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 - } - iNext = 2 - goto __164 -__174: - ; - if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 - } - if !(iNext == 0) { goto __176 } - iNext = 3 + iNext = 2 + goto __166 __176: ; - goto __164 -__175: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { goto __177 } - - goto __164 + if !(iNext == 0) { + goto __178 + } + iNext = 3 +__178: + ; + goto __166 __177: + ; + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { + goto __179 + } + + 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 - } - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 - } - goto __180 -__182: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __183 } - goto __180 -__183: - ; - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __184 } - goto __180 + goto __182 __184: ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { goto __185 } - goto __180 + goto __182 __185: ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { goto __186 } - goto __180 + goto __182 __186: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { + goto __187 + } + goto __182 +__187: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { + goto __188 + } + 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 - } - - if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 - } - goto __200 -__202: - ; - if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { goto __203 } - goto __200 -__203: - ; - if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { goto __204 } - goto __200 + goto __202 __204: + ; + if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { + goto __205 + } + + goto __202 +__205: + ; + if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { + goto __206 + } + 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 +__23: + ; __22: ; -__21: +__20: ; -__19: - ; -__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 whereBeginError -__24: - ; - if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { goto __25 } + goto whereBeginError +__25: + ; + if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { + 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 whereBeginError -__28: - ; -__25: - ; - wherePathSolver(tls, pWInfo, int16(0)) - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __29 } goto whereBeginError __29: ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { +__26: + ; + wherePathSolver(tls, pWInfo, int16(0)) + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __30 } + goto whereBeginError +__30: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { + goto __31 + } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 - } - goto whereBeginError -__31: - ; -__30: - ; -__23: - ; - if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __32 } - (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) + goto whereBeginError __32: ; - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { +__31: + ; +__24: + ; + if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { goto __33 } - goto whereBeginError + (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) __33: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __34 + } + goto whereBeginError +__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 - } - whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: - ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) - - if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { goto __36 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + whereCheckIfBloomFilterIsUseful(tls, pWInfo) +__36: + ; + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + + if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { + goto __37 + } + 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 - } - if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { goto __39 } + if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { + 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: - if !(b != 0) { - goto __55 - } - goto __54 __54: - b = b >> 1 - n++ - goto __53 + if !(b != 0) { + goto __56 + } 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) +__81: + ; __79: ; -__77: - ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 - } - constructAutomaticIndex(tls, pParse, pWInfo+120, - pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: - sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: - ; - if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __83 } - goto whereBeginError + constructAutomaticIndex(tls, pParse, pWInfo+104, + pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) + goto __84 __83: + sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) +__84: ; -__80: + if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { + goto __85 + } + goto whereBeginError +__85: + ; +__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) @@ -157686,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 @@ -157957,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 } @@ -158030,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: @@ -158080,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 } @@ -158228,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) @@ -158258,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 { @@ -158273,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 } @@ -158369,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 @@ -158380,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++ { @@ -158391,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) @@ -158464,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 } @@ -158498,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 { @@ -158641,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) @@ -158686,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 { @@ -158803,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) } @@ -158819,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 @@ -158828,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 } @@ -159036,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) @@ -159129,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 { @@ -159199,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 @@ -159209,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 @@ -159241,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 @@ -159378,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 @@ -159423,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 @@ -159531,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 @@ -159542,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 } @@ -159560,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) { @@ -159590,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: @@ -159598,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 @@ -159638,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: ; @@ -159662,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}, {}, } @@ -159785,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) @@ -159804,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 @@ -159816,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) { @@ -159833,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) @@ -159850,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)))) @@ -159884,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) @@ -159991,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)) @@ -160094,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 @@ -160219,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: ; @@ -160266,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)))) @@ -160343,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) @@ -160919,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) @@ -160952,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 @@ -160963,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 @@ -161037,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) @@ -161132,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 } } @@ -161215,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) { @@ -161368,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: @@ -161394,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 } @@ -161423,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) } @@ -161481,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 } @@ -162038,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)) @@ -162149,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) @@ -162455,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) @@ -162470,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 { @@ -162524,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) @@ -162629,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)) } @@ -162674,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 { @@ -162790,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 } @@ -162892,7 +163676,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+16674) + jsonWrongNumArgs(tls, ctx, ts+16721) return __2: ; @@ -162967,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: @@ -163102,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)) } @@ -163199,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)) } @@ -163243,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) { @@ -163374,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) { @@ -163393,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 @@ -163489,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) } @@ -163513,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 @@ -163629,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 } @@ -163724,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 { @@ -163761,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 { @@ -164022,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) } @@ -164237,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)) @@ -164935,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 } @@ -165147,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 } @@ -166276,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 { @@ -166288,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)) } } @@ -166334,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 @@ -166519,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)) @@ -166542,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 { @@ -166590,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{ @@ -166633,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) { @@ -166674,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 { @@ -166686,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 @@ -166694,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 @@ -166720,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 { @@ -166756,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 @@ -166764,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)) } } @@ -166818,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: ; @@ -166852,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: @@ -166864,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) { @@ -166887,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 @@ -166898,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: @@ -166948,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: ; @@ -166965,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: ; @@ -166983,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) @@ -167021,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}))) @@ -167038,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 { @@ -167116,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 @@ -167140,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)) } @@ -167159,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)) } } @@ -167173,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) { @@ -167189,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)) } } @@ -167229,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 { @@ -167249,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)) } } } @@ -167266,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 } @@ -167281,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++ { @@ -167310,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) @@ -167339,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) @@ -167353,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) } @@ -167372,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) @@ -167381,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 } @@ -167396,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) @@ -167404,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))) } @@ -167414,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) @@ -167783,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) } @@ -167807,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) } @@ -168725,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 @@ -168734,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++ @@ -168742,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 @@ -168753,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: @@ -168778,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: ; @@ -168967,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 @@ -168977,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 @@ -168985,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 @@ -169097,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 @@ -169227,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})) @@ -169299,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 } @@ -169311,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 @@ -169339,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) @@ -169412,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}))) } } } @@ -169479,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 @@ -169737,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 } @@ -169748,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}))) } @@ -169761,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 @@ -169773,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 } @@ -169849,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 { @@ -169913,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++ { } @@ -169934,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 @@ -170041,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))) } } @@ -170059,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 } @@ -170077,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 } @@ -170095,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 } @@ -170118,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 } @@ -170164,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 @@ -170179,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 { @@ -170219,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 @@ -170229,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 } } @@ -170252,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) @@ -170277,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) @@ -170320,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 } @@ -170336,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 } @@ -170364,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))) } @@ -170419,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 @@ -170459,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 @@ -170467,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: @@ -170491,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) { @@ -170518,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++ @@ -170530,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: @@ -170557,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))) { @@ -170575,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 { @@ -170587,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++ } @@ -170651,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 @@ -170668,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 @@ -170680,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 } } } @@ -170709,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 { @@ -170723,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 } } } @@ -170772,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 } @@ -170796,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 @@ -170819,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))) { @@ -170833,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))) @@ -170843,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)) } } @@ -170871,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)) } } @@ -170927,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))) } } @@ -170964,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 @@ -171069,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 } @@ -171089,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 { @@ -171122,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, @@ -171130,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)) } @@ -171179,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 @@ -171189,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)) } @@ -171242,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 } } @@ -171262,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))) } @@ -171353,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) @@ -171385,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) } @@ -171417,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: @@ -171487,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 } @@ -171541,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)))) == '?' { @@ -171557,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 }())) @@ -171582,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) } } @@ -171641,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 } @@ -171757,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 { @@ -171774,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 @@ -171811,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 || @@ -171910,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 } @@ -172003,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) @@ -172011,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)) } } } @@ -172032,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, @@ -172062,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))) @@ -172078,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 { @@ -172095,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 { @@ -172112,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))) @@ -172132,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) @@ -172164,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 } @@ -172262,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 { @@ -172278,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)) @@ -172294,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) @@ -172328,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 { @@ -172358,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))) { @@ -172375,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) @@ -172405,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 @@ -172419,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) @@ -172448,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 @@ -172466,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 }())) } } @@ -172479,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) @@ -172490,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) } } @@ -172556,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) } } @@ -172583,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++ @@ -172600,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 { @@ -172613,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 } @@ -172714,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)) } } @@ -172731,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)) } } @@ -172751,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 @@ -172769,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 { @@ -173064,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 @@ -173089,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 @@ -173134,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))))) @@ -175945,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 { @@ -175987,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)) @@ -176048,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) } } @@ -176122,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 { @@ -176190,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) } @@ -176202,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 @@ -176554,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: ; @@ -176722,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 } } @@ -176807,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 { @@ -176855,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 { @@ -176866,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)) @@ -176894,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 } @@ -176929,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))) } @@ -177182,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 { @@ -177198,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)) } } } @@ -177271,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)) @@ -177307,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 @@ -177320,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 } @@ -177333,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 } @@ -177396,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)) } } @@ -177917,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) @@ -178651,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 @@ -178939,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 @@ -179126,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 } @@ -179194,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 } @@ -179353,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) { @@ -179376,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 } @@ -179700,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}))}, } @@ -180117,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) @@ -180257,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 @@ -180284,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 } @@ -180302,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 } @@ -180315,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))) @@ -180324,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++ { @@ -180343,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, @@ -180358,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 } @@ -180373,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) @@ -180383,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') @@ -180393,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 } @@ -180454,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 } } @@ -180479,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)) } } } @@ -180523,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 } @@ -180556,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 { @@ -180565,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 { @@ -180593,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 { @@ -180649,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) @@ -180770,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) @@ -180780,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) @@ -180790,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) @@ -180803,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) @@ -180813,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) @@ -180829,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) @@ -180852,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 @@ -180874,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 @@ -180888,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)) } } @@ -180986,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 } } @@ -180999,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 @@ -182779,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)) } } @@ -182797,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') @@ -182884,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) } @@ -182965,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) } @@ -183135,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) @@ -184083,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 { @@ -184162,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 @@ -184187,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 @@ -184210,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 { @@ -184449,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) } @@ -184522,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)) } } @@ -185648,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 @@ -186841,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)) @@ -187007,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) @@ -187038,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) @@ -187114,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))) } @@ -187157,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 { @@ -187169,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)) } @@ -187289,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}))) @@ -187688,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 @@ -187704,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) } { @@ -187885,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 } @@ -188009,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 @@ -188018,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})) } @@ -188050,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 } } @@ -188104,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 } @@ -188175,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) } @@ -188191,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 { @@ -188450,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))) @@ -188564,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))) { @@ -188723,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))) @@ -188730,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)) @@ -189001,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 } @@ -189032,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))) } @@ -189047,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) @@ -189361,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 @@ -189393,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) } @@ -189425,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 @@ -189489,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 } @@ -189525,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, @@ -189556,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 } } @@ -189588,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) } } @@ -189651,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: ; @@ -189694,7 +190513,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1524 + zText = ts + 1544 __14: ; iCol = 0 @@ -189868,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: @@ -189989,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))) } } } @@ -190013,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 { @@ -190092,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))) @@ -190105,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 { @@ -190740,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 { @@ -190984,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 @@ -191003,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, @@ -191050,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 } @@ -191059,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 { @@ -191073,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 { @@ -191097,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) } @@ -191115,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)) } @@ -191176,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) @@ -191253,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))) } } } @@ -191288,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 @@ -191311,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)) } } @@ -191323,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)) } @@ -191342,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))) } @@ -191389,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) } } @@ -191615,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)) } @@ -191628,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 } @@ -191804,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 @@ -191986,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 } @@ -192188,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 @@ -192405,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{}))) @@ -192417,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)) } } @@ -192428,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 } @@ -192715,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)) @@ -192857,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 } @@ -192865,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 } @@ -192877,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 } @@ -192885,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 } @@ -192893,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 } @@ -192905,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 } @@ -192925,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 } @@ -192937,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 } @@ -192945,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 } @@ -192957,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 } @@ -192965,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 } @@ -192973,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 } @@ -192989,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 } @@ -193021,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 } } @@ -193166,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 } @@ -193183,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 } @@ -193205,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 } @@ -193213,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 } } @@ -193230,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 @@ -193244,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 @@ -193400,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 { @@ -193580,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 @@ -194738,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) @@ -194771,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 @@ -194916,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)) @@ -194944,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 { @@ -195228,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) @@ -195339,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{ @@ -195361,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() { @@ -195926,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 @@ -196199,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 @@ -196265,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 @@ -196285,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 @@ -196412,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 1bef9f47..ade56472 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 { @@ -1225,8 +1249,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 +1259,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 +1273,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 +1325,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 4b1f679d..d48fd0c5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -55,7 +55,7 @@ github.com/av-elier/go-decimal-to-rational # github.com/blang/semver v3.5.1+incompatible ## explicit github.com/blang/semver -# github.com/bwmarrin/discordgo v0.26.1 +# github.com/bwmarrin/discordgo v0.27.0 ## explicit; go 1.13 github.com/bwmarrin/discordgo # github.com/d5/tengo/v2 v2.13.0 @@ -99,7 +99,7 @@ github.com/gomarkdown/markdown github.com/gomarkdown/markdown/ast github.com/gomarkdown/markdown/html github.com/gomarkdown/markdown/parser -# github.com/google/gops v0.3.25 +# github.com/google/gops v0.3.26 ## explicit; go 1.13 github.com/google/gops/agent github.com/google/gops/internal @@ -147,7 +147,7 @@ github.com/hashicorp/errwrap # github.com/hashicorp/go-multierror v1.1.1 ## explicit; go 1.13 github.com/hashicorp/go-multierror -# github.com/hashicorp/golang-lru v0.5.4 +# github.com/hashicorp/golang-lru v0.6.0 ## explicit; go 1.12 github.com/hashicorp/golang-lru github.com/hashicorp/golang-lru/simplelru @@ -175,7 +175,7 @@ github.com/kballard/go-shellquote # github.com/kettek/apng v0.0.0-20191108220231-414630eed80f ## explicit github.com/kettek/apng -# github.com/keybase/go-keybase-chat-bot v0.0.0-20221010143313-3c4907bab5dd +# github.com/keybase/go-keybase-chat-bot v0.0.0-20221220212439-e48d9abd2c20 ## explicit; go 1.19 github.com/keybase/go-keybase-chat-bot/kbchat github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1 @@ -195,10 +195,10 @@ github.com/klauspost/compress/zstd/internal/xxhash # github.com/klauspost/cpuid/v2 v2.0.12 ## explicit; go 1.15 github.com/klauspost/cpuid/v2 -# github.com/kyokomi/emoji/v2 v2.2.10 +# github.com/kyokomi/emoji/v2 v2.2.11 ## explicit; go 1.14 github.com/kyokomi/emoji/v2 -# github.com/labstack/echo/v4 v4.9.1 +# github.com/labstack/echo/v4 v4.10.0 ## explicit; go 1.17 github.com/labstack/echo/v4 github.com/labstack/echo/v4/middleware @@ -208,11 +208,11 @@ github.com/labstack/gommon/bytes github.com/labstack/gommon/color github.com/labstack/gommon/log github.com/labstack/gommon/random -# github.com/lrstanley/girc v0.0.0-20220821023908-8e7df6d970f8 +# github.com/lrstanley/girc v0.0.0-20221222153823-a92667a5c9b4 ## explicit; go 1.18 github.com/lrstanley/girc -# github.com/magiconair/properties v1.8.6 -## explicit; go 1.13 +# github.com/magiconair/properties v1.8.7 +## explicit; go 1.19 github.com/magiconair/properties # github.com/matterbridge/Rocket.Chat.Go.SDK v0.0.0-20211016222428-79310a412696 ## explicit @@ -272,8 +272,8 @@ github.com/mattermost/mattermost-server/v6/shared/i18n github.com/mattermost/mattermost-server/v6/shared/markdown github.com/mattermost/mattermost-server/v6/shared/mlog github.com/mattermost/mattermost-server/v6/utils/jsonutils -# github.com/mattn/go-colorable v0.1.12 -## explicit; go 1.13 +# github.com/mattn/go-colorable v0.1.13 +## explicit; go 1.15 github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.16 ## explicit; go 1.15 @@ -348,12 +348,13 @@ github.com/pborman/uuid # github.com/pelletier/go-toml v1.9.5 ## explicit; go 1.12 github.com/pelletier/go-toml -# github.com/pelletier/go-toml/v2 v2.0.1 +# github.com/pelletier/go-toml/v2 v2.0.6 ## explicit; go 1.16 github.com/pelletier/go-toml/v2 -github.com/pelletier/go-toml/v2/internal/ast +github.com/pelletier/go-toml/v2/internal/characters github.com/pelletier/go-toml/v2/internal/danger github.com/pelletier/go-toml/v2/internal/tracker +github.com/pelletier/go-toml/v2/unstable # github.com/philhofer/fwd v1.1.1 ## explicit github.com/philhofer/fwd @@ -381,7 +382,7 @@ github.com/rs/xid # github.com/russross/blackfriday v1.6.0 ## explicit; go 1.13 github.com/russross/blackfriday -# github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca +# github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d ## explicit github.com/saintfish/chardet # github.com/shazow/rateio v0.0.0-20200113175441-4461efc8bdc4 @@ -403,16 +404,17 @@ github.com/sizeofint/webpanimation github.com/skip2/go-qrcode github.com/skip2/go-qrcode/bitset github.com/skip2/go-qrcode/reedsolomon -# github.com/slack-go/slack v0.11.3 +# github.com/slack-go/slack v0.12.1 ## explicit; go 1.16 github.com/slack-go/slack github.com/slack-go/slack/internal/backoff github.com/slack-go/slack/internal/errorsx github.com/slack-go/slack/internal/timex github.com/slack-go/slack/slackutilsx -# github.com/spf13/afero v1.8.2 -## explicit; go 1.13 +# github.com/spf13/afero v1.9.3 +## explicit; go 1.16 github.com/spf13/afero +github.com/spf13/afero/internal/common github.com/spf13/afero/mem # github.com/spf13/cast v1.5.0 ## explicit; go 1.18 @@ -423,7 +425,7 @@ github.com/spf13/jwalterweatherman # github.com/spf13/pflag v1.0.5 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/spf13/viper v1.12.0 +# github.com/spf13/viper v1.15.0 ## explicit; go 1.17 github.com/spf13/viper github.com/spf13/viper/internal/encoding @@ -439,7 +441,7 @@ github.com/spf13/viper/internal/encoding/yaml github.com/stretchr/testify/assert github.com/stretchr/testify/require github.com/stretchr/testify/suite -# github.com/subosito/gotenv v1.3.0 +# github.com/subosito/gotenv v1.4.2 ## explicit; go 1.18 github.com/subosito/gotenv # github.com/tinylib/msgp v1.1.6 @@ -448,7 +450,7 @@ github.com/tinylib/msgp/msgp # github.com/valyala/bytebufferpool v1.0.0 ## explicit github.com/valyala/bytebufferpool -# github.com/valyala/fasttemplate v1.2.1 +# github.com/valyala/fasttemplate v1.2.2 ## explicit; go 1.12 github.com/valyala/fasttemplate # github.com/vincent-petithory/dataurl v1.0.0 @@ -485,8 +487,8 @@ github.com/yaegashi/msgraph.go/msauth # github.com/zfjagann/golang-ring v0.0.0-20220330170733-19bcea1b6289 ## explicit github.com/zfjagann/golang-ring -# go.mau.fi/libsignal v0.0.0-20221015105917-d970e7c3c9cf -## explicit; go 1.17 +# go.mau.fi/libsignal v0.1.0 +## explicit; go 1.18 go.mau.fi/libsignal/cipher go.mau.fi/libsignal/ecc go.mau.fi/libsignal/groups @@ -513,7 +515,7 @@ go.mau.fi/libsignal/util/errorhelper go.mau.fi/libsignal/util/keyhelper go.mau.fi/libsignal/util/medium go.mau.fi/libsignal/util/optional -# go.mau.fi/whatsmeow v0.0.0-20221126173344-e660988acdbc +# go.mau.fi/whatsmeow v0.0.0-20230128195103-dcbc8dd31a22 ## explicit; go 1.18 go.mau.fi/whatsmeow go.mau.fi/whatsmeow/appstate @@ -534,10 +536,10 @@ go.mau.fi/whatsmeow/util/log # go.uber.org/atomic v1.9.0 ## explicit; go 1.13 go.uber.org/atomic -# go.uber.org/multierr v1.7.0 +# go.uber.org/multierr v1.8.0 ## explicit; go 1.14 go.uber.org/multierr -# go.uber.org/zap v1.17.0 +# go.uber.org/zap v1.21.0 ## explicit; go 1.13 go.uber.org/zap go.uber.org/zap/buffer @@ -545,7 +547,7 @@ go.uber.org/zap/internal/bufferpool go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore -# golang.org/x/crypto v0.0.0-20221012134737-56aed061732a +# golang.org/x/crypto v0.4.0 ## explicit; go 1.17 golang.org/x/crypto/acme golang.org/x/crypto/acme/autocert @@ -567,7 +569,7 @@ golang.org/x/crypto/scrypt golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/crypto/ssh/terminal -# golang.org/x/image v0.1.0 +# golang.org/x/image v0.3.0 ## explicit; go 1.12 golang.org/x/image/riff golang.org/x/image/vp8 @@ -576,7 +578,7 @@ golang.org/x/image/webp # golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 ## explicit; go 1.17 golang.org/x/mod/semver -# golang.org/x/net v0.1.0 +# golang.org/x/net v0.5.0 ## explicit; go 1.17 golang.org/x/net/context golang.org/x/net/context/ctxhttp @@ -589,13 +591,13 @@ golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/publicsuffix golang.org/x/net/websocket -# golang.org/x/oauth2 v0.1.0 +# golang.org/x/oauth2 v0.4.0 ## explicit; go 1.17 golang.org/x/oauth2 golang.org/x/oauth2/clientcredentials golang.org/x/oauth2/internal golang.org/x/oauth2/microsoft -# golang.org/x/sys v0.1.0 +# golang.org/x/sys v0.4.0 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs @@ -603,10 +605,10 @@ golang.org/x/sys/internal/unsafeheader golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.1.0 +# golang.org/x/term v0.4.0 ## explicit; go 1.17 golang.org/x/term -# golang.org/x/text v0.4.0 +# golang.org/x/text v0.6.0 ## explicit; go 1.17 golang.org/x/text/encoding golang.org/x/text/encoding/charmap @@ -628,7 +630,7 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 +# golang.org/x/time v0.2.0 ## explicit golang.org/x/time/rate # golang.org/x/tools v0.1.12 @@ -690,7 +692,7 @@ google.golang.org/protobuf/reflect/protoregistry google.golang.org/protobuf/runtime/protoiface google.golang.org/protobuf/runtime/protoimpl google.golang.org/protobuf/types/descriptorpb -# gopkg.in/ini.v1 v1.66.4 +# gopkg.in/ini.v1 v1.67.0 ## explicit gopkg.in/ini.v1 # gopkg.in/natefinch/lumberjack.v2 v2.0.0 @@ -705,7 +707,7 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# layeh.com/gumble v0.0.0-20200818122324-146f9205029b +# layeh.com/gumble v0.0.0-20221205141517-d1df60a3cc14 ## explicit; go 1.12 layeh.com/gumble/gumble layeh.com/gumble/gumble/MumbleProto @@ -720,7 +722,7 @@ modernc.org/cc/v3 # modernc.org/ccgo/v3 v3.16.13 ## explicit; go 1.17 modernc.org/ccgo/v3/lib -# modernc.org/libc v1.21.5 +# modernc.org/libc v1.22.2 ## explicit; go 1.17 modernc.org/libc modernc.org/libc/errno @@ -757,7 +759,7 @@ modernc.org/memory # modernc.org/opt v0.1.3 ## explicit; go 1.13 modernc.org/opt -# modernc.org/sqlite v1.19.5 +# modernc.org/sqlite v1.20.3 ## explicit; go 1.17 modernc.org/sqlite modernc.org/sqlite/lib