diff options
author | Wim <wim@42.be> | 2023-01-28 22:57:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 22:57:53 +0100 |
commit | 880586bac42817ffcfea5d9f746f503fa29915b8 (patch) | |
tree | a89374cba6f88975f12316ec8d1b8aa1d4c6ba79 /vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go | |
parent | eac2a8c8dc831f946970d327e2a80b26b0684255 (diff) | |
download | matterbridge-msglm-880586bac42817ffcfea5d9f746f503fa29915b8.tar.gz matterbridge-msglm-880586bac42817ffcfea5d9f746f503fa29915b8.tar.bz2 matterbridge-msglm-880586bac42817ffcfea5d9f746f503fa29915b8.zip |
Update dependencies (#1951)
Diffstat (limited to 'vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go')
-rw-r--r-- | vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go | 13795 |
1 files changed, 7309 insertions, 6486 deletions
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 { // <li> [SQLITE_LOCK_PENDING], or // <li> [SQLITE_LOCK_EXCLUSIVE]. // </ul> -// 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: +// +// <ul> +// <li> sqlite3_filename_database() +// <li> sqlite3_filename_journal() +// <li> sqlite3_filename_wal() +// <li> sqlite3_uri_parameter() +// <li> sqlite3_uri_boolean() +// <li> sqlite3_uri_int64() +// <li> sqlite3_uri_key() +// </ul> +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 @@ -7170,17 +7214,6 @@ type IdxCover = struct { } // 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 FpSrc 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,40 +18562,85 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK - if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { + if eLock <= (*MemFile)(unsafe.Pointer(pThis)).FeLock { return SQLITE_OK } memdbEnter(tls, p) - if eLock > SQLITE_LOCK_SHARED { - if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { - rc = SQLITE_READONLY - } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock <= SQLITE_LOCK_SHARED { - if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + + if eLock > SQLITE_LOCK_SHARED && (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { + rc = SQLITE_READONLY + } else { + switch eLock { + case SQLITE_LOCK_SHARED: + { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + } + break + + } + + fallthrough + + case SQLITE_LOCK_RESERVED: + fallthrough + case SQLITE_LOCK_PENDING: + { + if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + if (*MemStore)(unsafe.Pointer(p)).FnWrLock > 0 { + rc = SQLITE_BUSY + } else { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + } + break + + } + fallthrough + + default: + { + if (*MemStore)(unsafe.Pointer(p)).FnRdLock > 1 { + rc = SQLITE_BUSY + } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock == SQLITE_LOCK_SHARED { + (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 + } + break + } } - } else if eLock == SQLITE_LOCK_SHARED { + } + if rc == SQLITE_OK { + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock + } + memdbLeave(tls, p) + return rc +} + +func memdbUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { + var pThis uintptr = pFile + var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore + if eLock >= (*MemFile)(unsafe.Pointer(pThis)).FeLock { + return SQLITE_OK + } + memdbEnter(tls, p) + + if eLock == SQLITE_LOCK_SHARED { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 - } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { - rc = SQLITE_BUSY - } else { - (*MemStore)(unsafe.Pointer(p)).FnRdLock++ + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { - (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 + (*MemStore)(unsafe.Pointer(p)).FnWrLock-- } - (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } - if rc == SQLITE_OK { - (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock - } + + (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock memdbLeave(tls, p) - return rc + return SQLITE_OK } func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { @@ -18436,7 +18651,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3827, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3841, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -18492,7 +18707,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) - if szName > 1 && int32(*(*uint8)(unsafe.Pointer(zName))) == '/' { + if szName > 1 && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/' || int32(*(*uint8)(unsafe.Pointer(zName))) == '\\') { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) @@ -18568,7 +18783,7 @@ func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3649, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3663, libc.VaList(bp, zPath)) return SQLITE_OK } @@ -18689,7 +18904,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3842, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3856, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { @@ -18762,7 +18977,7 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3865, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3879, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } @@ -18825,6 +19040,11 @@ __10: return rc } +// Return true if the VFS is the memvfs. +func Xsqlite3IsMemdb(tls *libc.TLS, pVfs uintptr) int32 { + return libc.Bool32(pVfs == uintptr(unsafe.Pointer(&memdb_vfs))) +} + // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { @@ -19508,6 +19728,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) + } } } @@ -19540,6 +19761,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) + } } @@ -21970,7 +22192,7 @@ __27: if !(isHot != 0 && nPlayback != 0) { goto __28 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3880, + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3894, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; @@ -23107,7 +23329,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 58677) + rc = Xsqlite3CantopenError(tls, 59950) __12: ; if !(rc != SQLITE_OK) { @@ -23168,7 +23390,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3907, uint64(8)) + libc.Xmemcpy(tls, pPtr, ts+3921, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -23181,7 +23403,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3916, uint64(4)) + libc.Xmemcpy(tls, pPtr, ts+3930, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -23233,9 +23455,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3921, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3935, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3928, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3942, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -23499,7 +23721,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 59207) + rc = Xsqlite3CantopenError(tls, 60480) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -23623,7 +23845,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 59420) + return Xsqlite3CorruptError(tls, 60693) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -23662,7 +23884,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 59452) + rc = Xsqlite3CorruptError(tls, 60725) goto pager_acquire_err __7: ; @@ -23739,7 +23961,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 59531) + return Xsqlite3CorruptError(tls, 60804) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -23866,6 +24088,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) + flags = flags | SQLITE_OPEN_EXCLUSIVE nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL @@ -24739,7 +24962,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 61071) + return Xsqlite3CorruptError(tls, 62345) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24924,7 +25147,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { - Xsqlite3_exec(tls, db, ts+3938, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+3952, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -25496,7 +25719,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 62835) + return Xsqlite3CorruptError(tls, 64109) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -25595,7 +25818,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 62967) + rc = Xsqlite3CantopenError(tls, 64241) goto finished __7: ; @@ -25763,7 +25986,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3956, + ts+3970, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -26181,7 +26404,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 63781) + rc = Xsqlite3CorruptError(tls, 65055) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -26326,7 +26549,7 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3993, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+4007, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -26456,7 +26679,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { } if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 64130) + rc = Xsqlite3CantopenError(tls, 65404) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -26929,7 +27152,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 64867) + return Xsqlite3CorruptError(tls, 66141) } iKey = walNextHash(tls, iKey) } @@ -27434,7 +27657,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 65586) + rc = Xsqlite3CorruptError(tls, 66860) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -27825,7 +28048,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4019)) +var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 4033)) var sqlite3SharedCacheList uintptr = uintptr(0) @@ -28090,7 +28313,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 67695) + rc = Xsqlite3CorruptError(tls, 68970) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -28227,7 +28450,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67876) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) return __2: ; @@ -28244,7 +28467,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67889) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) goto ptrmap_exit __4: ; @@ -28252,7 +28475,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67894) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) goto ptrmap_exit __5: ; @@ -28295,7 +28518,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) - return Xsqlite3CorruptError(tls, 67939) + return Xsqlite3CorruptError(tls, 69214) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -28305,7 +28528,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 67947) + return Xsqlite3CorruptError(tls, 69222) } return SQLITE_OK } @@ -28555,7 +28778,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 68339) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69614) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -28587,8 +28810,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { var iFree int32 var pAddr1 uintptr - temp = uintptr(0) - src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) + data = (*MemPage)(unsafe.Pointer(pPage)).FaData hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) cellOffset = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) @@ -28603,7 +28825,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 68398) + return Xsqlite3CorruptError(tls, 69672) __2: ; if !(iFree != 0) { @@ -28613,7 +28835,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 68401) + return Xsqlite3CorruptError(tls, 69675) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -28626,7 +28848,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 68409) + return Xsqlite3CorruptError(tls, 69683) __6: ; if !(iFree2 != 0) { @@ -28635,14 +28857,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 68412) + return Xsqlite3CorruptError(tls, 69686) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 68414) + return Xsqlite3CorruptError(tls, 69688) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -28652,7 +28874,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 68418) + return Xsqlite3CorruptError(tls, 69692) __11: ; __8: @@ -28699,63 +28921,57 @@ __1: cbrk = usableSize iCellLast = usableSize - 4 iCellStart = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) + if !(nCell > 0) { + goto __18 + } + temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) + libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) + src = temp i = 0 -__18: +__19: if !(i < nCell) { - goto __20 + goto __21 } pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) if !(pc < iCellStart || pc > iCellLast) { - goto __21 + goto __22 } - return Xsqlite3CorruptError(tls, 68447) -__21: + return Xsqlite3CorruptError(tls, 69725) +__22: ; size = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, src+uintptr(pc))) cbrk = cbrk - size if !(cbrk < iCellStart || pc+size > usableSize) { - goto __22 - } - return Xsqlite3CorruptError(tls, 68453) -__22: - ; - *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) - *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) - if !(temp == uintptr(0)) { goto __23 } - if !(cbrk == pc) { - goto __24 - } - goto __19 -__24: - ; - temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) - libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) - src = temp + return Xsqlite3CorruptError(tls, 69731) __23: ; + *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) + *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) - goto __19 -__19: - i++ - goto __18 goto __20 __20: + i++ + goto __19 + goto __21 +__21: + ; +__18: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))) = uint8(0) defragment_out: ; if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { - goto __25 + goto __24 } - return Xsqlite3CorruptError(tls, 68472) -__25: + return Xsqlite3CorruptError(tls, 69745) +__24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) @@ -28787,10 +29003,9 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) - return aData + uintptr(pc) } else if x+pc > maxPC { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68530) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69802) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -28801,15 +29016,15 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr iAddr = pc pTmp = aData + uintptr(pc) pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) - if pc <= iAddr+size { + if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68545) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 68552) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) } return uintptr(0) } @@ -28834,7 +29049,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 68601) + return Xsqlite3CorruptError(tls, 69873) } } @@ -28845,7 +29060,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { - return Xsqlite3CorruptError(tls, 68619) + return Xsqlite3CorruptError(tls, 69891) } else { return SQLITE_OK } @@ -28893,26 +29108,26 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { iFreeBlk = U16(0) } else { for int32(libc.AssignUint16(&iFreeBlk, U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<8|int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)))))) < int32(iStart) { - if int32(iFreeBlk) < int32(iPtr)+4 { + if int32(iFreeBlk) <= int32(iPtr) { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 68698) + return Xsqlite3CorruptError(tls, 69970) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 68703) + return Xsqlite3CorruptError(tls, 69975) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 68715) + return Xsqlite3CorruptError(tls, 69987) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 68718) + return Xsqlite3CorruptError(tls, 69990) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -28922,7 +29137,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 68731) + return Xsqlite3CorruptError(tls, 70003) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -28930,7 +29145,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 68737) + return Xsqlite3CorruptError(tls, 70009) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -28938,10 +29153,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { x = U16(int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1)))) if int32(iStart) <= int32(x) { if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 68746) + return Xsqlite3CorruptError(tls, 70018) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 68747) + return Xsqlite3CorruptError(tls, 70019) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -29010,7 +29225,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 68825) + return Xsqlite3CorruptError(tls, 70097) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -29040,11 +29255,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 68876) + return Xsqlite3CorruptError(tls, 70148) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 68881) + return Xsqlite3CorruptError(tls, 70153) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -29055,15 +29270,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 68891) + return Xsqlite3CorruptError(tls, 70163) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 68895) + return Xsqlite3CorruptError(tls, 70167) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 68907) + return Xsqlite3CorruptError(tls, 70179) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -29091,14 +29306,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellOffset+i*2) + 1))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 68938) + return Xsqlite3CorruptError(tls, 70210) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 68943) + return Xsqlite3CorruptError(tls, 70215) } } return SQLITE_OK @@ -29112,7 +29327,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 68975) + return Xsqlite3CorruptError(tls, 70247) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -29124,7 +29339,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { - return Xsqlite3CorruptError(tls, 68989) + return Xsqlite3CorruptError(tls, 70261) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -29227,7 +29442,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 69144) + rc = Xsqlite3CorruptError(tls, 70416) goto getAndInitPage_error1 __1: ; @@ -29255,7 +29470,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 69165) + rc = Xsqlite3CorruptError(tls, 70437) goto getAndInitPage_error2 __5: ; @@ -29294,7 +29509,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 69233) + return Xsqlite3CorruptError(tls, 70503) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29318,7 +29533,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { var pBt uintptr = pArg - return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) + return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+672) } // Open a database file. @@ -29367,7 +29582,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*uint8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4035) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+4049) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -30139,7 +30354,7 @@ __9: ; __10: ; - if !(libc.Xmemcmp(tls, page1+21, ts+4044, uint64(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4058, uint64(3)) != 0) { goto __14 } goto page1_init_failed @@ -30177,7 +30392,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 70168) + rc = Xsqlite3CorruptError(tls, 71438) goto page1_init_failed goto __19 __18: @@ -30592,7 +30807,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if int32(eType) == PTRMAP_OVERFLOW2 { if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 70589) + return Xsqlite3CorruptError(tls, 71859) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -30618,7 +30833,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 70608) + return Xsqlite3CorruptError(tls, 71878) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -30626,6 +30841,9 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType } } } else { + if pCell+uintptr(4) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return Xsqlite3CorruptError(tls, 71887) + } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break @@ -30635,7 +30853,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 70626) + return Xsqlite3CorruptError(tls, 71899) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -30651,7 +30869,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 70661) + return Xsqlite3CorruptError(tls, 71934) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -30712,7 +30930,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 70759) + return Xsqlite3CorruptError(tls, 72032) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -30747,7 +30965,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) if *(*Pgno)(unsafe.Pointer(bp + 40)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) - return Xsqlite3CorruptError(tls, 70811) + return Xsqlite3CorruptError(tls, 72084) } } @@ -30807,7 +31025,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 70879) + rc = Xsqlite3CorruptError(tls, 72152) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -30846,7 +31064,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { - return Xsqlite3CorruptError(tls, 70930) + return Xsqlite3CorruptError(tls, 72203) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -30877,7 +31095,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 70957) + return Xsqlite3CorruptError(tls, 72230) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -31218,7 +31436,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 71421) + return Xsqlite3CorruptError(tls, 72694) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -31462,14 +31680,14 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 71828) + return Xsqlite3CorruptError(tls, 73101) } getCellInfo(tls, pCur) aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload if Uptr((int64(aPayload)-int64((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > Uptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) { - return Xsqlite3CorruptError(tls, 71843) + return Xsqlite3CorruptError(tls, 73116) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -31514,7 +31732,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 71905) + return Xsqlite3CorruptError(tls, 73178) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -31563,7 +31781,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 71990) + return Xsqlite3CorruptError(tls, 73263) } return rc } @@ -31642,10 +31860,8 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt } func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { - var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt - if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 72129) + return Xsqlite3CorruptError(tls, 73400) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -31653,7 +31869,8 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ - return getAndInitPage(tls, pBt, newPgno, pCur+136, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) + return getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, pCur, + int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } func moveToParent(tls *libc.TLS, pCur uintptr) { @@ -31715,7 +31932,7 @@ __9: Xsqlite3BtreeClearCursor(tls, pCur) __8: ; - rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, + rc = getAndInitPage(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 @@ -31735,7 +31952,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 72267) + return Xsqlite3CorruptError(tls, 73539) __11: ; skip_init: @@ -31755,7 +31972,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 72279) + return Xsqlite3CorruptError(tls, 73551) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -31967,7 +32184,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 72521) + return Xsqlite3CorruptError(tls, 73793) __21: ; goto __19 @@ -32171,7 +32388,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 72717) + return Xsqlite3CorruptError(tls, 73989) __4: ; goto bypass_moveto_root @@ -32236,7 +32453,7 @@ __15: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __17 } - rc = Xsqlite3CorruptError(tls, 72804) + rc = Xsqlite3CorruptError(tls, 74076) goto moveto_index_finish __17: ; @@ -32284,7 +32501,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 72836) + rc = Xsqlite3CorruptError(tls, 74108) __24: ; goto moveto_index_finish @@ -32403,7 +32620,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) if !(int32((*MemPage)(unsafe.Pointer(pPage)).FisInit) != 0) || Xsqlite3FaultSim(tls, 412) != 0 { - return Xsqlite3CorruptError(tls, 72959) + return Xsqlite3CorruptError(tls, 74224) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -32563,7 +32780,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73139) + return Xsqlite3CorruptError(tls, 74404) __1: ; if !(n > U32(0)) { @@ -32628,7 +32845,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 73195) + rc = Xsqlite3CorruptError(tls, 74460) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -32664,7 +32881,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 73224) + rc = Xsqlite3CorruptError(tls, 74489) goto end_allocate_page goto __23 __22: @@ -32708,7 +32925,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 73258) + rc = Xsqlite3CorruptError(tls, 74523) goto end_allocate_page __32: ; @@ -32820,7 +33037,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 73323) + rc = Xsqlite3CorruptError(tls, 74588) goto end_allocate_page __51: ; @@ -32978,7 +33195,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 73450) + return Xsqlite3CorruptError(tls, 74715) __1: ; if !(pMemPage != 0) { @@ -33035,7 +33252,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73497) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) goto freepage_out __10: ; @@ -33051,7 +33268,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 73508) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) goto freepage_out __12: ; @@ -33125,7 +33342,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 73597) + return Xsqlite3CorruptError(tls, 74862) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -33137,7 +33354,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 8)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 73614) + return Xsqlite3CorruptError(tls, 74879) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -33148,7 +33365,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if (*(*uintptr)(unsafe.Pointer(bp)) != 0 || libc.AssignPtrUintptr(bp, btreePageLookup(tls, pBt, ovflPgno)) != uintptr(0)) && Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 { - rc = Xsqlite3CorruptError(tls, 73634) + rc = Xsqlite3CorruptError(tls, 74899) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -33313,7 +33530,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73893) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75152) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -33585,12 +33802,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 74194) + return Xsqlite3CorruptError(tls, 75453) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 74199) + return Xsqlite3CorruptError(tls, 75458) } pData -= uintptr(sz) @@ -33598,7 +33815,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 74205) + return Xsqlite3CorruptError(tls, 75464) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -33658,7 +33875,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 74290) + Xsqlite3CorruptError(tls, 75549) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -33747,7 +33964,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 74401) + return Xsqlite3CorruptError(tls, 75660) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -33863,7 +34080,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 74514) + return Xsqlite3CorruptError(tls, 75773) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -34181,7 +34398,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74935) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76194) goto balance_cleanup __25: ; @@ -34192,7 +34409,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 74959) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) goto balance_cleanup __27: ; @@ -34350,7 +34567,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75060) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) goto balance_cleanup __55: ; @@ -34424,7 +34641,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75093) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) goto balance_cleanup __67: ; @@ -34486,7 +34703,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75135) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) goto balance_cleanup __75: ; @@ -34514,7 +34731,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75168) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -34775,7 +34992,7 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 75368) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) goto balance_cleanup __121: ; @@ -34967,7 +35184,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 75598) + return Xsqlite3CorruptError(tls, 76857) } } return SQLITE_OK @@ -35004,6 +35221,8 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { } else { break } + } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { + rc = Xsqlite3CorruptError(tls, 76917) } else { var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(iPage-1)*8)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 88 + uintptr(iPage-1)*2))) @@ -35094,7 +35313,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 75798) + return Xsqlite3CorruptError(tls, 77062) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -35117,7 +35336,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 75817) + rc = Xsqlite3CorruptError(tls, 77081) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -35197,7 +35416,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 75904) + return Xsqlite3CorruptError(tls, 77168) __3: ; __1: @@ -35310,7 +35529,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 76027) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -35371,7 +35590,7 @@ __29: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } - return Xsqlite3CorruptError(tls, 76063) + return Xsqlite3CorruptError(tls, 77327) __32: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -35409,13 +35628,13 @@ __36: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } - return Xsqlite3CorruptError(tls, 76090) + return Xsqlite3CorruptError(tls, 77354) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } - return Xsqlite3CorruptError(tls, 76093) + return Xsqlite3CorruptError(tls, 77357) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) @@ -35522,7 +35741,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 76197) + return Xsqlite3CorruptError(tls, 77461) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -35545,7 +35764,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 76220) + return Xsqlite3CorruptError(tls, 77484) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -35646,7 +35865,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 76317) + return Xsqlite3CorruptError(tls, 77581) } } @@ -35654,11 +35873,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return Xsqlite3CorruptError(tls, 76326) + return Xsqlite3CorruptError(tls, 77590) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx) + 1))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return Xsqlite3CorruptError(tls, 76330) + return Xsqlite3CorruptError(tls, 77594) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -35733,7 +35952,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1)) + 1))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 76421) + return Xsqlite3CorruptError(tls, 77685) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -35802,7 +36021,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76537) + return Xsqlite3CorruptError(tls, 77801) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -35831,7 +36050,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 40)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 76585) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 77849) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -35907,7 +36126,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 76675) + return Xsqlite3CorruptError(tls, 77939) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -35921,7 +36140,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 76682) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 77946) goto cleardatabasepage_out __3: ; @@ -36055,7 +36274,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 76786) + return Xsqlite3CorruptError(tls, 78050) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -36243,7 +36462,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+56, ts+4048, 1) + Xsqlite3_str_append(tls, pCheck+56, ts+4062, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+56, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -36268,11 +36487,11 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+4050, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4064, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4073, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4087, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { @@ -36293,13 +36512,13 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4098, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4112, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4127, + ts+4141, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48))), *(*Pgno)(unsafe.Pointer(bp + 52)))) } } @@ -36318,7 +36537,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4181, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4195, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) @@ -36329,7 +36548,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4203, libc.VaList(bp+8, iPage)) + ts+4217, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -36352,12 +36571,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4242, + ts+4256, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4268 + return ts + 4282 } - return ts + 4273 + return ts + 4287 }(), expected-N, expected)) } @@ -36464,13 +36683,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4294 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4308 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4304, libc.VaList(bp, rc)) + ts+4318, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -36481,7 +36700,7 @@ __3: } checkAppendMsg(tls, pCheck, - ts+4342, libc.VaList(bp+8, rc)) + ts+4356, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -36489,14 +36708,14 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4380, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4394, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4402 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4416 contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) @@ -36513,7 +36732,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4428 + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4442 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; @@ -36538,7 +36757,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4456, + checkAppendMsg(tls, pCheck, ts+4470, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -36551,7 +36770,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4486, 0) + checkAppendMsg(tls, pCheck, ts+4500, 0) doCoverageCheck = 0 goto __10 __13: @@ -36567,7 +36786,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4510, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4524, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey @@ -36605,7 +36824,7 @@ __20: if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4534, 0) + checkAppendMsg(tls, pCheck, ts+4548, 0) depth = d2 __21: ; @@ -36678,7 +36897,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4559, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) + ts+4573, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: @@ -36695,7 +36914,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4596, + ts+4610, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -36815,7 +37034,7 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4648 + (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = ts + 4662 checkList(tls, bp+32, 1, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)) (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = uintptr(0) @@ -36851,7 +37070,7 @@ __13: goto __15 } checkAppendMsg(tls, bp+32, - ts+4664, + ts+4678, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -36861,7 +37080,7 @@ __9: goto __16 } checkAppendMsg(tls, bp+32, - ts+4709, 0) + ts+4723, 0) __16: ; __10: @@ -36908,13 +37127,13 @@ __23: if !(getPageReferenced(tls, bp+32, i) == 0 && (ptrmapPageno(tls, pBt, i) != i || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) { goto __26 } - checkAppendMsg(tls, bp+32, ts+4764, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4778, libc.VaList(bp+16, i)) __26: ; if !(getPageReferenced(tls, bp+32, i) != 0 && (ptrmapPageno(tls, pBt, i) == i && (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0)) { goto __27 } - checkAppendMsg(tls, bp+32, ts+4786, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4800, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -37149,6 +37368,15 @@ func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } +// If no transaction is active and the database is not a temp-db, clear +// the in-memory pager cache. +func Xsqlite3BtreeClearCache(tls *libc.TLS, p uintptr) { + var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt + if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE { + Xsqlite3PagerClearCache(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + } +} + // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { return int32((*Btree)(unsafe.Pointer(p)).Fsharable) @@ -37162,8 +37390,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37171,7 +37399,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3649, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).Frc, ts+3663, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) @@ -37182,7 +37410,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4820, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4834, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -37197,7 +37425,7 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4840, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4854, 0) return SQLITE_ERROR } return SQLITE_OK @@ -37217,7 +37445,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4871, 0) + pDestDb, SQLITE_ERROR, ts+4885, 0) p = uintptr(0) } else { p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) @@ -37666,7 +37894,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16, ts+4911, + Xsqlite3_str_appendf(tls, bp+16, ts+4925, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -38083,6 +38311,19 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { i >= -2251799813685248 && i < 2251799813685248) } +// Convert a floating point value to its closest integer. Do so in +// a way that avoids 'outside the range of representable values' warnings +// from UBSAN. +func Xsqlite3RealToI64(tls *libc.TLS, r float64) I64 { + if r <= float64(int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + return int64(-1) - (int64(0xffffffff) | int64(0x7fffffff)<<32) + } + if r >= float64(int64(0xffffffff)|int64(0x7fffffff)<<32) { + return int64(0xffffffff) | int64(0x7fffffff)<<32 + } + return I64(r) +} + // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // @@ -38098,7 +38339,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) if (rc == 0 || rc == 1) && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) <= 1 || - Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(pMem))))) != 0 { + Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, Xsqlite3RealToI64(tls, *(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { @@ -38158,6 +38399,9 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) + if int32(encoding) != SQLITE_UTF8 { + *(*int32)(unsafe.Pointer(pMem + 16)) &= libc.CplInt32(1) + } return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } @@ -38240,7 +38484,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType if zPType != 0 { return zPType } - return ts + 1534 + return ts + 1554 }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -38472,7 +38716,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 79990) + return Xsqlite3CorruptError(tls, 81276) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -38704,7 +38948,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -38766,7 +39010,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) negInt = 1 - zNeg = ts + 1534 + zNeg = ts + 1554 rc = SQLITE_OK __1: @@ -38807,7 +39051,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4918 + zNeg = ts + 4932 __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { @@ -38826,7 +39070,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4920, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4934, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -39130,7 +39374,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80627) + return Xsqlite3CorruptError(tls, 81913) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -39145,14 +39389,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 80633) + return Xsqlite3CorruptError(tls, 81919) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 80639) + return Xsqlite3CorruptError(tls, 81925) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -39211,6 +39455,9 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { return (*Mem)(unsafe.Pointer(p)).Fn } + if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32(enc) != SQLITE_UTF8 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != SQLITE_UTF8 { + return (*Mem)(unsafe.Pointer(p)).Fn + } if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Blob != 0 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { return (*Mem)(unsafe.Pointer(p)).Fn + *(*int32)(unsafe.Pointer(p)) @@ -39235,10 +39482,10 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { libc.Xmemset(tls, p+136, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+136)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { - (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p + (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FppVPrev = p + 16 } - (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe - (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpVNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe + (*Vdbe)(unsafe.Pointer(p)).FppVPrev = db + 8 (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse @@ -39276,21 +39523,29 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } -// Swap all content between two VDBE structures. +// Swap byte-code between two VDBE structures. +// +// This happens after pB was previously run and returned +// SQLITE_SCHEMA. The statement was then reprepared in pA. +// This routine transfers the new bytecode in pA over to pB +// so that pB can be run again. The old pB byte code is +// moved back to pA so that it will be cleaned up when pA is +// finalized. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { var tmp Vdbe var pTmp uintptr + var ppTmp uintptr var zTmp uintptr tmp = *(*Vdbe)(unsafe.Pointer(pA)) *(*Vdbe)(unsafe.Pointer(pA)) = *(*Vdbe)(unsafe.Pointer(pB)) *(*Vdbe)(unsafe.Pointer(pB)) = tmp - pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpNext - (*Vdbe)(unsafe.Pointer(pA)).FpNext = (*Vdbe)(unsafe.Pointer(pB)).FpNext - (*Vdbe)(unsafe.Pointer(pB)).FpNext = pTmp - pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpPrev - (*Vdbe)(unsafe.Pointer(pA)).FpPrev = (*Vdbe)(unsafe.Pointer(pB)).FpPrev - (*Vdbe)(unsafe.Pointer(pB)).FpPrev = pTmp + pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpVNext + (*Vdbe)(unsafe.Pointer(pA)).FpVNext = (*Vdbe)(unsafe.Pointer(pB)).FpVNext + (*Vdbe)(unsafe.Pointer(pB)).FpVNext = pTmp + ppTmp = (*Vdbe)(unsafe.Pointer(pA)).FppVPrev + (*Vdbe)(unsafe.Pointer(pA)).FppVPrev = (*Vdbe)(unsafe.Pointer(pB)).FppVPrev + (*Vdbe)(unsafe.Pointer(pB)).FppVPrev = ppTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp @@ -39639,85 +39894,117 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { } func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { - var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var nMaxArgs int32 var pOp uintptr - var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse - var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel + var pParse uintptr + var aLabel uintptr + var n int32 + nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + pParse = (*Vdbe)(unsafe.Pointer(p)).FpParse + aLabel = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 1, 0x2) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x1) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 - for 1 != 0 { - if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { - switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { - case OP_Transaction: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) - } - } - fallthrough - case OP_AutoCommit: - fallthrough - case OP_Savepoint: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) - break - - } - fallthrough - case OP_Checkpoint: - fallthrough - case OP_Vacuum: - fallthrough - case OP_JournalMode: - { - libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) - libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) - break +__1: + if !(1 != 0) { + goto __2 + } - } - fallthrough - case OP_VUpdate: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 - } - break + if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE) { + goto __3 + } - } - fallthrough - case OP_VFilter: - { - var n int32 + switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { + case OP_Transaction: + goto __5 + case OP_AutoCommit: + goto __6 + case OP_Savepoint: + goto __7 + case OP_Checkpoint: + goto __8 + case OP_Vacuum: + goto __9 + case OP_JournalMode: + goto __10 + case OP_Init: + goto __11 + case OP_VUpdate: + goto __12 + case OP_VFilter: + goto __13 + default: + goto __14 + } + goto __4 +__5: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { + goto __15 + } + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) +__15: + ; +__6: +__7: + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) + goto __4 - n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 - if n > nMaxArgs { - nMaxArgs = n - } +__8: +__9: +__10: + libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 1, 0x2) + libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x1) + goto __4 - } - fallthrough - default: - { - if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { - (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) - } - break +__11: + ; + goto resolve_p2_values_loop_exit - } - } +__12: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs) { + goto __16 + } + nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 +__16: + ; + goto __4 - } - if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { - break - } - pOp -= 24 +__13: + ; + n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 + if !(n > nMaxArgs) { + goto __17 + } + nMaxArgs = n +__17: + ; +__14: + if !((*Op)(unsafe.Pointer(pOp)).Fp2 < 0) { + goto __18 } - if aLabel != 0 { - Xsqlite3DbFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) - (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) + + (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) +__18: + ; + goto __4 + +__4: + ; +__3: + ; + pOp -= 24 + goto __1 +__2: + ; +resolve_p2_values_loop_exit: + if !(aLabel != 0) { + goto __19 } + Xsqlite3DbNNFreeNN(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) + (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) +__19: + ; (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs @@ -39817,6 +40104,16 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { } } +// If the previous opcode is an OP_Column that delivers results +// into register iDest, then add the OPFLAG_TYPEOFARG flag to that +// opcode. +func Xsqlite3VdbeTypeofColumn(tls *libc.TLS, p uintptr, iDest int32) { + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, p) + if (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDest && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { + *(*U16)(unsafe.Pointer(pOp + 2)) |= U16(OPFLAG_TYPEOFARG) + } +} + // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { @@ -39844,7 +40141,7 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { - Xsqlite3DbFreeNN(tls, db, pDef) + Xsqlite3DbNNFreeNN(tls, db, pDef) } } @@ -39852,12 +40149,12 @@ func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { @@ -39876,7 +40173,9 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { fallthrough case -14: { - Xsqlite3DbFree(tls, db, p4) + if p4 != 0 { + Xsqlite3DbNNFreeNN(tls, db, p4) + } break } @@ -39927,7 +40226,7 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { } pOp -= 24 } - Xsqlite3DbFreeNN(tls, db, aOp) + Xsqlite3DbNNFreeNN(tls, db, aOp) } } @@ -40056,8 +40355,8 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { } } -// Return the opcode for a given address. If the address is -1, then -// return the most recently inserted opcode. +// Return the opcode for a given address. The address must be non-negative. +// See sqlite3VdbeGetLastOp() to get the most recently added opcode. // // If a memory allocation error has occurred prior to the calling of this // routine, then a pointer to a dummy VdbeOp will be returned. That opcode @@ -40068,10 +40367,6 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { - if addr < 0 { - addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 - } - if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return uintptr(unsafe.Pointer(&dummy)) } else { @@ -40082,6 +40377,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { var dummy VdbeOp +// Return the most recently added opcode +func Xsqlite3VdbeGetLastOp(tls *libc.TLS, p uintptr) uintptr { + return Xsqlite3VdbeGetOp(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) +} + // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { @@ -40097,34 +40397,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4925, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4939, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) for j = 0; j < int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField); j++ { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(j)*8)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { - zColl = ts + 1534 + zColl = ts + 1554 } - if libc.Xstrcmp(tls, zColl, ts+1079) == 0 { - zColl = ts + 4930 + if libc.Xstrcmp(tls, zColl, ts+1099) == 0 { + zColl = ts + 4944 } - Xsqlite3_str_appendf(tls, bp+144, ts+4932, + Xsqlite3_str_appendf(tls, bp+144, ts+4946, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4940 + return ts + 4954 } - return ts + 1534 + return ts + 1554 }(), zColl)) } - Xsqlite3_str_append(tls, bp+144, ts+4943, 1) + Xsqlite3_str_append(tls, bp+144, ts+4957, 1) break } @@ -40132,7 +40432,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4945, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4959, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -40140,32 +40440,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -7: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -15: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144, ts+4954, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4968, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144, ts+4961, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4975, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -12: { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -40175,13 +40475,13 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0 { zP4 = (*Mem)(unsafe.Pointer(pMem)).Fz } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+144, ts+1314, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1334, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { - Xsqlite3_str_appendf(tls, bp+144, ts+1308, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1328, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1535 + zP4 = ts + 1555 } else { - zP4 = ts + 4964 + zP4 = ts + 4978 } break @@ -40189,7 +40489,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { case -11: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144, ts+4971, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4985, libc.VaList(bp+120, pVtab)) break } @@ -40200,20 +40500,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { var n U32 = *(*U32)(unsafe.Pointer(ai)) for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144, ts+4979, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4993, libc.VaList(bp+128, func() int32 { if i == U32(1) { return '[' } return ',' }(), *(*U32)(unsafe.Pointer(ai + uintptr(i)*4)))) } - Xsqlite3_str_append(tls, bp+144, ts+4984, 1) + Xsqlite3_str_append(tls, bp+144, ts+4998, 1) break } case -4: { - zP4 = ts + 4986 + zP4 = ts + 5000 break } @@ -40238,7 +40538,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4994, ts + 4996, ts + 4998, ts + 5003} +var encnames = [4]uintptr{ts + 5008, ts + 5010, ts + 5012, ts + 5017} // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -40340,7 +40640,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { Xsqlite3VdbeMemRelease(tls, p) (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { - Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) + Xsqlite3DbNNFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } @@ -40689,8 +40989,8 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { } var azColName = [12]uintptr{ - ts + 5008, ts + 5013, ts + 5020, ts + 5023, ts + 5026, ts + 5029, ts + 5032, ts + 5035, - ts + 5043, ts + 5046, ts + 5053, ts + 5061, + ts + 5022, ts + 5027, ts + 5034, ts + 5037, ts + 5040, ts + 5043, ts + 5046, ts + 5049, + ts + 5057, ts + 5060, ts + 5067, ts + 5075, } // Close a VDBE cursor and release all the resources that cursor @@ -40899,7 +41199,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { var nMainFile int32 nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5068, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5082, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -40907,16 +41207,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5080, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5094, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5108, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5109, + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5123, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) @@ -41062,7 +41362,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_CONSTRAINT | int32(3)<<8 (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) - Xsqlite3VdbeError(tls, p, ts+5122, 0) + Xsqlite3VdbeError(tls, p, ts+5136, 0) if int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL == 0 { return SQLITE_ERROR } @@ -41342,7 +41642,7 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if (*Vdbe)(unsafe.Pointer(p)).FaColName != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext @@ -41352,14 +41652,16 @@ func sqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_INIT_STATE { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) if (*Vdbe)(unsafe.Pointer(p)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) } if (*Vdbe)(unsafe.Pointer(p)).FpFree != 0 { - Xsqlite3DbFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) } } vdbeFreeOpArray(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaOp, (*Vdbe)(unsafe.Pointer(p)).FnOp) - Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + if (*Vdbe)(unsafe.Pointer(p)).FzSql != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) + } } // Delete an entire VDBE. @@ -41370,16 +41672,12 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { sqlite3VdbeClearObject(tls, db, p) if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { - if (*Vdbe)(unsafe.Pointer(p)).FpPrev != 0 { - (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpPrev)).FpNext = (*Vdbe)(unsafe.Pointer(p)).FpNext - } else { - (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = (*Vdbe)(unsafe.Pointer(p)).FpNext - } - if (*Vdbe)(unsafe.Pointer(p)).FpNext != 0 { - (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpNext)).FpPrev = (*Vdbe)(unsafe.Pointer(p)).FpPrev + *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FppVPrev)) = (*Vdbe)(unsafe.Pointer(p)).FpVNext + if (*Vdbe)(unsafe.Pointer(p)).FpVNext != 0 { + (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpVNext)).FppVPrev = (*Vdbe)(unsafe.Pointer(p)).FppVPrev } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been @@ -41396,7 +41694,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 84326) + return Xsqlite3CorruptError(tls, 85647) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -41947,16 +42245,20 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85253)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) return 0 } - for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { + for 1 != 0 { if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { @@ -41974,7 +42276,11 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { - rc = +1 + if *(*U32)(unsafe.Pointer(bp + 64)) == U32(10) { + rc = -1 + } else { + rc = +1 + } } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { @@ -42004,7 +42310,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85330)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86651)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -42038,7 +42344,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85360)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86681)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -42061,7 +42367,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } } else { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) - rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) + rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0) && *(*U32)(unsafe.Pointer(bp + 64)) != U32(10)) } if rc != 0 { @@ -42083,7 +42389,14 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) + if d1 > uint32(nKey1) { + break + } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) + if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + return 0 + } } (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) @@ -42227,7 +42540,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 85562)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) return 0 __7: ; @@ -42398,7 +42711,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 85720) + return Xsqlite3CorruptError(tls, 87046) } // Compare the key of the index entry that cursor pC is pointing to against @@ -42424,7 +42737,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 85753) + return Xsqlite3CorruptError(tls, 87079) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -42467,7 +42780,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { var p uintptr - for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { + for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpVNext { libc.SetBitFieldPtr8Uint32(p+200, Bft(iCode+1), 6, 0xc0) } } @@ -42535,13 +42848,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5152 + zContext = ts + 5166 } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5171 + zContext = ts + 5185 } else { - zContext = ts + 5190 + zContext = ts + 5204 } - zMsg = Xsqlite3_mprintf(tls, ts+5199, + zMsg = Xsqlite3_mprintf(tls, ts+5213, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -42572,7 +42885,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { Xsqlite3VdbeMemReleaseMalloc(tls, pMem) } } - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -42627,7 +42940,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*56) } - Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) + Xsqlite3DbNNFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp)).FaNew) } } @@ -42646,7 +42959,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { func vdbeSafety(tls *libc.TLS, p uintptr) int32 { if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5235, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5249, 0) return 1 } else { return 0 @@ -42656,7 +42969,7 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5280, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5294, 0) return 1 } else { return vdbeSafety(tls, p) @@ -42698,14 +43011,15 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86115) + return Xsqlite3MisuseError(tls, 87442) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { invokeProfileCallback(tls, db, v) } - rc = Xsqlite3VdbeFinalize(tls, v) + rc = Xsqlite3VdbeReset(tls, v) + Xsqlite3VdbeDelete(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } @@ -42927,6 +43241,10 @@ var aType = [64]U8{ U8(SQLITE_NULL), } +func Xsqlite3_value_encoding(tls *libc.TLS, pVal uintptr) int32 { + return int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) +} + // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) @@ -43138,7 +43456,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { // Force an SQLITE_TOOBIG error. func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5320, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5334, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } @@ -43329,7 +43647,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 86797) + return Xsqlite3MisuseError(tls, 88129) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -43404,7 +43722,7 @@ func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) if pVal == uintptr(0) { return SQLITE_MISUSE } - pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5343) + pRhs = Xsqlite3_value_pointer(tls, pVal, ts+5357) if pRhs == uintptr(0) { return SQLITE_MISUSE } @@ -43833,35 +44151,34 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { +func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 87443) + return Xsqlite3MisuseError(tls, 88775) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) != VDBE_READY_STATE { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+5353, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 87451) + ts+5367, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 88783) } - if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { + if i >= uint32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) return SQLITE_RANGE } - i-- pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i)*56 Xsqlite3VdbeMemRelease(tls, pVar) (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { - if i >= 31 { + if i >= uint32(31) { return 0x80000000 } return U32(1) << i @@ -43876,7 +44193,7 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x var pVar uintptr var rc int32 - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 @@ -43908,7 +44225,7 @@ func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, rValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43923,7 +44240,7 @@ func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, iValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -43934,7 +44251,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } @@ -43944,7 +44261,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, pPtr, zPTtype, xDestructor) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -44030,7 +44347,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { var rc int32 var p uintptr = pStmt - rc = vdbeUnbind(tls, p, i) + rc = vdbeUnbind(tls, p, U32(i-1)) if rc == SQLITE_OK { Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, n) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -44174,7 +44491,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { - pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext + pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpVNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext @@ -44192,8 +44509,11 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart Xsqlite3VdbeDelete(tls, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) + (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpTrueEnd Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp)) = *(*U32)(unsafe.Pointer(pVdbe + 212 + uintptr(op)*4)) @@ -44257,7 +44577,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 87937) + rc = Xsqlite3MisuseError(tls, 89271) goto preupdate_old_out __1: ; @@ -44401,7 +44721,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 88039) + rc = Xsqlite3MisuseError(tls, 89373) goto preupdate_new_out __1: ; @@ -44573,7 +44893,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*uint8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5393, 3) + Xsqlite3_str_append(tls, bp+48, ts+5407, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -44609,11 +44929,11 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 84))-1)*56 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { - Xsqlite3_str_append(tls, bp+48, ts+1535, 4) + Xsqlite3_str_append(tls, bp+48, ts+1555, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+1314, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1334, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Real != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+4911, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4925, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -44628,21 +44948,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 88 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5397, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+88) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5417, 2) + Xsqlite3_str_append(tls, bp+48, ts+5431, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5420, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5434, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5425, 1) + Xsqlite3_str_append(tls, bp+48, ts+5439, 1) } } } @@ -44698,7 +45018,8 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType } func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { - var iValue I64 = I64(rValue) + var iValue I64 + iValue = Xsqlite3RealToI64(tls, rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 @@ -44802,12 +45123,11 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { } func numericType(tls *libc.TLS, pMem uintptr) U16 { - if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { - return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) - } - if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { - return computeNumericType(tls, pMem) + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) != 0 { + return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal | MEM_Null)) } + + return computeNumericType(tls, pMem) return U16(0) } @@ -44859,11 +45179,11 @@ func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { } var azTypes = [5]uintptr{ - ts + 1095, - ts + 1107, - ts + 1112, - ts + 1090, - ts + 1535, + ts + 1115, + ts + 1127, + ts + 1132, + ts + 1110, + ts + 1555, } // Execute as much of a VDBE program as we can. @@ -44901,7 +45221,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nByte I64 var flags1 U16 var flags2 U16 - var flags U16 var type1 U16 var type2 U16 var iA I64 @@ -44930,11 +45249,14 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var iAddr U32 var c int32 var c1 int32 - var doTheJump int32 var pC uintptr + var typeMask U16 + var serialType U32 + var pC1 uintptr + var pC2 uintptr var iMap U32 var p22 U32 - var pC1 uintptr + var pC3 uintptr var pCrsr uintptr var aOffset uintptr var len int32 @@ -45004,42 +45326,43 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr - var pC2 uintptr + var pC4 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 var oc int32 - var pC3 uintptr + var pC5 uintptr var nField2 int32 var iKey I64 var eqOnly int32 - var pC4 uintptr + var pC6 uintptr var nStep int32 - var pC5 uintptr - var pC6 uintptr + var pC7 uintptr + var pCur1 uintptr + var pC8 uintptr var alreadyExists int32 var ii1 int32 - var pC7 uintptr + var pC9 uintptr var pIdxKey uintptr - var pC8 uintptr + var pC10 uintptr var pCrsr2 uintptr var iKey1 U64 - var pC9 uintptr + var pC11 uintptr var cnt1 int32 var pMem uintptr var pFrame1 uintptr var pData uintptr var pKey uintptr - var pC10 uintptr + var pC12 uintptr var seekResult int32 var zDb uintptr var pTab1 uintptr @@ -45047,52 +45370,52 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pDest1 uintptr var pSrc uintptr var iKey2 I64 - var pC11 uintptr + var pC13 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 - var pC12 uintptr + var pC14 uintptr var nKeyCol int32 - var pC13 uintptr - var pC14 uintptr + var pC15 uintptr + var pC16 uintptr var pCrsr3 uintptr var n3 U32 - var pC15 uintptr + var pC17 uintptr var pVtab uintptr var pModule uintptr - var pC16 uintptr - var pC17 uintptr + var pC18 uintptr + var pC19 uintptr var pCrsr4 uintptr - var pC18 uintptr + var pC20 uintptr var pCrsr5 uintptr var sz I64 - var pC19 uintptr - var pCrsr6 uintptr - - var pC20 uintptr var pC21 uintptr + var pCrsr6 uintptr var pC22 uintptr var pC23 uintptr - var pCrsr7 uintptr var pC24 uintptr + var pC25 uintptr + var pCrsr7 uintptr + + var pC26 uintptr var pTabCur uintptr - var pC25 uintptr + var pC27 uintptr var nCellKey I64 - var pCur1 uintptr + var pCur2 uintptr - var pC26 uintptr + var pC28 uintptr var res11 int32 var iDb2 int32 - var pC27 uintptr + var pC29 uintptr var pDb3 uintptr var iDb3 int32 @@ -45134,19 +45457,19 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var eOld int32 var zFilename uintptr var pBt2 uintptr - var pC28 uintptr - var pC29 uintptr + var pC30 uintptr + var pC31 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr var zTab uintptr - var pCur2 uintptr + var pCur3 uintptr var pVtab1 uintptr var pModule1 uintptr - var pC30 uintptr + var pC32 uintptr var pRhs uintptr var nArg int32 var iQuery int32 @@ -45155,7 +45478,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr - var pCur3 uintptr + var pCur4 uintptr var res12 int32 var i7 int32 var apArg uintptr @@ -45163,11 +45486,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var pModule3 uintptr var pDest2 uintptr - var pCur4 uintptr + var pCur5 uintptr var pVtab4 uintptr var pModule4 uintptr var res13 int32 - var pCur5 uintptr + var pCur6 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 @@ -45403,7 +45726,7 @@ __5: case OP_IsNull: goto __66 - case OP_IsNullOrType: + case OP_IsType: goto __67 case OP_ZeroOrNull: @@ -45898,20 +46221,20 @@ __201: goto __204 } - Xsqlite3VdbeError(tls, p, ts+5427, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5441, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __206 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5448, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5462, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __206: ; goto __205 __204: - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __205: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5455, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5469, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __203: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -46301,14 +46624,14 @@ __36: __37: __38: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - type1 = numericType(tls, pIn1) + type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - type2 = numericType(tls, pIn2) + type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) if !(int32(type1)&int32(type2)&MEM_Int != 0) { goto __248 } +int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { @@ -46386,72 +46709,80 @@ __250: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __249 __248: - if !(int32(flags)&MEM_Null != 0) { + if !((int32(type1)|int32(type2))&MEM_Null != 0) { goto __263 } goto arithmetic_result_is_null goto __264 __263: + type1 = numericType(tls, pIn1) + type2 = numericType(tls, pIn2) + if !(int32(type1)&int32(type2)&MEM_Int != 0) { + goto __265 + } + goto int_math +__265: + ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __266 - case OP_Subtract: goto __267 - case OP_Multiply: + case OP_Subtract: goto __268 - case OP_Divide: + case OP_Multiply: goto __269 - default: + case OP_Divide: goto __270 + default: + goto __271 } - goto __265 -__266: - rB = rB + rA - goto __265 + goto __266 __267: - rB = rB - rA - goto __265 + rB = rB + rA + goto __266 __268: - rB = rB * rA - goto __265 + rB = rB - rA + goto __266 __269: + rB = rB * rA + goto __266 +__270: if !(rA == float64(0)) { - goto __271 + goto __272 } goto arithmetic_result_is_null -__271: +__272: ; rB = rB / rA - goto __265 + goto __266 -__270: +__271: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; if !(iA == int64(-1)) { - goto __273 + goto __274 } iA = int64(1) -__273: +__274: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __265 + goto __266 -__265: +__266: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __274 + goto __275 } goto arithmetic_result_is_null -__274: +__275: ; *(*float64)(unsafe.Pointer(pOut)) = rB (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -46468,10 +46799,10 @@ arithmetic_result_is_null: __39: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __275 + goto __276 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__275: +__276: ; goto __8 @@ -46483,33 +46814,33 @@ __43: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __276 + goto __277 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 -__276: +__277: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __277 + goto __278 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __278 -__277: + goto __279 +__278: if !(int32(op) == OP_BitOr) { - goto __279 + goto __280 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __280 -__279: + goto __281 +__280: if !(iB1 != int64(0)) { - goto __281 + goto __282 } if !(iB1 < int64(0)) { - goto __282 + goto __283 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -46518,43 +46849,43 @@ __279: } else { iB1 = int64(64) } -__282: +__283: ; if !(iB1 >= int64(64)) { - goto __283 + goto __284 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224)) = int64(-1) } - goto __284 -__283: + goto __285 +__284: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __285 + goto __286 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __286 -__285: + goto __287 +__286: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __287 + goto __288 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__287: +__288: ; -__286: +__287: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__284: +__285: ; -__281: +__282: ; -__280: +__281: ; -__278: +__279: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -46570,26 +46901,26 @@ __44: __45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __288 + goto __289 } applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __290 + goto __291 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __291 -__290: - goto jump_to_p2 + goto __292 __291: + goto jump_to_p2 +__292: ; -__289: +__290: ; -__288: +__289: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 @@ -46597,12 +46928,12 @@ __288: __46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __292 + goto __293 } Xsqlite3VdbeMemRealify(tls, pIn1) -__292: +__293: ; goto __8 @@ -46617,17 +46948,17 @@ __47: return 0 }() if !(rc != 0) { - goto __293 + goto __294 } goto abort_due_to_error -__293: +__294: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; goto __8 @@ -46642,163 +46973,163 @@ __53: flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __295 + goto __296 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __296 + goto __297 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __298 + goto __299 } goto jump_to_p2 -__298: +__299: ; iCompare = +1 - goto __297 -__296: + goto __298 +__297: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __299 + goto __300 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __301 + goto __302 } goto jump_to_p2 -__301: +__302: ; iCompare = -1 - goto __300 -__299: + goto __301 +__300: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = 0 -__300: +__301: ; -__297: +__298: ; goto __8 -__295: +__296: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __303 + goto __304 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __305 + goto __306 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __307 + goto __308 } res = 0 - goto __308 -__307: + goto __309 +__308: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__308: +__309: ; - goto __306 -__305: + goto __307 +__306: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __309 + goto __310 } goto jump_to_p2 -__309: +__310: ; iCompare = 1 goto __8 -__306: +__307: ; - goto __304 -__303: + goto __305 +__304: affinity = uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __310 + goto __311 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __312 + goto __313 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __313 + goto __314 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__313: +__314: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn3, 0) -__314: +__315: ; -__312: +__313: ; - goto __311 -__310: + goto __312 +__311: if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __315 + goto __316 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __316 + goto __317 } Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(1)) flags11 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags11)&MEM_TypeMask) if !(pIn1 == pIn3) { - goto __317 + goto __318 } flags3 = U16(int32(flags11) | MEM_Str) -__317: +__318: ; -__316: +__317: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __318 + goto __319 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__318: +__319: ; -__315: +__316: ; -__311: +__312: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__304: +__305: ; if !(res < 0) { - goto __319 + goto __320 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __320 -__319: + goto __321 +__320: if !(res == 0) { - goto __321 + goto __322 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __322 -__321: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __323 __322: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__323: ; -__320: +__321: ; iCompare = res @@ -46807,20 +47138,20 @@ __320: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __323 + goto __324 } goto jump_to_p2 -__323: +__324: ; goto __8 __54: ; if !(iCompare == 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; goto __8 @@ -46830,15 +47161,15 @@ __55: __56: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __325 + goto __326 } aPermute = uintptr(0) - goto __326 -__325: + goto __327 +__326: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__326: +__327: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46846,9 +47177,9 @@ __326: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__327: +__328: if !(i < n2) { - goto __329 + goto __330 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -46860,52 +47191,52 @@ __327: bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { - goto __330 + goto __331 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i))))&KEYINFO_ORDER_BIGNULL != 0 && (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*56)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*56)).Fflags)&MEM_Null != 0)) { - goto __331 + goto __332 } iCompare = -iCompare -__331: +__332: ; if !(bRev != 0) { - goto __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; - goto __329 -__330: + goto __330 +__331: ; - goto __328 -__328: - i++ - goto __327 goto __329 __329: + i++ + goto __328 + goto __330 +__330: ; goto __8 __57: ; if !(iCompare < 0) { - goto __333 + goto __334 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __334 -__333: + goto __335 +__334: if !(iCompare == 0) { - goto __335 + goto __336 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __336 -__335: + goto __337 +__336: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__336: +__337: ; -__334: +__335: ; goto __8 @@ -46914,24 +47245,24 @@ __59: v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { - goto __337 + goto __338 } v1 = int32(and_logic[v1*3+v2]) - goto __338 -__337: - v1 = int32(or_logic[v1*3+v2]) + goto __339 __338: + v1 = int32(or_logic[v1*3+v2]) +__339: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __339 + goto __340 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __340 -__339: + goto __341 +__340: *(*I64)(unsafe.Pointer(pOut)) = I64(v1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) -__340: +__341: ; goto __8 @@ -46945,13 +47276,13 @@ __61: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __341 + goto __342 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __342 -__341: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __343 __342: + Xsqlite3VdbeMemSetNull(tls, pOut) +__343: ; goto __8 @@ -46960,38 +47291,38 @@ __62: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __343 + goto __344 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__343: +__344: ; goto __8 __63: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __344 + goto __345 } iAddr = U32(int32((int64(pOp) - int64((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 24)) if !(int32(*(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))))&(int32(1)<<(iAddr&U32(7))) != 0) { - goto __346 + goto __347 } goto jump_to_p2 -__346: +__347: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __345 -__344: + goto __346 +__345: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; -__345: +__346: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 @@ -47000,10 +47331,10 @@ __64: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; goto __8 @@ -47011,10 +47342,10 @@ __65: c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) if !(c1 != 0) { - goto __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; goto __8 @@ -47022,35 +47353,73 @@ __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; goto __8 __67: - pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) + ; + if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { + goto __352 + } + pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(doTheJump != 0) { - goto __351 + if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { + goto __354 + } + serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) + if !(serialType >= U32(12)) { + goto __356 + } + if !(serialType&U32(1) != 0) { + goto __358 + } + typeMask = U16(0x04) + goto __359 +__358: + typeMask = U16(0x08) +__359: + ; + goto __357 +__356: + ; + typeMask = U16(aMask[serialType]) +__357: + ; + goto __355 +__354: + typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) + +__355: + ; + goto __353 +__352: + ; + typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) + +__353: + ; + if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { + goto __360 } goto jump_to_p2 -__351: +__360: ; goto __8 __68: if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fflags)&MEM_Null != 0) { - goto __352 + goto __361 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __353 -__352: + goto __362 +__361: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) -__353: +__362: ; goto __8 @@ -47058,372 +47427,373 @@ __69: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __354 + goto __363 } goto jump_to_p2 -__354: +__363: ; goto __8 __70: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { - goto __355 + pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { + goto __364 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__355: +__364: ; goto __8 __71: ; - pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { - goto __356 + if !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { + goto __365 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __357 -__356: - if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { - goto __358 + goto __366 +__365: + if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { + goto __367 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC) + rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __359 + goto __368 } goto abort_due_to_error -__359: +__368: ; -__358: +__367: ; - if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { - goto __360 + if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { + goto __369 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __361 -__360: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) -__361: + goto __370 +__369: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__370: ; -__357: +__366: ; goto __8 __72: ; - pC1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) op_column_restart: ; - aOffset = (*VdbeCursor)(unsafe.Pointer(pC1)).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __362 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + goto __371 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { + goto __373 } - if !(int32((*VdbeCursor)(unsafe.Pointer(pC1)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult > 0) { - goto __366 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { + goto __375 } - pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FseekResult)*56 + pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = libc.AssignPtrUint32(pC1+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __367 -__366: + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + goto __376 +__375: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__367: +__376: ; - goto __365 -__364: - pCrsr = *(*uintptr)(unsafe.Pointer(pC1 + 48)) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FdeferredMoveto != 0) { - goto __368 + goto __374 +__373: + pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { + goto __377 } - if !(*(*uintptr)(unsafe.Pointer(pC1 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC1 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __370 + if !(*(*uintptr)(unsafe.Pointer(pC3 + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 16)) + uintptr(U32(1)+p22)*4))) > U32(0)) { + goto __379 } - pC1 = (*VdbeCursor)(unsafe.Pointer(pC1)).FpAltCursor + pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__370: +__379: ; - rc = Xsqlite3VdbeFinishMoveto(tls, pC1) + rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __371 + goto __380 } goto abort_due_to_error -__371: +__380: ; - goto __369 -__368: + goto __378 +__377: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __372 + goto __381 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __373 + goto __382 } goto abort_due_to_error -__373: +__382: ; goto op_column_restart -__372: +__381: ; -__369: +__378: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC1+108) + (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__365: +__374: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow)))) < U32(0x80)) { - goto __374 + (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + if !(libc.AssignPtrUint32(aOffset, U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow)))) < U32(0x80)) { + goto __383 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(1) - goto __375 -__374: - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow, aOffset)) -__375: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) + goto __384 +__383: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__384: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __376 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + goto __385 } - (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(pC1)).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) - if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize) { - goto __378 + if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { + goto __387 } goto op_column_corrupt -__378: +__387: ; - goto __377 -__376: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + goto __386 +__385: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__377: +__386: ; - goto __363 -__362: - if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48))) != 0) { - goto __379 + goto __372 +__371: + if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { + goto __388 } - rc = Xsqlite3VdbeHandleMovedCursor(tls, pC1) + rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __380 + goto __389 } goto abort_due_to_error -__380: +__389: ; goto op_column_restart -__379: +__388: ; -__363: +__372: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __381 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __390 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __383 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + goto __392 } - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __385 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __394 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __387 + goto __396 } goto abort_due_to_error -__387: +__396: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __386 -__385: - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow -__386: + goto __395 +__394: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__395: ; op_column_read_header: - i1 = int32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) + i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i1)*4))) - zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset) + zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__388: - if !(libc.AssignPtrUint32(pC1+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __391 +__397: + if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { + goto __400 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __392 -__391: + goto __401 +__400: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+288)) - *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) + *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 288)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288)))) -__392: +__401: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __389 -__389: + goto __398 +__398: if U32(i1) <= p22 && zHdr < zEndHdr { - goto __388 + goto __397 } - goto __390 -__390: + goto __399 +__399: ; - if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) || - offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC1)).FpayloadSize)) { - goto __393 + if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || + offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { + goto __402 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __394 + goto __403 } i1 = 0 zHdr = zEndHdr - goto __395 -__394: - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __396 + goto __404 +__403: + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __405 } Xsqlite3VdbeMemRelease(tls, bp+232) -__396: +__405: ; goto op_column_corrupt -__395: +__404: ; -__393: +__402: ; - (*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed = U16(i1) - (*VdbeCursor)(unsafe.Pointer(pC1)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FaRow == uintptr(0)) { - goto __397 + (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(i1) + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__397: +__406: ; - goto __384 -__383: + goto __393 +__392: *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) -__384: +__393: ; - if !(U32((*VdbeCursor)(unsafe.Pointer(pC1)).FnHdrParsed) <= p22) { - goto __398 + if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { + goto __407 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __399 + goto __408 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __400 -__399: + goto __409 +__408: Xsqlite3VdbeMemSetNull(tls, pDest) -__400: +__409: ; goto op_column_out -__398: +__407: ; - goto __382 -__381: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC1 + 112 + uintptr(p22)*4)) -__382: + goto __391 +__390: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__391: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __401 + goto __410 } Xsqlite3VdbeMemSetNull(tls, pDest) -__401: +__410: ; - if !((*VdbeCursor)(unsafe.Pointer(pC1)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __402 + if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { + goto __411 } - zData = (*VdbeCursor)(unsafe.Pointer(pC1)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __404 + goto __413 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __405 -__404: + goto __414 +__413: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 288))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __406 + goto __415 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __408 + goto __417 } goto too_big -__408: +__417: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __409 + goto __418 } goto no_mem -__409: +__418: ; - goto __407 -__406: + goto __416 +__415: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc -__407: +__416: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = uint8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 288))&U32(1)] -__405: +__414: ; - goto __403 -__402: + goto __412 +__411: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 288)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 288))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 288))))) == 0) { - goto __410 + goto __419 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __411 -__410: + goto __420 +__419: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __412 + goto __421 } goto too_big -__412: +__421: ; - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC1 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __413 + goto __422 } goto abort_due_to_error -__413: +__422: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__411: +__420: ; -__403: +__412: ; op_column_out: ; @@ -47431,15 +47801,15 @@ op_column_out: op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __414 + goto __423 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 - goto __415 -__414: - rc = Xsqlite3CorruptError(tls, 91363) + goto __424 +__423: + rc = Xsqlite3CorruptError(tls, 92777) goto abort_due_to_error -__415: +__424: ; __73: ; @@ -47448,124 +47818,124 @@ __73: aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__416: +__425: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __418 + goto __427 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __419 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __420 + goto __429 } - goto __417 -__420: + goto __426 +__429: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __421 + goto __430 } pIn1 += 56 - goto __417 -__421: + goto __426 +__430: ; -__419: +__428: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __422 + goto __431 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf >> 0) { case COLTYPE_BLOB: - goto __424 + goto __433 case COLTYPE_INTEGER: - goto __425 + goto __434 case COLTYPE_INT: - goto __426 + goto __435 case COLTYPE_TEXT: - goto __427 + goto __436 case COLTYPE_REAL: - goto __428 + goto __437 default: - goto __429 + goto __438 } - goto __423 -__424: + goto __432 +__433: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __430 + goto __439 } goto vdbe_type_error -__430: +__439: ; - goto __423 + goto __432 -__425: -__426: +__434: +__435: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __431 + goto __440 } goto vdbe_type_error -__431: +__440: ; - goto __423 + goto __432 -__427: +__436: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { - goto __432 + goto __441 } goto vdbe_type_error -__432: +__441: ; - goto __423 + goto __432 -__428: +__437: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __433 + goto __442 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __435 + goto __444 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __436 -__435: + goto __445 +__444: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__436: +__445: ; - goto __434 -__433: + goto __443 +__442: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __437 + goto __446 } goto vdbe_type_error -__437: +__446: ; -__434: +__443: ; - goto __423 + goto __432 -__429: - goto __423 +__438: + goto __432 -__423: +__432: ; -__422: +__431: ; pIn1 += 56 - goto __417 -__417: + goto __426 +__426: i2++ - goto __416 - goto __418 -__418: + goto __425 + goto __427 +__427: ; goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5479, + Xsqlite3VdbeError(tls, p, ts+5493, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf>>0)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -47575,40 +47945,40 @@ __74: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__438: +__447: if !(1 != 0) { - goto __439 + goto __448 } applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __440 + goto __449 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __441 + goto __450 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __442 -__441: + goto __451 +__450: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__442: +__451: ; -__440: +__449: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __443 + goto __452 } - goto __439 -__443: + goto __448 +__452: ; pIn1 += 56 - goto __438 -__439: + goto __447 +__448: ; goto __8 @@ -47626,339 +47996,339 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __444 + goto __453 } pRec = pData0 -__445: +__454: applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __448 + goto __457 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__448: +__457: ; zAffinity1++ pRec += 56 - goto __446 -__446: + goto __455 +__455: if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __445 + goto __454 } - goto __447 -__447: + goto __456 +__456: ; -__444: +__453: ; pRec = pLast -__449: +__458: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __452 + goto __461 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __454 + goto __463 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __455 -__454: + goto __464 +__463: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) -__455: +__464: ; nHdr++ - goto __453 -__452: + goto __462 +__461: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __456 + goto __465 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __458 + goto __467 } uu = U64(^i3) - goto __459 -__458: + goto __468 +__467: uu = U64(i3) -__459: +__468: ; nHdr++ if !(uu <= uint64(127)) { - goto __460 + goto __469 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __462 + goto __471 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __463 -__462: + goto __472 +__471: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__463: +__472: ; - goto __461 -__460: + goto __470 +__469: if !(uu <= uint64(32767)) { - goto __464 + goto __473 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __465 -__464: + goto __474 +__473: if !(uu <= uint64(8388607)) { - goto __466 + goto __475 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __467 -__466: + goto __476 +__475: if !(uu <= uint64(2147483647)) { - goto __468 + goto __477 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __469 -__468: + goto __478 +__477: if !(uu <= uint64(140737488355327)) { - goto __470 + goto __479 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __471 -__470: + goto __480 +__479: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __472 + goto __481 } *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __473 -__472: + goto __482 +__481: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) -__473: +__482: ; -__471: +__480: ; -__469: +__478: ; -__467: +__476: ; -__465: +__474: ; -__461: +__470: ; - goto __457 -__456: + goto __466 +__465: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __474 + goto __483 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __475 -__474: + goto __484 +__483: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __476 + goto __485 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __477 + goto __486 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __479 + goto __488 } goto no_mem -__479: +__488: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __478 -__477: + goto __487 +__486: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) -__478: +__487: ; -__476: +__485: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__475: +__484: ; -__457: +__466: ; -__453: +__462: ; if !(pRec == pData0) { - goto __480 + goto __489 } - goto __451 -__480: + goto __460 +__489: ; pRec -= 56 - goto __450 -__450: + goto __459 +__459: if 1 != 0 { - goto __449 + goto __458 } - goto __451 -__451: + goto __460 +__460: ; if !(nHdr <= 126) { - goto __481 + goto __490 } nHdr = nHdr + 1 - goto __482 -__481: + goto __491 +__490: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __483 + goto __492 } nHdr++ -__483: +__492: ; -__482: +__491: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __484 + goto __493 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __485 -__484: + goto __494 +__493: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __486 + goto __495 } goto too_big -__486: +__495: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __487 + goto __496 } goto no_mem -__487: +__496: ; -__485: +__494: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __488 + goto __497 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__488: +__497: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __489 + goto __498 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __490 -__489: + goto __499 +__498: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) -__490: +__499: ; pRec = pData0 -__491: +__500: if !(1 != 0) { - goto __492 + goto __501 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __493 + goto __502 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __495 + goto __504 } - goto __496 -__495: + goto __505 +__504: if !(serial_type == U32(7)) { - goto __497 + goto __506 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __498 -__497: + goto __507 +__506: *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) -__498: +__507: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__499: +__508: if !(1 != 0) { - goto __500 + goto __509 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __501 + goto __510 } - goto __500 -__501: + goto __509 +__510: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __499 -__500: + goto __508 +__509: ; zPayload += uintptr(len1) -__496: +__505: ; - goto __494 -__493: + goto __503 +__502: if !(serial_type < U32(0x80)) { - goto __502 + goto __511 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __504 + goto __513 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__504: +__513: ; - goto __503 -__502: + goto __512 +__511: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __505 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__505: +__514: ; -__503: +__512: ; -__494: +__503: ; if !(pRec == pLast) { - goto __506 + goto __515 } - goto __492 -__506: + goto __501 +__515: ; pRec += 56 - goto __491 -__492: + goto __500 +__501: ; goto __8 @@ -47967,20 +48337,20 @@ __76: pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __507 + goto __516 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __508 -__507: + goto __517 +__516: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __509 + goto __518 } goto abort_due_to_error -__509: +__518: ; -__508: +__517: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) @@ -47991,244 +48361,244 @@ __77: zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __510 + goto __519 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __512 + goto __521 } - Xsqlite3VdbeError(tls, p, ts+5520, 0) + Xsqlite3VdbeError(tls, p, ts+5534, 0) rc = SQLITE_BUSY - goto __513 -__512: + goto __522 +__521: nName = Xsqlite3Strlen30(tls, zName) rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { - goto __514 + goto __523 } goto abort_due_to_error -__514: +__523: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __515 + goto __524 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - goto __516 + goto __525 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __517 -__516: + goto __526 +__525: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ -__517: +__526: ; (*Savepoint)(unsafe.Pointer(pNew)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__515: +__524: ; -__513: +__522: ; - goto __511 -__510: + goto __520 +__519: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__518: +__527: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __520 + goto __529 } iSavepoint++ - goto __519 -__519: + goto __528 +__528: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __518 - goto __520 -__520: + goto __527 + goto __529 +__529: ; if !!(pSavepoint != 0) { - goto __521 + goto __530 } - Xsqlite3VdbeError(tls, p, ts+5571, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5585, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __522 -__521: + goto __531 +__530: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __523 + goto __532 } Xsqlite3VdbeError(tls, p, - ts+5593, 0) + ts+5607, 0) rc = SQLITE_BUSY - goto __524 -__523: + goto __533 +__532: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __525 + goto __534 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __527 + goto __536 } goto vdbe_return -__527: +__536: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __528 + goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__528: +__537: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __529 + goto __538 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __530 -__529: + goto __539 +__538: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) -__530: +__539: ; - goto __526 -__525: + goto __535 +__534: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __531 + goto __540 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__533: +__542: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __535 + goto __544 } rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, SQLITE_ABORT|int32(2)<<8, libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { - goto __536 + goto __545 } goto abort_due_to_error -__536: +__545: ; - goto __534 -__534: + goto __543 +__543: ii++ - goto __533 - goto __535 -__535: + goto __542 + goto __544 +__544: ; - goto __532 -__531: + goto __541 +__540: ; isSchemaChange = 0 -__532: +__541: ; ii = 0 -__537: +__546: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __539 + goto __548 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __540 + goto __549 } goto abort_due_to_error -__540: +__549: ; - goto __538 -__538: + goto __547 +__547: ii++ - goto __537 - goto __539 -__539: + goto __546 + goto __548 +__548: ; if !(isSchemaChange != 0) { - goto __541 + goto __550 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__541: +__550: ; -__526: +__535: ; if !(rc != 0) { - goto __542 + goto __551 } goto abort_due_to_error -__542: +__551: ; -__543: +__552: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __544 + goto __553 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __543 -__544: + goto __552 +__553: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __545 + goto __554 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __547 + goto __556 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__547: +__556: ; - goto __546 -__545: + goto __555 +__554: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__546: +__555: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __548 + goto __557 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __558 } goto abort_due_to_error -__549: +__558: ; -__548: +__557: ; -__524: +__533: ; -__522: +__531: ; -__511: +__520: ; if !(rc != 0) { - goto __550 + goto __559 } goto abort_due_to_error -__550: +__559: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __551 + goto __560 } rc = SQLITE_DONE goto vdbe_return -__551: +__560: ; goto __8 @@ -48237,172 +48607,172 @@ __78: iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __552 + goto __561 } if !(iRollback != 0) { - goto __554 + goto __563 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __555 -__554: + goto __564 +__563: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __556 + goto __565 } Xsqlite3VdbeError(tls, p, - ts+5647, 0) + ts+5661, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __557 -__556: + goto __566 +__565: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __558 + goto __567 } goto vdbe_return - goto __559 -__558: + goto __568 +__567: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) -__559: +__568: ; -__557: +__566: ; -__555: +__564: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __560 + goto __569 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__560: +__569: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __561 + goto __570 } rc = SQLITE_DONE - goto __562 -__561: + goto __571 +__570: rc = SQLITE_ERROR -__562: +__571: ; goto vdbe_return - goto __553 -__552: + goto __562 +__561: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5702 + return ts + 5716 } return func() uintptr { if iRollback != 0 { - return ts + 5750 + return ts + 5764 } - return ts + 5793 + return ts + 5807 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__553: +__562: ; __79: *(*int32)(unsafe.Pointer(bp + 312)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __563 + goto __572 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __564 + goto __573 } rc = SQLITE_READONLY - goto __565 -__564: + goto __574 +__573: rc = SQLITE_CORRUPT -__565: +__574: ; goto abort_due_to_error -__563: +__572: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __566 + goto __575 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __567 + goto __576 } if !(rc&0xff == SQLITE_BUSY) { - goto __568 + goto __577 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__568: +__577: ; goto abort_due_to_error -__567: +__576: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x4>>2)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __569 + goto __578 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __570 + goto __579 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__570: +__579: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __571 + goto __580 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__571: +__580: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__569: +__578: ; -__566: +__575: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 312)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { - goto __572 + goto __581 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5834) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5848) if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 312))) { - goto __573 + goto __582 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__573: +__582: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 6, 0xc0) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 3, 0x8) -__572: +__581: ; if !(rc != 0) { - goto __574 + goto __583 } goto abort_due_to_error -__574: +__583: ; goto __8 @@ -48422,36 +48792,36 @@ __81: rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb1)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { - goto __575 + goto __584 } *(*U32)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)) = *(*U32)(unsafe.Pointer(pOp + 12)) - U32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) - goto __576 -__575: + goto __585 +__584: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __577 + goto __586 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__577: +__586: ; -__576: +__585: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __578 + goto __587 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0xc0) -__578: +__587: ; if !(rc != 0) { - goto __579 + goto __588 } goto abort_due_to_error -__579: +__588: ; goto __8 @@ -48459,22 +48829,22 @@ __82: ; pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __580 + goto __589 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__580: +__589: ; __83: __84: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0xc0>>6) == 1) { - goto __581 + goto __590 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__581: +__590: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -48485,24 +48855,24 @@ __581: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __582 + goto __591 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { - goto __584 + goto __593 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__584: +__593: ; - goto __583 -__582: + goto __592 +__591: wrFlag = 0 -__583: +__592: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __585 + goto __594 } pIn2 = aMem + uintptr(p23)*56 @@ -48510,30 +48880,30 @@ __583: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__585: +__594: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __586 + goto __595 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __587 -__586: + goto __596 +__595: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __588 + goto __597 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__588: +__597: ; -__587: +__596: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __589 + goto __598 } goto no_mem -__589: +__598: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -48549,10 +48919,10 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __590 + goto __599 } goto abort_due_to_error -__590: +__599: ; goto __8 @@ -48561,10 +48931,10 @@ __85: pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __591 + goto __600 } goto no_mem -__591: +__600: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 7, 0x80) @@ -48584,83 +48954,83 @@ __86: __87: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __592 + goto __601 } (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 - (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1534 -__592: + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1554 +__601: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x10>>4) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __593 + goto __602 } (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) - goto __594 -__593: + goto __603 +__602: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __595 + goto __604 } goto no_mem -__595: +__604: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 7, 0x80) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __596 + goto __605 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __597 + goto __606 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __598 + goto __607 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __600 + goto __609 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__600: +__609: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __599 -__598: + goto __608 +__607: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) -__599: +__608: ; -__597: +__606: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 5, 0x20) if !(rc != 0) { - goto __601 + goto __610 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__601: +__610: ; -__596: +__605: ; -__594: +__603: ; if !(rc != 0) { - goto __602 + goto __611 } goto abort_due_to_error -__602: +__611: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 @@ -48669,31 +49039,31 @@ __88: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __603 + goto __612 } goto no_mem -__603: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __604 + goto __613 } goto abort_due_to_error -__604: +__613: ; goto __8 __89: ; - pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { - goto __605 + if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { + goto __614 } goto jump_to_p2 -__605: +__614: ; goto __8 @@ -48701,10 +49071,10 @@ __90: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __606 + goto __615 } goto no_mem -__606: +__615: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -48725,105 +49095,105 @@ __93: __94: __95: ; - pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) eqOnly = 0 - (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FnullRow = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) - if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { - goto __607 + (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) + if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { + goto __616 } pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { - goto __609 + goto __618 } applyNumericAffinity(tls, pIn3, 0) -__609: +__618: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { - goto __610 + goto __619 } if !(int32(newType)&MEM_Real == 0) { - goto __611 + goto __620 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __612 + goto __621 } goto jump_to_p2 - goto __613 -__612: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+320) + goto __622 +__621: + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __614 + goto __623 } goto abort_due_to_error -__614: +__623: ; goto seek_not_found -__613: +__622: ; -__611: +__620: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __615 + goto __624 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __617 + goto __626 } oc-- -__617: +__626: ; - goto __616 -__615: + goto __625 +__624: if !(c2 < 0) { - goto __618 + goto __627 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __619 + goto __628 } oc++ -__619: +__628: ; -__618: +__627: ; -__616: +__625: ; -__610: +__619: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+320) - (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), int64(U64(iKey)), 0, bp+320) + (*VdbeCursor)(unsafe.Pointer(pC5)).FmovetoTarget = iKey if !(rc != SQLITE_OK) { - goto __620 + goto __629 } goto abort_due_to_error -__620: +__629: ; - goto __608 -__607: - if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __621 + goto __617 +__616: + if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { + goto __630 } eqOnly = 1 -__621: +__630: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) - (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC5)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FnField = U16(nField2) (*UnpackedRecord)(unsafe.Pointer(bp + 328)).Fdefault_rc = func() int8 { @@ -48835,231 +49205,233 @@ __621: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328, bp+320) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __622 + goto __631 } goto abort_due_to_error -__622: +__631: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __623 + goto __632 } goto seek_not_found -__623: +__632: ; -__608: +__617: ; if !(oc >= OP_SeekGE) { - goto __624 + goto __633 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __626 + goto __635 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __628 + goto __637 } if !(rc == SQLITE_DONE) { - goto __629 + goto __638 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __630 -__629: + goto __639 +__638: goto abort_due_to_error -__630: +__639: ; -__628: +__637: ; - goto __627 -__626: + goto __636 +__635: *(*int32)(unsafe.Pointer(bp + 320)) = 0 -__627: +__636: ; - goto __625 -__624: + goto __634 +__633: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __631 + goto __640 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __633 + goto __642 } if !(rc == SQLITE_DONE) { - goto __634 + goto __643 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __635 -__634: + goto __644 +__643: goto abort_due_to_error -__635: +__644: ; -__633: +__642: ; - goto __632 -__631: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) -__632: + goto __641 +__640: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__641: ; -__625: +__634: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __636 + goto __645 } goto jump_to_p2 - goto __637 -__636: + goto __646 +__645: if !(eqOnly != 0) { - goto __638 + goto __647 } pOp += 24 -__638: +__647: ; -__637: +__646: ; goto __8 __96: ; - pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) + pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) - if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { - goto __639 + if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { + goto __648 } goto __8 -__639: +__648: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC6)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 368)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 408)) = 0 -__640: +__649: if !(1 != 0) { - goto __641 + goto __650 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+368, bp+408) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __642 + goto __651 } goto abort_due_to_error -__642: +__651: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0) { - goto __643 + if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { + goto __652 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__643: +__652: ; - if !(*(*int32)(unsafe.Pointer(bp + 408)) == 0) { - goto __644 + if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { + goto __653 } goto jump_to_p2 - goto __641 -__644: + goto __650 +__653: ; if !(nStep <= 0) { - goto __645 + goto __654 } - goto __641 -__645: + goto __650 +__654: ; nStep-- - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __646 + goto __655 } if !(rc == SQLITE_DONE) { - goto __647 + goto __656 } rc = SQLITE_OK goto seekscan_search_fail - goto __648 -__647: + goto __657 +__656: goto abort_due_to_error -__648: +__657: ; -__646: +__655: ; - goto __640 -__641: + goto __649 +__650: ; goto __8 __97: ; - pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __649 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { + goto __658 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __650 -__649: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __651 + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __659 +__658: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { + goto __660 } - (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__651: + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) +__660: ; -__650: +__659: ; goto __8 __98: ; - if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { - goto __652 + pCur1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + + if !(pCur1 == uintptr(0) || (*VdbeCursor)(unsafe.Pointer(pCur1)).FnullRow != 0) { + goto __661 } goto jump_to_p2_and_check_for_interrupt -__652: +__661: ; goto __8 __99: ; - pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __653 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { + goto __662 } goto __8 -__653: +__662: ; __100: __101: __102: ; - pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __654 + goto __663 } - (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 416)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), bp+416, pC7+36) - goto __655 -__654: + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+416, pC9+36) + goto __664 +__663: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -49069,85 +49441,85 @@ __654: }() if !(rc != 0) { - goto __656 + goto __665 } goto no_mem -__656: +__665: ; - pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo) + pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __657 + goto __666 } goto no_mem -__657: +__666: ; - Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) + Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, pC7+36) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__655: +__664: ; if !(rc != SQLITE_OK) { - goto __658 + goto __667 } goto abort_due_to_error -__658: +__667: ; - alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult == 0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) - (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) + alreadyExists = libc.Bool32((*VdbeCursor)(unsafe.Pointer(pC9)).FseekResult == 0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FnullRow = U8(1 - alreadyExists) + (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { - goto __659 + goto __668 } if !(alreadyExists != 0) { - goto __661 + goto __670 } goto jump_to_p2 -__661: +__670: ; - goto __660 -__659: + goto __669 +__668: if !!(alreadyExists != 0) { - goto __662 + goto __671 } goto jump_to_p2 -__662: +__671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __663 + goto __672 } ii1 = 0 -__664: +__673: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __666 + goto __675 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __667 + goto __676 } goto jump_to_p2 -__667: +__676: ; - goto __665 -__665: + goto __674 +__674: ii1++ - goto __664 - goto __666 -__666: + goto __673 + goto __675 +__675: ; -__663: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __668 + goto __677 } - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__668: + (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) +__677: ; -__660: +__669: ; goto __8 @@ -49155,59 +49527,59 @@ __103: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __669 + goto __678 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __670 + goto __679 } goto jump_to_p2 -__670: +__679: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__669: +__678: ; __104: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) notExistsWithKey: - pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) + pCrsr2 = *(*uintptr)(unsafe.Pointer(pC10 + 48)) *(*int32)(unsafe.Pointer(bp + 512)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+512) - (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) - (*VdbeCursor)(unsafe.Pointer(pC8)).FnullRow = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC8)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FmovetoTarget = I64(iKey1) + (*VdbeCursor)(unsafe.Pointer(pC10)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) + (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __671 + goto __680 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __672 + goto __681 } - rc = Xsqlite3CorruptError(tls, 93561) - goto __673 -__672: + rc = Xsqlite3CorruptError(tls, 95020) + goto __682 +__681: goto jump_to_p2 -__673: +__682: ; -__671: +__680: ; if !(rc != 0) { - goto __674 + goto __683 } goto abort_due_to_error -__674: +__683: ; goto __8 @@ -49222,121 +49594,121 @@ __106: *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) - pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6) != 0) { - goto __675 + if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x40>>6) != 0) { + goto __684 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+516) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __676 + goto __685 } goto abort_due_to_error -__676: +__685: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __677 + goto __686 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __678 -__677: + goto __687 +__686: ; - *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) + *(*I64)(unsafe.Pointer(bp + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 520)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __679 + goto __688 } - libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 6, 0x40) - goto __680 -__679: + libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 6, 0x40) + goto __689 +__688: *(*I64)(unsafe.Pointer(bp + 520))++ -__680: +__689: ; -__678: +__687: ; -__675: +__684: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __681 + goto __690 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __682 + goto __691 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__684: +__693: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __686 + goto __695 } - goto __685 -__685: + goto __694 +__694: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __684 - goto __686 -__686: + goto __693 + goto __695 +__695: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __683 -__682: + goto __692 +__691: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__683: +__692: ; Xsqlite3VdbeMemIntegerify(tls, pMem) - if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6)) != 0) { - goto __687 + if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x40>>6)) != 0) { + goto __696 } rc = SQLITE_FULL goto abort_due_to_error -__687: +__696: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __688 + goto __697 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__688: +__697: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__681: +__690: ; - if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x40>>6)) != 0) { - goto __689 + if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x40>>6)) != 0) { + goto __698 } cnt1 = 0 -__690: +__699: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+520) *(*I64)(unsafe.Pointer(bp + 520)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 520))++ - goto __691 -__691: - if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), + goto __700 +__700: + if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 520)))), 0, bp+516)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 516)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __690 + goto __699 } - goto __692 -__692: + goto __701 +__701: ; if !(rc != 0) { - goto __693 + goto __702 } goto abort_due_to_error -__693: +__702: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __694 + goto __703 } rc = SQLITE_FULL goto abort_due_to_error -__694: +__703: ; -__689: +__698: ; - (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC11)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) goto __8 @@ -49344,93 +49716,93 @@ __689: __107: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __695 + goto __704 } - zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName + zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __696 -__695: + goto __705 +__704: pTab1 = uintptr(0) zDb = uintptr(0) -__696: +__705: ; if !(pTab1 != 0) { - goto __697 + goto __706 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __698 + goto __707 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__698: + Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) +__707: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __699 + goto __708 } pTab1 = uintptr(0) -__699: +__708: ; -__697: +__706: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __700 + goto __709 } goto __8 -__700: +__709: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __701 + goto __710 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__701: +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __702 + goto __711 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey -__702: +__711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 528)).FnData = (*Mem)(unsafe.Pointer(pData)).Fn seekResult = func() int32 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult + return (*VdbeCursor)(unsafe.Pointer(pC12)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __703 + goto __712 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __704 -__703: + goto __713 +__712: (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 -__704: +__713: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+528, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), seekResult) - (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC12)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __705 + goto __714 } goto abort_due_to_error -__705: +__714: ; if !(pTab1 != 0) { - goto __706 + goto __715 } (*struct { @@ -49443,7 +49815,7 @@ __705: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__706: +__715: ; goto __8 @@ -49458,81 +49830,81 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __707 + goto __716 } goto abort_due_to_error -__707: +__716: ; goto __8 __109: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 - pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __708 + goto __717 } - zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName + zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC13)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { - goto __710 + if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC13)).FisTable != 0) { + goto __719 } - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) -__710: + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) +__719: ; - goto __709 -__708: + goto __718 +__717: zDb1 = uintptr(0) pTab2 = uintptr(0) -__709: +__718: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __711 + goto __720 } - Xsqlite3VdbePreUpdateHook(tls, p, pC11, + Xsqlite3VdbePreUpdateHook(tls, p, pC13, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), - zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, + zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__711: +__720: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __712 + goto __721 } goto __8 -__712: +__721: ; - rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) - (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 + rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) + (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __713 + goto __722 } goto abort_due_to_error -__713: +__722: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __714 + goto __723 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __715 + goto __724 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, - (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) + (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget) -__715: +__724: ; -__714: +__723: ; goto __8 @@ -49542,38 +49914,38 @@ __110: goto __8 __111: - pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 576)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+576) + rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __716 + goto __725 } goto abort_due_to_error -__716: +__725: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __717 + goto __726 } goto jump_to_p2 -__717: +__726: ; goto __8 __112: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 - pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) + rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __718 + goto __727 } goto abort_due_to_error -__718: +__727: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 @@ -49581,205 +49953,205 @@ __718: __113: pOut = out2Prerelease(tls, p, pOp) - pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) + pCrsr3 = *(*uintptr)(unsafe.Pointer(pC16 + 48)) n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __719 + goto __728 } goto too_big -__719: +__728: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __720 + goto __729 } goto abort_due_to_error -__720: +__729: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __721 + goto __730 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __722 + goto __731 } goto no_mem -__722: +__731: ; -__721: +__730: ; goto __8 __114: pOut = out2Prerelease(tls, p, pOp) - pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __723 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __732 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 - goto __724 -__723: - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { - goto __725 + goto __733 +__732: + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { + goto __734 } - *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget - goto __726 -__725: - if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { - goto __727 + *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget + goto __735 +__734: + if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { + goto __736 } - pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab + pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 48)))).FpVtab pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48)), bp+584) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __729 + goto __738 } goto abort_due_to_error -__729: +__738: ; - goto __728 -__727: + goto __737 +__736: ; - rc = Xsqlite3VdbeCursorRestore(tls, pC15) + rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __730 + goto __739 } goto abort_due_to_error -__730: +__739: ; - if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { - goto __731 + if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { + goto __740 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 -__731: +__740: ; - *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) -__728: + *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) +__737: ; -__726: +__735: ; -__724: +__733: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) goto __8 __115: ; - pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(pC16 == uintptr(0)) { - goto __732 + pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !(pC18 == uintptr(0)) { + goto __741 } - pC16 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) - if !(pC16 == uintptr(0)) { - goto __733 + pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) + if !(pC18 == uintptr(0)) { + goto __742 } goto no_mem -__733: +__742: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FseekResult = 0 - (*VdbeCursor)(unsafe.Pointer(pC16)).FisTable = U8(1) - libc.SetBitFieldPtr8Uint32(pC16+8, Bool(1), 4, 0x10) - *(*uintptr)(unsafe.Pointer(pC16 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__732: + (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) + libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 4, 0x10) + *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) +__741: ; - (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) - (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) - if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { - goto __734 + (*VdbeCursor)(unsafe.Pointer(pC18)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC18)).FcacheStatus = U32(CACHE_STALE) + if !(int32((*VdbeCursor)(unsafe.Pointer(pC18)).FeCurType) == CURTYPE_BTREE) { + goto __743 } - Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) -__734: + Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) +__743: ; goto __8 __116: __117: ; - pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) + pCrsr4 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __735 + goto __744 } - (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 + (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __736 + goto __745 } goto __8 -__736: +__745: ; -__735: +__744: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) - (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 592))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __737 + goto __746 } goto abort_due_to_error -__737: +__746: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __738 + goto __747 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __739 + goto __748 } goto jump_to_p2 -__739: +__748: ; -__738: +__747: ; goto __8 __118: ; - pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) + pCrsr5 = *(*uintptr)(unsafe.Pointer(pC20 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __740 + goto __749 } goto abort_due_to_error -__740: +__749: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __741 + goto __750 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __742 + goto __751 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__742: +__751: ; -__741: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __743 + goto __752 } goto jump_to_p2 -__743: +__752: ; goto __8 @@ -49789,90 +50161,90 @@ __120: __121: ; - pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 600)) = 1 - if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { - goto __744 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { + goto __753 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+600) - goto __745 -__744: + rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) + goto __754 +__753: ; - pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) + pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) - (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) -__745: + (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) +__754: ; if !(rc != 0) { - goto __746 + goto __755 } goto abort_due_to_error -__746: +__755: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __747 + goto __756 } goto jump_to_p2 -__747: +__756: ; goto __8 __122: - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeSorterNext(tls, db, pC20) + rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail __123: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail __124: ; - pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: - (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __748 + goto __757 } - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__748: +__757: ; if !(rc != SQLITE_DONE) { - goto __749 + goto __758 } goto abort_due_to_error -__749: +__758: ; rc = SQLITE_OK - (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) + (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt __125: ; - pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __750 + goto __759 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__750: +__759: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -49881,36 +50253,36 @@ __750: return 0 }() if !(rc != 0) { - goto __751 + goto __760 } goto abort_due_to_error -__751: +__760: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 608)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 608)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+608, + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC23 + 48)), bp+608, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), func() int32 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { - return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult + return (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult } return 0 }()) - (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __752 + goto __761 } goto abort_due_to_error -__752: +__761: ; goto __8 __126: ; - pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 @@ -49921,88 +50293,88 @@ __126: return 0 }() if !(rc != 0) { - goto __753 + goto __762 } goto abort_due_to_error -__753: +__762: ; - rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) + rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __754 + goto __763 } goto abort_due_to_error -__754: +__763: ; goto __8 __127: ; - pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) + pCrsr7 = *(*uintptr)(unsafe.Pointer(pC25 + 48)) - (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC25)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __755 + goto __764 } goto abort_due_to_error -__755: +__764: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __756 + goto __765 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __758 + goto __767 } goto abort_due_to_error -__758: +__767: ; - goto __757 -__756: + goto __766 +__765: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __759 + goto __768 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 94622, ts+5862) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5876) goto abort_due_to_error -__759: +__768: ; -__757: +__766: ; - (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) - (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 + (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) + (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 goto __8 __128: __129: ; - pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - rc = Xsqlite3VdbeCursorRestore(tls, pC24) + rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __760 + goto __769 } goto abort_due_to_error -__760: +__769: ; - if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { - goto __761 + if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { + goto __770 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+704) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __763 + goto __772 } goto abort_due_to_error -__763: +__772: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __764 + goto __773 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -50014,35 +50386,35 @@ __763: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 - goto __765 -__764: + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 + goto __774 +__773: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__765: +__774: ; - goto __762 -__761: + goto __771 +__770: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__762: +__771: ; goto __8 __130: ; - pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { - goto __766 + pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { + goto __775 } - rc = Xsqlite3VdbeFinishMoveto(tls, pC25) + rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __767 + goto __776 } goto abort_due_to_error -__767: +__776: ; -__766: +__775: ; goto __8 @@ -50051,63 +50423,63 @@ __132: __133: __134: ; - pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __768 + goto __777 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __769 -__768: + goto __778 +__777: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__769: +__778: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nCellKey = int64(0) - pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) + pCur2 = *(*uintptr)(unsafe.Pointer(pC28 + 48)) - nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) + nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __770 + goto __779 } - rc = Xsqlite3CorruptError(tls, 94827) + rc = Xsqlite3CorruptError(tls, 96290) goto abort_due_to_error -__770: +__779: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+712) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __771 + goto __780 } goto abort_due_to_error -__771: +__780: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+712)).Fn, (*Mem)(unsafe.Pointer(bp+712)).Fz, bp+768, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+712) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __772 + goto __781 } res11 = -res11 - goto __773 -__772: + goto __782 +__781: ; res11++ -__773: +__782: ; if !(res11 > 0) { - goto __774 + goto __783 } goto jump_to_p2 -__774: +__783: ; goto __8 @@ -50116,13 +50488,13 @@ __135: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { - goto __775 + goto __784 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __776 -__775: + goto __785 +__784: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -50130,20 +50502,20 @@ __775: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __777 + goto __786 } goto abort_due_to_error -__777: +__786: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __778 + goto __787 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__778: +__787: ; -__776: +__785: ; goto __8 @@ -50153,45 +50525,45 @@ __136: rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __779 + goto __788 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __780 + goto __789 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__780: +__789: ; -__779: +__788: ; if !(rc != 0) { - goto __781 + goto __790 } goto abort_due_to_error -__781: +__790: ; goto __8 __137: ; - pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { - goto __782 + if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { + goto __791 } - Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) - goto __783 -__782: + Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + goto __792 +__791: ; - rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) + rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __784 + goto __793 } goto abort_due_to_error -__784: +__793: ; -__783: +__792: ; goto __8 @@ -50204,10 +50576,10 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __785 + goto __794 } goto abort_due_to_error -__785: +__794: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) goto __8 @@ -50218,10 +50590,10 @@ __139: rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __786 + goto __795 } goto abort_due_to_error -__786: +__795: ; goto __8 @@ -50229,30 +50601,30 @@ __140: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __787 + goto __796 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0xc0) - goto __788 -__787: - zSchema = ts + 5879 + goto __797 +__796: + zSchema = ts + 5893 (*InitData)(unsafe.Pointer(bp + 832)).Fdb = db (*InitData)(unsafe.Pointer(bp + 832)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 832)).FpzErrMsg = p + 168 (*InitData)(unsafe.Pointer(bp + 832)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 832)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5893, + ts+5907, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __789 + goto __798 } rc = SQLITE_NOMEM - goto __790 -__789: + goto __799 +__798: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -50262,36 +50634,36 @@ __789: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __791 + goto __800 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__791: +__800: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __792 + goto __801 } - rc = Xsqlite3CorruptError(tls, 95079) -__792: + rc = Xsqlite3CorruptError(tls, 96542) +__801: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__790: +__799: ; -__788: +__797: ; if !(rc != 0) { - goto __793 + goto __802 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __794 + goto __803 } goto no_mem -__794: +__803: ; goto abort_due_to_error -__793: +__802: ; goto __8 @@ -50299,10 +50671,10 @@ __141: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __795 + goto __804 } goto abort_due_to_error -__795: +__804: ; goto __8 @@ -50334,22 +50706,22 @@ __145: int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __796 + goto __805 } - goto __797 -__796: + goto __806 +__805: if !(z == uintptr(0)) { - goto __798 + goto __807 } goto no_mem - goto __799 -__798: + goto __808 +__807: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 872)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__799: +__808: ; -__797: +__806: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt @@ -50359,15 +50731,15 @@ __146: pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __800 + goto __809 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __801 + goto __810 } goto no_mem -__801: +__810: ; -__800: +__809: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 @@ -50377,17 +50749,17 @@ __147: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __802 + goto __811 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __803 -__802: + goto __812 +__811: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__803: +__812: ; goto check_for_interrupt @@ -50397,34 +50769,34 @@ __148: iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __804 + goto __813 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __805 + goto __814 } goto no_mem -__805: +__814: ; -__804: +__813: ; if !(iSet != 0) { - goto __806 + goto __815 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __807 + goto __816 } goto jump_to_p2 -__807: +__816: ; -__806: +__815: ; if !(iSet >= 0) { - goto __808 + goto __817 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__808: +__817: ; goto __8 @@ -50433,48 +50805,48 @@ __149: pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __809 + goto __818 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__810: +__819: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __812 + goto __821 } - goto __811 -__811: + goto __820 +__820: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __810 - goto __812 -__812: + goto __819 + goto __821 +__821: ; if !(pFrame2 != 0) { - goto __813 + goto __822 } goto __8 -__813: +__822: ; -__809: +__818: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __814 + goto __823 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5936, 0) + Xsqlite3VdbeError(tls, p, ts+5950, 0) goto abort_due_to_error -__814: +__823: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __815 + goto __824 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __817 + goto __826 } nMem++ -__817: +__826: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -50482,10 +50854,10 @@ __817: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __818 + goto __827 } goto no_mem -__818: +__827: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -50507,24 +50879,24 @@ __818: pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem1 = pFrame2 + 120 -__819: +__828: if !(pMem1 != pEnd) { - goto __821 + goto __830 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __820 -__820: + goto __829 +__829: pMem1 += 56 - goto __819 - goto __821 -__821: + goto __828 + goto __830 +__830: ; - goto __816 -__815: + goto __825 +__824: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__816: +__825: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -50556,78 +50928,78 @@ __150: __151: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __822 + goto __831 } - *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __823 -__822: + *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __832 +__831: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __824 + goto __833 } - *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __825 -__824: + *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) + goto __834 +__833: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__825: +__834: ; -__823: +__832: ; goto __8 __152: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __826 + goto __835 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __828 + goto __837 } goto jump_to_p2 -__828: +__837: ; - goto __827 -__826: + goto __836 +__835: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __829 + goto __838 } goto jump_to_p2 -__829: +__838: ; -__827: +__836: ; goto __8 __153: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __830 + goto __839 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__832: +__841: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __834 + goto __843 } - goto __833 -__833: + goto __842 +__842: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __832 - goto __834 -__834: + goto __841 + goto __843 +__843: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __831 -__830: + goto __840 +__839: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__831: +__840: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __835 + goto __844 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__835: +__844: ; goto __8 @@ -50635,11 +51007,11 @@ __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __836 + goto __845 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__836: +__845: ; goto __8 @@ -50655,14 +51027,14 @@ __155: } return int64(0) }()) != 0) { - goto __837 + goto __846 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __838 -__837: + goto __847 +__846: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__838: +__847: ; goto __8 @@ -50670,16 +51042,16 @@ __156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __839 + goto __848 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __840 + goto __849 } *(*I64)(unsafe.Pointer(pIn1))-- -__840: +__849: ; goto jump_to_p2 -__839: +__848: ; goto __8 @@ -50687,16 +51059,16 @@ __157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __841 + goto __850 } *(*I64)(unsafe.Pointer(pIn1))-- -__841: +__850: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __842 + goto __851 } goto jump_to_p2 -__842: +__851: ; goto __8 @@ -50707,10 +51079,10 @@ __159: pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0))))) if !(pCtx == uintptr(0)) { - goto __843 + goto __852 } goto no_mem -__843: +__852: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -50733,73 +51105,73 @@ __160: pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __844 + goto __853 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__845: +__854: if !(i5 >= 0) { - goto __847 + goto __856 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __846 -__846: + goto __855 +__855: i5-- - goto __845 - goto __847 -__847: + goto __854 + goto __856 +__856: ; -__844: +__853: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __848 + goto __857 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48) - goto __849 -__848: + goto __858 +__857: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48) -__849: +__858: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __850 + goto __859 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __851 + goto __860 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__851: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __852 + goto __861 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __853 + goto __862 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__853: +__862: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__852: +__861: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { - goto __854 + goto __863 } goto abort_due_to_error -__854: +__863: ; -__850: +__859: ; goto __8 @@ -50809,22 +51181,22 @@ __162: pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __855 + goto __864 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __856 -__855: + goto __865 +__864: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__856: +__865: ; if !(rc != 0) { - goto __857 + goto __866 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__857: +__866: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) @@ -50837,32 +51209,32 @@ __163: rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) if !(rc != 0) { - goto __858 + goto __867 } if !(rc != SQLITE_BUSY) { - goto __859 + goto __868 } goto abort_due_to_error -__859: +__868: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__858: +__867: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__860: +__869: if !(i6 < 3) { - goto __862 + goto __871 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __861 -__861: + goto __870 +__870: i6++ pMem4 += 56 - goto __860 - goto __862 -__862: + goto __869 + goto __871 +__871: ; goto __8 @@ -50874,70 +51246,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __863 + goto __872 } eNew = eOld -__863: +__872: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __864 + goto __873 } eNew = eOld -__864: +__873: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __865 + goto __874 } eNew = eOld -__865: +__874: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __866 + goto __875 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __867 + goto __876 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5973, + ts+5987, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6025 + return ts + 6039 } - return ts + 6030 + return ts + 6044 }())) goto abort_due_to_error - goto __868 -__867: + goto __877 +__876: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __869 + goto __878 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __871 + goto __880 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__871: +__880: ; - goto __870 -__869: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __872 + goto __881 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__872: +__881: ; -__870: +__879: ; if !(rc == SQLITE_OK) { - goto __873 + goto __882 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -50945,17 +51317,17 @@ __870: } return 1 }()) -__873: +__882: ; -__868: +__877: ; -__866: +__875: ; if !(rc != 0) { - goto __874 + goto __883 } eNew = eOld -__874: +__883: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -50965,10 +51337,10 @@ __874: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __875 + goto __884 } goto abort_due_to_error -__875: +__884: ; goto __8 @@ -50982,10 +51354,10 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __876 + goto __885 } goto abort_due_to_error -__876: +__885: ; goto __8 @@ -50995,69 +51367,69 @@ __166: rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __877 + goto __886 } if !(rc != SQLITE_DONE) { - goto __878 + goto __887 } goto abort_due_to_error -__878: +__887: ; rc = SQLITE_OK goto jump_to_p2 -__877: +__886: ; goto __8 __167: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __879 + goto __888 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __880 -__879: + goto __889 +__888: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 6, 0xc0) -__880: +__889: ; goto __8 __168: ; - pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) + Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) goto __8 __169: ; - pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) + Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) goto __8 __170: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __881 + goto __890 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { - goto __882 + goto __891 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __883 + goto __892 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6037, libc.VaList(bp+144, z1)) -__883: + Xsqlite3VdbeError(tls, p, ts+6051, libc.VaList(bp+144, z1)) +__892: ; goto abort_due_to_error -__882: +__891: ; -__881: +__890: ; goto __8 @@ -51065,16 +51437,16 @@ __171: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __884 + goto __893 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__884: +__893: ; if !(rc != 0) { - goto __885 + goto __894 } goto abort_due_to_error -__885: +__894: ; goto __8 @@ -51087,17 +51459,17 @@ __172: zTab = Xsqlite3_value_text(tls, bp+912) if !(zTab != 0) { - goto __886 + goto __895 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__886: +__895: ; Xsqlite3VdbeMemRelease(tls, bp+912) if !(rc != 0) { - goto __887 + goto __896 } goto abort_due_to_error -__887: +__896: ; goto __8 @@ -51107,24 +51479,24 @@ __173: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __888 + goto __897 } goto abort_due_to_error -__888: +__897: ; goto __8 __174: ; - pCur2 = uintptr(0) + pCur3 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 968)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __889 + goto __898 } rc = SQLITE_LOCKED goto abort_due_to_error -__889: +__898: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -51132,52 +51504,52 @@ __889: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __890 + goto __899 } goto abort_due_to_error -__890: +__899: ; (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 - pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) - if !(pCur2 != 0) { - goto __891 + pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) + if !(pCur3 != 0) { + goto __900 } - *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __892 -__891: + goto __901 +__900: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) goto no_mem -__892: +__901: ; goto __8 __175: - pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pC32 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { - goto __893 + goto __902 } goto no_mem -__893: +__902: ; - (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) + (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC32 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5343, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5357, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 __176: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pArgc = pQuery + 1*56 - pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) + pVCur1 = *(*uintptr)(unsafe.Pointer(pCur4 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule @@ -51186,54 +51558,54 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__894: +__903: if !(i7 < nArg) { - goto __896 + goto __905 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __895 -__895: + goto __904 +__904: i7++ - goto __894 - goto __896 -__896: + goto __903 + goto __905 +__905: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { - goto __897 + goto __906 } goto abort_due_to_error -__897: +__906: ; res12 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxEof})).f(tls, pVCur1) - (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) + (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __898 + goto __907 } goto jump_to_p2 -__898: +__907: ; goto __8 __177: - pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { - goto __899 + if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { + goto __908 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 -__899: +__908: ; - pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab + pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+976, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) @@ -51241,69 +51613,69 @@ __899: (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __900 + goto __909 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __901 -__900: + goto __910 +__909: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__901: +__910: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+976, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __902 + goto __911 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__902: +__911: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __903 + goto __912 } goto abort_due_to_error -__903: +__912: ; goto __8 __178: - pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { - goto __904 + if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { + goto __913 } goto __8 -__904: +__913: ; - pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab + pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule rc = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __905 + goto __914 } goto abort_due_to_error -__905: +__914: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __906 + goto __915 } goto jump_to_p2_and_check_for_interrupt -__906: +__915: ; goto check_for_interrupt @@ -51315,27 +51687,27 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __907 + goto __916 } goto abort_due_to_error -__907: +__916: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { - goto __908 + goto __917 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__908: +__917: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 6, 0xc0) if !(rc != 0) { - goto __909 + goto __918 } goto abort_due_to_error -__909: +__918: ; goto __8 @@ -51343,42 +51715,42 @@ __180: *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __910 + goto __919 } goto no_mem -__910: +__919: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __911 + goto __920 } rc = SQLITE_LOCKED goto abort_due_to_error -__911: +__920: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __912 + goto __921 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__913: +__922: if !(i8 < nArg1) { - goto __915 + goto __924 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __914 -__914: + goto __923 +__923: i8++ - goto __913 - goto __915 -__915: + goto __922 + goto __924 +__924: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { @@ -51387,41 +51759,41 @@ __915: (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __916 + goto __925 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__916: +__925: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __917 + goto __926 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __919 + goto __928 } rc = SQLITE_OK - goto __920 -__919: + goto __929 +__928: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() -__920: +__929: ; - goto __918 -__917: + goto __927 +__926: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__918: +__927: ; if !(rc != 0) { - goto __921 + goto __930 } goto abort_due_to_error -__921: +__930: ; -__912: +__921: ; goto __8 @@ -51435,16 +51807,16 @@ __182: pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __922 + goto __931 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __923 + goto __932 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__923: +__932: ; -__922: +__931: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 @@ -51456,25 +51828,25 @@ __184: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __924 + goto __933 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fenc = encoding i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 -__925: +__934: if !(i9 >= 0) { - goto __927 + goto __936 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __926 -__926: + goto __935 +__935: i9-- - goto __925 - goto __927 -__927: + goto __934 + goto __936 +__936: ; -__924: +__933: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -51483,24 +51855,24 @@ __924: })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpFunc)).FxSFunc})).f(tls, pCtx2, int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc), pCtx2+48) if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { - goto __928 + goto __937 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __929 + goto __938 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__929: +__938: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+296, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __930 + goto __939 } goto abort_due_to_error -__930: +__939: ; -__928: +__937: ; goto __8 @@ -51525,16 +51897,16 @@ __187: h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __931 + goto __940 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __932 -__931: + goto __941 +__940: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__932: +__941: ; goto __8 @@ -51549,66 +51921,66 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __933 + goto __942 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __934 + goto __943 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) - goto __935 -__934: + goto __944 +__943: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __936 + goto __945 } - z3 = Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __937 -__936: + goto __946 +__945: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) -__937: +__946: ; -__935: +__944: ; -__933: +__942: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __938 + goto __947 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __939 + goto __948 } goto __8 -__939: +__948: ; i10 = 1 -__940: +__949: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __942 + goto __951 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __943 + goto __952 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__943: +__952: ; - goto __941 -__941: + goto __950 +__950: i10++ - goto __940 - goto __942 -__942: + goto __949 + goto __951 +__951: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__938: +__947: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ @@ -51629,73 +52001,73 @@ __7: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __944 + goto __953 } rc = SQLITE_NOMEM - goto __945 -__944: + goto __954 +__953: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __946 + goto __955 } - rc = Xsqlite3CorruptError(tls, 97023) -__946: + rc = Xsqlite3CorruptError(tls, 98486) +__955: ; -__945: +__954: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __947 + goto __956 } - Xsqlite3VdbeError(tls, p, ts+3649, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__947: + Xsqlite3VdbeError(tls, p, ts+3663, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) +__956: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+6072, + Xsqlite3_log(tls, rc, ts+6086, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __948 + goto __957 } Xsqlite3VdbeHalt(tls, p) -__948: +__957: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __949 + goto __958 } Xsqlite3OomFault(tls, db) -__949: +__958: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __950 + goto __959 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__950: +__959: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __951 + goto __960 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__951: +__960: ; vdbe_return: -__952: +__961: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __953 + goto __962 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { - goto __954 + goto __963 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__954: +__963: ; - goto __952 -__953: + goto __961 +__962: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) @@ -51703,13 +52075,13 @@ __953: return rc too_big: - Xsqlite3VdbeError(tls, p, ts+5320, 0) + Xsqlite3VdbeError(tls, p, ts+5334, 0) rc = SQLITE_TOOBIG goto abort_due_to_error no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+1470, 0) + Xsqlite3VdbeError(tls, p, ts+1490, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -51720,10 +52092,14 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6104, ts + 6113, ts + 6120, - ts + 6126} +var azType = [4]uintptr{ts + 6118, ts + 6127, ts + 6134, + ts + 6140} var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} +var aMask = [12]uint8{ + uint8(0x10), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x2), + uint8(0x01), uint8(0x01), uint8(0x10), uint8(0x10), +} var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB @@ -51772,16 +52148,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6138, + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6152, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6167 + return ts + 6181 } return func() uintptr { if type1 == U32(7) { - return ts + 6172 + return ts + 6186 } - return ts + 6177 + return ts + 6191 }() }())) rc = SQLITE_ERROR @@ -51801,10 +52177,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) rc = Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) if rc == SQLITE_OK { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6185, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6199, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3649, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3663, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -51814,8 +52190,8 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) // Open a blob handle. func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var nAttempt int32 var iCol int32 @@ -51835,7 +52211,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51855,8 +52231,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51864,21 +52240,21 @@ __3: goto __4 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6205, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6219, libc.VaList(bp, zTable)) __4: ; if !(pTab != 0 && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __5 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6235, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6249, libc.VaList(bp+8, zTable)) __5: ; if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __6 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48, ts+6271, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6285, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { @@ -51887,8 +52263,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51921,8 +52297,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6292, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6306, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51949,7 +52325,7 @@ __19: if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } - zFault = ts + 6313 + zFault = ts + 6327 __22: ; goto __20 @@ -51982,7 +52358,7 @@ __26: if !(int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol || int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == -2) { goto __29 } - zFault = ts + 6325 + zFault = ts + 6339 __29: ; goto __27 @@ -52002,8 +52378,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) - *(*uintptr)(unsafe.Pointer(bp + 456)) = Xsqlite3MPrintf(tls, db, ts+6333, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6347, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -52072,7 +52448,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+456) + rc = blobSeekToRow(tls, pBlob, iRow, bp+464) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -52100,12 +52476,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { - return ts + 3649 + if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + return ts + 3663 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52149,7 +52525,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97494) + return Xsqlite3MisuseError(tls, 98957) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52232,7 +52608,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 97594) + return Xsqlite3MisuseError(tls, 99057) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -52245,7 +52621,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) @@ -54685,11 +55061,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } - Xsqlite3ParserAddCleanup(tls, pParse, - *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) - }{Xsqlite3ExprDelete})), - pDup) + Xsqlite3ExprDeferredDelete(tls, pParse, pDup) } } @@ -54849,7 +55221,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6367, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6381, zDb) == 0) { goto __8 } @@ -54970,7 +55342,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6372) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6386) != 0) { goto __33 } goto __14 @@ -55126,14 +55498,14 @@ __55: ; goto __54 __53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6374, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6388, zTab) == 0) { goto __56 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __57 __56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6378, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6392, zTab) == 0) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -55150,7 +55522,7 @@ __52: goto __59 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6382, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6396, zTab) == 0) { goto __60 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -55244,7 +55616,7 @@ __75: goto __77 } - *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55253,7 +55625,7 @@ __75: goto __78 __77: ; - *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -55308,7 +55680,7 @@ __81: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __85 } - Xsqlite3ErrorMsg(tls, pParse, ts+6391, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6405, libc.VaList(bp, zAs)) return WRC_Abort __85: ; @@ -55316,14 +55688,14 @@ __85: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __86 } - Xsqlite3ErrorMsg(tls, pParse, ts+6422, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6436, libc.VaList(bp+8, zAs)) return WRC_Abort __86: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return WRC_Abort __87: ; @@ -55375,7 +55747,7 @@ __11: } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6477, libc.VaList(bp+16, zCol)) + ts+6491, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+64, 0, uint64(unsafe.Sizeof(struct{ FpTab uintptr }{}))) return WRC_Prune @@ -55412,7 +55784,7 @@ __98: ; extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6512 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6526 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end @@ -55425,23 +55797,23 @@ __96: __94: ; if cnt == 0 { - zErr = ts + 6521 + zErr = ts + 6535 } else { - zErr = ts + 6536 + zErr = ts + 6550 } if !(zDb != 0) { goto __99 } - Xsqlite3ErrorMsg(tls, pParse, ts+6558, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6572, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __100 __99: if !(zTab != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp+56, zErr, zTab, zCol)) goto __102 __101: - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+80, zErr, zCol)) __102: ; __100: @@ -55544,15 +55916,15 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6588 + var zIn uintptr = ts + 6602 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6616 + zIn = ts + 6630 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6634 + zIn = ts + 6648 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6652 + zIn = ts + 6666 } - Xsqlite3ErrorMsg(tls, pParse, ts+6670, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6684, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55631,10 +56003,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if 0 == Xsqlite3ExprCanBeNull(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6690 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6704 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55681,7 +56053,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6701, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6715, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55745,7 +56117,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*32)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6718, libc.VaList(bp, pExpr)) + ts+6732, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55761,7 +56133,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var auth int32 = Xsqlite3AuthCheck(tls, pParse, SQLITE_FUNCTION, uintptr(0), (*FuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0)) if auth != SQLITE_OK { if auth == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+6782, + Xsqlite3ErrorMsg(tls, pParse, ts+6796, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55775,7 +56147,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6818, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6832, uintptr(0), pExpr) } } else { @@ -55798,30 +56170,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { if 0 == libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { if pDef != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0) && pWin != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6846, libc.VaList(bp+16, pExpr)) + ts+6860, libc.VaList(bp+16, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if is_agg != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 || is_agg != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 && !(pWin != 0) || is_agg != 0 && pWin != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 { var zType uintptr if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 || pWin != 0 { - zType = ts + 6889 + zType = ts + 6903 } else { - zType = ts + 6896 + zType = ts + 6910 } - Xsqlite3ErrorMsg(tls, pParse, ts+6906, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6920, libc.VaList(bp+24, zType, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ is_agg = 0 } else if no_such_func != 0 && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6934, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6948, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6956, + Xsqlite3ErrorMsg(tls, pParse, ts+6970, libc.VaList(bp+48, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if is_agg == 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7000, + ts+7014, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55893,7 +56265,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+7048, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7062, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -55909,7 +56281,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+7059, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7073, pExpr, pExpr) } break @@ -55965,7 +56337,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -56040,7 +56412,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7070, libc.VaList(bp, i, zType, mx)) + ts+7084, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -56060,7 +56432,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7140, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -56095,7 +56467,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } if Xsqlite3ExprIsInteger(tls, pE, bp+8) != 0 { if *(*int32)(unsafe.Pointer(bp + 8)) <= 0 || *(*int32)(unsafe.Pointer(bp + 8)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr { - resolveOutOfRangeError(tls, pParse, ts+7160, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7174, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -56152,7 +56524,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x2000>>13) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7166, libc.VaList(bp, i+1)) + ts+7180, libc.VaList(bp, i+1)) return 1 } } @@ -56180,7 +56552,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7227, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7241, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -56394,7 +56766,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7258, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7272, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -56434,7 +56806,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -56445,7 +56817,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7297) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7311) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -56457,7 +56829,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7303, 0) + ts+7317, 0) return WRC_Abort } @@ -56557,12 +56929,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { return SQLITE_ERROR } Xsqlite3WalkExpr(tls, bp, pExpr) - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 40)) |= savedHasAgg @@ -56598,12 +56970,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { return WRC_Abort } Xsqlite3WalkExpr(tls, bp, pExpr) - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) != 0 { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) @@ -56722,9 +57094,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) } if op == TK_COLUMN || op == TK_AGG_COLUMN { - if *(*uintptr)(unsafe.Pointer(pExpr + 64)) != 0 { - return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) } if op == TK_SELECT { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr) @@ -56812,14 +57182,13 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { - if *(*uintptr)(unsafe.Pointer(p + 64)) != uintptr(0) { - var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) - if j >= 0 { - var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol+uintptr(j)*24) - pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) - } - break + var j int32 + + if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { + var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol+uintptr(j)*24) + pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) } + break } if op == TK_CAST || op == TK_UPLUS { p = (*Expr)(unsafe.Pointer(p)).FpLeft @@ -57147,7 +57516,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) return } @@ -57222,7 +57591,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7362, libc.VaList(bp, mxHeight)) + ts+7376, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57390,12 +57759,17 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft if pRight != 0 { (*Expr)(unsafe.Pointer(pRoot)).FpRight = pRight *(*U32)(unsafe.Pointer(pRoot + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & (*Expr)(unsafe.Pointer(pRight)).Fflags + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pRight)).FnHeight + 1 + } else { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = 1 } if pLeft != 0 { (*Expr)(unsafe.Pointer(pRoot)).FpLeft = pLeft *(*U32)(unsafe.Pointer(pRoot + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & (*Expr)(unsafe.Pointer(pLeft)).Fflags + if (*Expr)(unsafe.Pointer(pLeft)).FnHeight >= (*Expr)(unsafe.Pointer(pRoot)).FnHeight { + (*Expr)(unsafe.Pointer(pRoot)).FnHeight = (*Expr)(unsafe.Pointer(pLeft)).FnHeight + 1 + } } - exprSetHeight(tls, pRoot) } } @@ -57466,12 +57840,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7410, + Xsqlite3ErrorMsg(tls, pParse, ts+7424, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7454 + return ts + 7468 } - return ts + 1534 + return ts + 1554 }(), nElem)) break } @@ -57510,7 +57884,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57536,7 +57910,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7458, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7472, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57564,7 +57938,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromDDL) != U32(0) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT) != U32(0) || (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) == uint64(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7492, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7506, libc.VaList(bp, pExpr)) } } } @@ -57611,7 +57985,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 136 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7512, + Xsqlite3ErrorMsg(tls, pParse, ts+7526, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57636,7 +58010,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7555, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7569, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57657,11 +58031,8 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { } } } - if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_MemToken) != U32(0) { - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 8))) - } if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Static) != U32(0)) { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } } @@ -57690,7 +58061,11 @@ func Xsqlite3ClearOnOrUsing(tls *libc.TLS, db uintptr, p uintptr) { // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { - (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) + Xsqlite3ParserAddCleanup(tls, pParse, + *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{Xsqlite3ExprDelete})), + pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the @@ -57786,7 +58161,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint } } - *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) + *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag @@ -58210,7 +58585,7 @@ __2: if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT && (*IdList)(unsafe.Pointer(pColumns)).FnId != libc.AssignInt32(&n, Xsqlite3ExprVectorSize(tls, pExpr))) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -58333,7 +58708,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7608, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, libc.VaList(bp, zObject)) } } @@ -58343,10 +58718,12 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&i, 1) > 0 { Xsqlite3ExprDelete(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) - Xsqlite3DbFree(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) + } pItem += 32 } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { @@ -58387,10 +58764,10 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { - if Xsqlite3StrICmp(tls, zIn, ts+6690) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6704) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6695) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6709) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58820,13 +59197,13 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int3 // Return TRUE if the given string is a row-id column name. func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { - if Xsqlite3StrICmp(tls, z, ts+7631) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7639) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7653) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7645) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7659) == 0 { return 1 } return 0 @@ -59030,7 +59407,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7649, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7663, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -59108,7 +59485,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == uint64(1)<<nExpr-uint64(1) { var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7696, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7710, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iTab, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) @@ -59202,7 +59579,7 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec defer tls.Free(16) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - var zFmt uintptr = ts + 7727 + var zFmt uintptr = ts + 7741 Xsqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp, nActual, nExpect)) } } @@ -59220,7 +59597,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) } } @@ -59261,7 +59638,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7771, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7785, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4)), @@ -59291,11 +59668,11 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7794, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7808, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { - return ts + 1534 + return ts + 1554 } - return ts + 7813 + return ts + 7827 }(), (*Select)(unsafe.Pointer(pSelect)).FselId)) if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { @@ -59380,6 +59757,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 Xsqlite3VdbeChangeP4(tls, v, addr, pKeyInfo, -8) } if addrOnce != 0 { + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iTab) Xsqlite3VdbeJumpHere(tls, v, addrOnce) Xsqlite3VdbeAddOp3(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 + 4)), @@ -59421,7 +59799,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { pSel = *(*uintptr)(unsafe.Pointer(pExpr + 32)) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7825, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7839, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4)), *(*int32)(unsafe.Pointer(pExpr + 64))) @@ -59436,11 +59814,11 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7843, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7857, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { - return ts + 1534 + return ts + 1554 } - return ts + 7813 + return ts + 7827 }(), (*Select)(unsafe.Pointer(pSel)).FselId)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { nReg = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr @@ -59462,16 +59840,16 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { } if (*Select)(unsafe.Pointer(pSel)).FpLimit != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456) + pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470) if pLimit != 0 { (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = uint8(SQLITE_AFF_NUMERIC) pLimit = Xsqlite3PExpr(tls, pParse, TK_NE, Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft, 0), pLimit) } - Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft) + Xsqlite3ExprDeferredDelete(tls, pParse, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft) (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit } else { - pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7864) + pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7878) (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) } (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 @@ -59857,13 +60235,13 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM c = Xsqlite3DecOrHexToI64(tls, z, bp+16) if c == 3 && !(negFlag != 0) || c == 2 || negFlag != 0 && *(*I64)(unsafe.Pointer(bp + 16)) == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - if Xsqlite3_strnicmp(tls, z, ts+7866, 2) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7869, + if Xsqlite3_strnicmp(tls, z, ts+7880, 2) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7883, libc.VaList(bp, func() uintptr { if negFlag != 0 { - return ts + 4918 + return ts + 4932 } - return ts + 1534 + return ts + 1554 }(), pExpr)) } else { codeReal(tls, v, z, negFlag, iMem) @@ -59922,10 +60300,6 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT var pCol uintptr - if pTab == uintptr(0) { - Xsqlite3VdbeAddOp3(tls, v, OP_Column, iTabCur, iCol, regOut) - return - } if iCol < 0 || iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iTabCur, regOut) @@ -59938,7 +60312,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT } else if int32((*Column)(unsafe.Pointer(libc.AssignUintptr(&pCol, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24))).FcolFlags)&COLFLAG_VIRTUAL != 0 { var pParse uintptr = Xsqlite3VdbeParser(tls, v) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_BUSY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else { var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab @@ -59970,7 +60344,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { - var pOp uintptr = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, -1) + var pOp uintptr = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { (*VdbeOp)(unsafe.Pointer(pOp)).Fp5 = U16(p5) } @@ -60018,7 +60392,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr } func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { - if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { + if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetLastOp(tls, v))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) } } @@ -60111,14 +60485,14 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI case INLINEFUNC_affinity: { - *(*[5]uintptr)(unsafe.Pointer(bp + 72)) = [5]uintptr{ts + 7926, ts + 7931, ts + 7936, ts + 6177, ts + 6172} + *(*[5]uintptr)(unsafe.Pointer(bp + 72)) = [5]uintptr{ts + 7940, ts + 7945, ts + 7950, ts + 6191, ts + 6186} var aff uint8 aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) Xsqlite3VdbeLoadString(tls, v, target, func() uintptr { if int32(aff) <= SQLITE_AFF_NONE { - return ts + 7944 + return ts + 7958 } return *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(int32(aff)-SQLITE_AFF_BLOB)*8)) }()) @@ -60129,6 +60503,46 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI return target } +func sqlite3IndexedExprLookup(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { + var p uintptr + var v uintptr + for p = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr; p != 0; p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext { + var iDataCur int32 = (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur + if iDataCur < 0 { + continue + } + if (*Parse)(unsafe.Pointer(pParse)).FiSelfTab != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur != (*Parse)(unsafe.Pointer(pParse)).FiSelfTab-1 { + continue + } + iDataCur = -1 + } + if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr, iDataCur) != 0 { + continue + } + v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe + + if (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow != 0 { + var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + Xsqlite3VdbeAddOp3(tls, v, OP_IfNullRow, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur, addr+3, target) + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol, target) + + Xsqlite3VdbeGoto(tls, v, 0) + p = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = uintptr(0) + Xsqlite3ExprCode(tls, pParse, pExpr, target) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + Xsqlite3VdbeJumpHere(tls, v, addr+2) + } else { + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol, target) + + } + return target + } + return -1 +} + // Generate code into the current Vdbe to evaluate the given // expression. Attempt to store the results in register "target". // Return the register where results are stored. @@ -60193,6 +60607,7 @@ func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target var p1 int32 var addrINR int32 var okConstFactor U8 + var pAggInfo1 uintptr var endLabel int32 var nextCase int32 var nExpr int32 @@ -60217,283 +60632,284 @@ expr_code_doover: op = TK_NULL goto __2 __1: + if !((*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) && + !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Leaf) != U32(0)) && + libc.AssignInt32(&r1, sqlite3IndexedExprLookup(tls, pParse, pExpr, target)) >= 0) { + goto __3 + } + return r1 + goto __4 +__3: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) +__4: + ; __2: ; switch op { case TK_AGG_COLUMN: - goto __4 + goto __6 case TK_COLUMN: - goto __5 + goto __7 case TK_INTEGER: - goto __6 + goto __8 case TK_TRUEFALSE: - goto __7 + goto __9 case TK_FLOAT: - goto __8 + goto __10 case TK_STRING: - goto __9 + goto __11 default: - goto __10 + goto __12 case TK_BLOB: - goto __11 + goto __13 case TK_VARIABLE: - goto __12 + goto __14 case TK_REGISTER: - goto __13 + goto __15 case TK_CAST: - goto __14 + goto __16 case TK_IS: - goto __15 + goto __17 case TK_ISNOT: - goto __16 + goto __18 case TK_LT: - goto __17 + goto __19 case TK_LE: - goto __18 + goto __20 case TK_GT: - goto __19 + goto __21 case TK_GE: - goto __20 + goto __22 case TK_NE: - goto __21 + goto __23 case TK_EQ: - goto __22 + goto __24 case TK_AND: - goto __23 + goto __25 case TK_OR: - goto __24 + goto __26 case TK_PLUS: - goto __25 + goto __27 case TK_STAR: - goto __26 + goto __28 case TK_MINUS: - goto __27 + goto __29 case TK_REM: - goto __28 + goto __30 case TK_BITAND: - goto __29 + goto __31 case TK_BITOR: - goto __30 + goto __32 case TK_SLASH: - goto __31 + goto __33 case TK_LSHIFT: - goto __32 + goto __34 case TK_RSHIFT: - goto __33 + goto __35 case TK_CONCAT: - goto __34 + goto __36 case TK_UMINUS: - goto __35 + goto __37 case TK_BITNOT: - goto __36 + goto __38 case TK_NOT: - goto __37 + goto __39 case TK_TRUTH: - goto __38 + goto __40 case TK_ISNULL: - goto __39 + goto __41 case TK_NOTNULL: - goto __40 + goto __42 case TK_AGG_FUNCTION: - goto __41 + goto __43 case TK_FUNCTION: - goto __42 + goto __44 case TK_EXISTS: - goto __43 + goto __45 case TK_SELECT: - goto __44 + goto __46 case TK_SELECT_COLUMN: - goto __45 + goto __47 case TK_IN: - goto __46 + goto __48 case TK_BETWEEN: - goto __47 + goto __49 case TK_COLLATE: - goto __48 + goto __50 case TK_SPAN: - goto __49 + goto __51 case TK_UPLUS: - goto __50 + goto __52 case TK_TRIGGER: - goto __51 + goto __53 case TK_VECTOR: - goto __52 + goto __54 case TK_IF_NULL_ROW: - goto __53 + goto __55 case TK_CASE: - goto __54 + goto __56 case TK_RAISE: - goto __55 + goto __57 } - goto __3 -__4: + goto __5 +__6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { - goto __56 + goto __58 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem - goto __57 -__56: + goto __59 +__58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { - goto __58 + goto __60 } pTab = (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab, int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn), target) if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) < 0) { - goto __59 + goto __61 + } + + goto __62 +__61: + if !(pTab != uintptr(0)) { + goto __63 } - goto __60 -__59: - ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { - goto __61 + goto __64 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__61: +__64: ; -__60: +__63: + ; +__62: ; return target -__58: +__60: ; -__57: +__59: ; -__5: +__7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __62 + goto __65 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) != 0) { - goto __63 - } aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) - goto __64 -__63: - aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) -__64: - ; if !(aff > SQLITE_AFF_BLOB) { - goto __65 + goto __66 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__65: +__66: ; return iReg -__62: +__65: ; if !(iTab < 0) { - goto __66 + goto __67 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __67 + goto __68 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __69 + goto __70 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__69: +__70: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*24 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __70 + goto __71 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __72 + goto __73 } - Xsqlite3ErrorMsg(tls, pParse, ts+7896, + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__72: +__73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __73 + goto __74 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__73: +__74: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __71 -__70: + goto __72 +__71: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __74 + goto __75 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __75 -__74: - return iSrc + goto __76 __75: + return iSrc +__76: ; -__71: +__72: ; - goto __68 -__67: - iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 + goto __69 __68: + iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 +__69: ; -__66: +__67: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, (*Expr)(unsafe.Pointer(pExpr)).Fop2) - if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { - goto __76 - } - Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) -__76: - ; return iReg -__6: +__8: codeInteger(tls, pParse, pExpr, 0, target) return target -__7: +__9: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target -__8: +__10: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target -__9: +__11: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target -__10: +__12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target -__11: +__13: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 @@ -60502,7 +60918,7 @@ __11: Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -6) return target -__12: +__14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { @@ -60516,10 +60932,10 @@ __77: ; return target -__13: +__15: return (*Expr)(unsafe.Pointer(pExpr)).FiTable -__14: +__16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 @@ -60532,8 +60948,8 @@ __78: int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg -__15: -__16: +__17: +__18: if op == TK_IS { op = TK_EQ } else { @@ -60541,12 +60957,12 @@ __16: } p5 = SQLITE_NULLEQ -__17: -__18: __19: __20: __21: __22: +__23: +__24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 @@ -60572,10 +60988,8 @@ __82: ; __80: ; - goto __3 + goto __5 -__23: -__24: __25: __26: __27: @@ -60586,14 +61000,16 @@ __31: __32: __33: __34: +__35: +__36: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) Xsqlite3VdbeAddOp3(tls, v, op, r2, r1, target) - goto __3 + goto __5 -__35: +__37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { @@ -60623,27 +61039,27 @@ __86: ; __84: ; - goto __3 + goto __5 -__36: -__37: +__38: +__39: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) - goto __3 + goto __5 -__38: +__40: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) bNormal = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_IS) Xsqlite3VdbeAddOp4Int(tls, v, OP_IsTrue, r1, inReg, libc.BoolInt32(!(isTrue != 0)), isTrue^bNormal) - goto __3 + goto __5 -__39: -__40: +__41: +__42: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) @@ -60652,9 +61068,9 @@ __40: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) - goto __3 + goto __5 -__41: +__43: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || @@ -60662,15 +61078,15 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7949, libc.VaList(bp+8, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, libc.VaList(bp+8, pExpr)) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem __88: ; - goto __3 + goto __5 -__42: +__44: constMask = U32(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc @@ -60701,8 +61117,8 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7976, libc.VaList(bp+16, pExpr)) - goto __3 + Xsqlite3ErrorMsg(tls, pParse, ts+7990, libc.VaList(bp+16, pExpr)) + goto __5 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { @@ -60824,8 +61240,8 @@ __111: ; return target -__43: -__44: +__45: +__46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __114 @@ -60846,9 +61262,9 @@ __117: ; __115: ; - goto __3 + goto __5 -__45: +__47: pLeft2 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !((*Expr)(unsafe.Pointer(pLeft2)).FiTable == 0 || int32((*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn) > int32((*Expr)(unsafe.Pointer(pLeft2)).Fop2)) { goto __118 @@ -60861,13 +61277,13 @@ __118: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+7578, + Xsqlite3ErrorMsg(tls, pParse, ts+7592, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __119: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__48: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) @@ -60878,11 +61294,11 @@ __46: Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target -__47: +__49: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target -__48: +__50: if !(!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Collate) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FUNCTION) { @@ -60904,12 +61320,12 @@ __120: goto expr_code_doover __121: ; -__49: -__50: +__51: +__52: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__51: +__53: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60924,14 +61340,38 @@ __51: Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __123: ; - goto __3 + goto __5 -__52: - Xsqlite3ErrorMsg(tls, pParse, ts+6459, 0) - goto __3 +__54: + Xsqlite3ErrorMsg(tls, pParse, ts+6473, 0) + goto __5 -__53: +__55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor + pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + if !(pAggInfo1 != 0) { + goto __124 + } + + if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { + goto __125 + } + inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + goto __5 +__125: + ; + if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { + goto __126 + } + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo1)).FsortingIdxPTab, + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiSorterColumn), + target) + inReg = target + goto __5 +__126: + ; +__124: + ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) @@ -60939,9 +61379,9 @@ __53: (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) - goto __3 + goto __5 -__54: +__56: pTest = uintptr(0) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -60951,15 +61391,15 @@ __54: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __124 + goto __127 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __125 + goto __128 } Xsqlite3ExprDelete(tls, db1, pDel) - goto __3 -__125: + goto __5 +__128: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60969,22 +61409,22 @@ __125: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__124: +__127: ; i1 = 0 -__126: +__129: if !(i1 < nExpr-1) { - goto __128 + goto __131 } if !(pX != 0) { - goto __129 + goto __132 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __130 -__129: + goto __133 +__132: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__130: +__133: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60993,51 +61433,51 @@ __130: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __127 -__127: + goto __130 +__130: i1 = i1 + 2 - goto __126 - goto __128 -__128: + goto __129 + goto __131 +__131: ; if !(nExpr&1 != 0) { - goto __131 + goto __134 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __132 -__131: + goto __135 +__134: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__132: +__135: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) - goto __3 + goto __5 -__55: +__57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __133 + goto __136 } Xsqlite3ErrorMsg(tls, pParse, - ts+8000, 0) + ts+8014, 0) return 0 -__133: +__136: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __134 + goto __137 } Xsqlite3MayAbort(tls, pParse) -__134: +__137: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __135 + goto __138 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __136 -__135: + goto __139 +__138: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -61046,18 +61486,18 @@ __135: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__136: +__139: ; - goto __3 + goto __5 -__3: +__5: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44))) return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8050)) +var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8064)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61269,7 +61709,7 @@ __1: if inReg != target+i { var pOp uintptr if int32(copyOp) == OP_Copy && - int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetOp(tls, v, -1)))).Fopcode) == OP_Copy && + int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetLastOp(tls, v)))).Fopcode) == OP_Copy && (*VdbeOp)(unsafe.Pointer(pOp)).Fp1+(*VdbeOp)(unsafe.Pointer(pOp)).Fp3+1 == inReg && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2+(*VdbeOp)(unsafe.Pointer(pOp)).Fp3+1 == target+i && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5) == 0 { @@ -61506,6 +61946,7 @@ __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61730,6 +62171,7 @@ __27: __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + Xsqlite3VdbeTypeofColumn(tls, v, r1) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -61875,7 +62317,11 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, if int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLLATE && Xsqlite3ExprCompare(tls, pParse, pA, (*Expr)(unsafe.Pointer(pB)).FpLeft, iTab) < 2 { return 1 } - return 2 + if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_COLUMN && int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pB)).FiTable < 0 && (*Expr)(unsafe.Pointer(pA)).FiTable == iTab { + } else { + return 2 + } } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { @@ -62402,7 +62848,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) } - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + if (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude != 0 { + Xsqlite3DbNNFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48)).FaiExclude) + } if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { @@ -62420,8 +62868,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var iAgg int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - - if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_FUNCTION { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { @@ -62489,6 +62936,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_IF_NULL_ROW: + fallthrough case TK_AGG_COLUMN: fallthrough case TK_COLUMN: @@ -62512,7 +62961,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { goto __6 } { - if (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + if (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && + int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { goto __6 } @@ -62535,7 +62986,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = int16(-1) (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr = pExpr - if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy @@ -62548,7 +62999,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } { var pE uintptr = (*ExprList_item)(unsafe.Pointer(pTerm)).FpExpr - if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pE)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && int32((*Expr)(unsafe.Pointer(pE)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_COLUMN && + (*Expr)(unsafe.Pointer(pE)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && + int32((*Expr)(unsafe.Pointer(pE)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(j) goto __9 } @@ -62568,7 +63021,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + } (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } @@ -62708,7 +63163,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } - return *(*int32)(unsafe.Pointer(pParse + 216 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62716,7 +63171,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 216 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62767,11 +63222,11 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Eponymous) != U32(0) || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Shadow) != U32(0) && Xsqlite3ReadOnlyShadowTables(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+8066, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8080, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62783,13 +63238,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8094, + ts+8108, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8269, + ts+8283, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62799,10 +63254,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8443, libc.VaList(bp, zDb, zDb)) + ts+8457, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8590, 0) + ts+8604, 0) } } @@ -62866,7 +63321,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8741, libc.VaList(bp, zName)) + ts+8755, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62876,7 +63331,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8800, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8814, zName)) { goto __6 } goto exit_rename_table @@ -62885,7 +63340,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8806, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8820, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62926,19 +63381,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8833, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8847, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9017, + ts+9031, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9322, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9336, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9338, + ts+9352, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62946,7 +63401,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9396, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9410, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62958,7 +63413,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9661, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9675, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62970,7 +63425,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9674, + ts+9688, libc.VaList(bp, zErr, zDb, zTab)) } @@ -63016,12 +63471,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9712, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9726, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9744, 0) + ts+9758, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -63031,11 +63486,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 64 + 8)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9771) + ts+9785) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9830) + ts+9844) } if pDflt != 0 { @@ -63048,12 +63503,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9883) + ts+9897) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9929) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9943) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -63064,7 +63519,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9956, + ts+9970, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -63086,7 +63541,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10102, + ts+10116, libc.VaList(bp+40, zTab, zDb)) } } @@ -63134,14 +63589,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10332, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10346, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10366, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10380, 0) goto exit_begin_add_column __4: ; @@ -63169,7 +63624,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10396, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10410, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(!(int32((*Table)(unsafe.Pointer(pNew)).FaCol) != 0) || !(int32((*Table)(unsafe.Pointer(pNew)).FzName) != 0)) { goto __7 } @@ -63209,18 +63664,18 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10415 + zType = ts + 10429 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10420 + zType = ts + 10434 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10434, + Xsqlite3ErrorMsg(tls, pParse, ts+10448, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10452 + return ts + 10466 } - return ts + 10469 + return ts + 10483 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -63304,11 +63759,11 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) Xsqlite3MayAbort(tls, pParse) @@ -63321,17 +63776,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10508, + ts+10522, libc.VaList(bp+8, zDb, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.Bool32(iSchema == 1), (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3NestedParse(tls, pParse, - ts+10690, + ts+10704, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9661, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9675, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63526,7 +63981,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 408; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { @@ -63589,12 +64044,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10821, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10835, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -63634,8 +64089,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint if zSql == uintptr(0) { return SQLITE_NOMEM } - if Xsqlite3_strnicmp(tls, zSql, ts+10846, 7) != 0 { - return Xsqlite3CorruptError(tls, 111229) + if Xsqlite3_strnicmp(tls, zSql, ts+10860, 7) != 0 { + return Xsqlite3CorruptError(tls, 112777) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63652,7 +64107,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } if rc == SQLITE_OK && ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { - rc = Xsqlite3CorruptError(tls, 111240) + rc = Xsqlite3CorruptError(tls, 112788) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -63674,7 +64129,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z var zBuf2 uintptr = uintptr(0) if zNew != 0 { - zQuot = Xsqlite3MPrintf(tls, db, ts+10854, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10868, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63714,12 +64169,12 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10860, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10874, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { - return ts + 10844 + return ts + 10858 } - return ts + 1534 + return ts + 1554 }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -63893,8 +64348,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr @@ -63977,15 +64432,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp + 32 - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -64013,7 +64468,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -64046,13 +64501,13 @@ __15: renameTokenFind(tls, bp+32, bp, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable+52) __16: ; - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64065,7 +64520,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -64080,7 +64535,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) - Xsqlite3WalkExpr(tls, bp+440, pExpr) + Xsqlite3WalkExpr(tls, bp+448, pExpr) goto __24 __24: i++ @@ -64136,8 +64591,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -64185,7 +64640,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -64205,7 +64660,7 @@ __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) @@ -64253,8 +64708,8 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 } func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(544) - defer tls.Free(544) + bp := tls.Alloc(552) + defer tls.Free(552) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64296,11 +64751,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) - libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 488)).FpParse = bp + 80 + libc.Xmemset(tls, bp+496, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -64370,7 +64825,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*8))) } else if (*Parse)(unsafe.Pointer(bp+80)).FzErrMsg != 0 { - renameColumnParseError(tls, context, ts+1534, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) + renameColumnParseError(tls, context, ts+1554, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } @@ -64393,8 +64848,8 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { } func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(488) - defer tls.Free(488) + bp := tls.Alloc(496) + defer tls.Free(496) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64412,16 +64867,16 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 440)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 440)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+448, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 448)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 448)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 440)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 + *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64436,31 +64891,31 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+440, pSelect) + Xsqlite3WalkSelect(tls, bp+448, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+440, + Xsqlite3WalkExpr(tls, bp+448, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*24)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64478,8 +64933,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint } func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(464) - defer tls.Free(464) + bp := tls.Alloc(472) + defer tls.Free(472) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64505,9 +64960,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*U64)(unsafe.Pointer(db + 48)) |= U64(flags & (SQLITE_DqsDML | SQLITE_DqsDDL)) if rc == SQLITE_OK { if isLegacy == 0 && (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 && int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { - libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 408)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) + libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+416) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64535,8 +64990,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var db uintptr var iSchema int32 @@ -64573,7 +65028,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 112176) + rc = Xsqlite3CorruptError(tls, 113724) goto drop_column_done __2: ; @@ -64597,7 +65052,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10865, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10879, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -64678,19 +65133,19 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10487, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10501, libc.VaList(bp, pName)) goto exit_drop_column __6: ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10872, + Xsqlite3ErrorMsg(tls, pParse, ts+10886, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10900 + return ts + 10914 } - return ts + 6113 + return ts + 6127 }(), zCol)) goto exit_drop_column @@ -64699,7 +65154,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10912, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10926, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64713,13 +65168,13 @@ __8: goto exit_drop_column __9: ; - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1534, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1554, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10960, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10974, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11081, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11095, 1) if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 @@ -64837,11 +65292,11 @@ func Xsqlite3AlterFunctions(tls *libc.TLS) { } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11099}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11120}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11140}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11178}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11113}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11134}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11154}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11173}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11192}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64875,7 +65330,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { Xsqlite3NestedParse(tls, pParse, - ts+11201, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11215, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } @@ -64884,10 +65339,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11254, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11268, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } @@ -64905,9 +65360,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11272, FzCols: ts + 11285}, - {FzName: ts + 11298, FzCols: ts + 11311}, - {FzName: ts + 11339}, + {FzName: ts + 11286, FzCols: ts + 11299}, + {FzName: ts + 11312, FzCols: ts + 11325}, + {FzName: ts + 11353}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -65098,7 +65553,7 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11352} + FzName: ts + 11366} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol @@ -65349,7 +65804,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11362} + FzName: ts + 11376} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -65363,7 +65818,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24, ts+11372, + Xsqlite3_str_appendf(tls, bp+24, ts+11386, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -65376,7 +65831,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11377, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11391, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65418,7 +65873,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+56, ts+11383, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11397, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar-- @@ -65432,7 +65887,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11389} + FzName: ts + 11403} func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) @@ -65476,7 +65931,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } - if Xsqlite3_strlike(tls, ts+11398, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11412, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65493,7 +65948,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11272, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11286, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -6) @@ -65649,7 +66104,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65706,7 +66161,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11408, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11422, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65753,9 +66208,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11412) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11426) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11416) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11430) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65838,7 +66293,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, var v TRowcnt if z == uintptr(0) { - z = ts + 1534 + z = ts + 1554 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -65860,15 +66315,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 13, 0x2000) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 9, 0x200) for *(*uint8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11420, z) == 0 { + if Xsqlite3_strglob(tls, ts+11434, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 13, 0x2000) - } else if Xsqlite3_strglob(tls, ts+11431, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11445, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11441, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11455, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 9, 0x200) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -66144,11 +66599,11 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { var rc int32 = SQLITE_OK var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11298, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11312, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11453, - ts+11507, + ts+11467, + ts+11521, zDb) } return rc @@ -66195,10 +66650,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11272, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11286, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11559, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11573, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -66256,7 +66711,7 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6367, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6381, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -66286,20 +66741,20 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1534 + zFile = ts + 1554 __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1534 + zName = ts + 1554 __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x20>>5)) != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3821) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3835) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } @@ -66315,13 +66770,13 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11600, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11614, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11603, + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11617, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: @@ -66335,7 +66790,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11640, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11654, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -66346,7 +66801,7 @@ __9: goto __10 __10: ; - if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { + if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) @@ -66399,7 +66854,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11670, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11684, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -66416,7 +66871,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11699, 0) + ts+11713, 0) rc = SQLITE_ERROR __23: ; @@ -66482,13 +66937,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1470, 0) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1490, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11767, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11781, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -66535,7 +66990,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1534 + zName = ts + 1554 __1: ; i = 0 @@ -66566,14 +67021,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11795, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11809, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11816, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11830, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66581,7 +67036,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11842, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11856, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66692,7 +67147,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11864} + FzName: ts + 11878} // Called by the parser to compile an ATTACH statement. // @@ -66705,7 +67160,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11878} + FzName: ts + 11892} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66719,7 +67174,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11892, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11906, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66751,7 +67206,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11916, + ts+11930, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66926,7 +67381,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint } func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - Xsqlite3ErrorMsg(tls, pParse, ts+11962, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11976, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66952,11 +67407,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11991, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12005, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11997, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12011, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -67003,7 +67458,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName } else { - zCol = ts + 7639 + zCol = ts + 7653 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -67027,7 +67482,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+12024, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12038, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -67121,6 +67576,8 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { var db uintptr var v uintptr + var iDb int32 + var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -67148,9 +67605,8 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) var addrRewind int32 - var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { @@ -67169,62 +67625,54 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) - if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && - ((*Parse)(unsafe.Pointer(pParse)).FcookieMask != YDbMask(0) || (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0) { - var iDb int32 - var i int32 - - Xsqlite3VdbeJumpHere(tls, v, 0) - - iDb = 0 - for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&iDb, 1) < (*Sqlite3)(unsafe.Pointer(db)).FnDb { - var pSchema uintptr - if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(1)<<iDb) != YDbMask(0)) == 0 { - continue - } - 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)<<iDb) != YDbMask(0)), - (*Schema)(unsafe.Pointer(pSchema)).Fschema_cookie, - (*Schema)(unsafe.Pointer(pSchema)).FiGeneration) - if int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { - Xsqlite3VdbeChangeP5(tls, v, uint16(1)) - } + 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)<<iDb) != YDbMask(0)) == 0 { + continue } - for i = 0; i < (*Parse)(unsafe.Pointer(pParse)).FnVtabLock; i++ { - var vtab uintptr = Xsqlite3GetVTable(tls, db, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FapVtabLock + uintptr(i)*8))) - Xsqlite3VdbeAddOp4(tls, v, OP_VBegin, 0, 0, 0, vtab, -11) + 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)<<iDb) != YDbMask(0)), + (*Schema)(unsafe.Pointer(pSchema)).Fschema_cookie, + (*Schema)(unsafe.Pointer(pSchema)).FiGeneration) + if int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) } - (*Parse)(unsafe.Pointer(pParse)).FnVtabLock = 0 - codeTableLocks(tls, pParse) + } + for i = 0; i < (*Parse)(unsafe.Pointer(pParse)).FnVtabLock; i++ { + var vtab uintptr = Xsqlite3GetVTable(tls, db, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FapVtabLock + uintptr(i)*8))) + Xsqlite3VdbeAddOp4(tls, v, OP_VBegin, 0, 0, 0, vtab, -11) + } + (*Parse)(unsafe.Pointer(pParse)).FnVtabLock = 0 - Xsqlite3AutoincrementBegin(tls, pParse) + codeTableLocks(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { - var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr - (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) - for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { - var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) - if iReg > 0 { - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) - } - } - } + Xsqlite3AutoincrementBegin(tls, pParse) - if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) - if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) - } + if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { + var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr + (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) + for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { + var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } + } - Xsqlite3VdbeGoto(tls, v, 1) + if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 200)) + if (*Returning)(unsafe.Pointer(pRet)).FnRetCol != 0 { + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) + } } + + Xsqlite3VdbeGoto(tls, v, 1) } if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { @@ -67271,13 +67719,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+272)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) - libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+280)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+272)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -67302,25 +67750,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6367) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6381) == 0 { i = 0 } else { return uintptr(0) } } p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5879) + ts+5893) } } } @@ -67341,12 +67789,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12058+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5879) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12039+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5893) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12053+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12072) + ts+12086) } } } @@ -67375,9 +67823,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { - if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { - var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12091, 7) == 0 { + if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { + var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12105, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67388,21 +67836,21 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr return uintptr(0) } (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) - } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && (*Parse)(unsafe.Pointer(pParse)).FdisableVtab != 0 { + } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12099 + zMsg = ts + 12113 } else { - zMsg = ts + 12112 + zMsg = ts + 12126 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6571, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6585, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6581, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6595, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67432,12 +67880,12 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { - if Xsqlite3_strnicmp(tls, zName, ts+8058, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5879+7) == 0 { - return ts + 12058 + if Xsqlite3_strnicmp(tls, zName, ts+8072, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5893+7) == 0 { + return ts + 12072 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12072+7) == 0 { - return ts + 12039 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12086+7) == 0 { + return ts + 12053 } } return zName @@ -67542,10 +67990,10 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j - if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+688 { - libc.Xmemcpy(tls, db+688, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{}))) + if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+696 { + libc.Xmemcpy(tls, db+696, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{}))) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) - (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 + (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 696 } } @@ -67701,11 +68149,11 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { goto __3 __3: ; - Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) + Xsqlite3DbNNFreeNN(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 16))) } - if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { (*Table)(unsafe.Pointer(pTable)).FaCol = uintptr(0) (*Table)(unsafe.Pointer(pTable)).FnCol = int16(0) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { @@ -67722,7 +68170,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { for pIndex = (*Table)(unsafe.Pointer(pTable)).FpIndex; pIndex != 0; pIndex = pNext { pNext = (*Index)(unsafe.Pointer(pIndex)).FpNext - if (db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) { var zName uintptr = (*Index)(unsafe.Pointer(pIndex)).FzName Xsqlite3HashInsert(tls, (*Index)(unsafe.Pointer(pIndex)).FpSchema+32, zName, uintptr(0)) @@ -67751,7 +68199,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { if !(pTable != 0) { return } - if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) @@ -67795,7 +68243,7 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5879) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5893) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67821,7 +68269,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6367, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6381, zName) { goto __3 } @@ -67874,13 +68322,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12126, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12140, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12143, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12157, libc.VaList(bp, pName1)) return -1 } } else { @@ -67918,13 +68366,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType if Xsqlite3_stricmp(tls, zType, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit))) != 0 || Xsqlite3_stricmp(tls, zName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 1*8))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*8))) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8058, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8072, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12163, + Xsqlite3ErrorMsg(tls, pParse, ts+12177, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -68084,9 +68532,9 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -68102,7 +68550,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12205, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12219, 0) return __4: ; @@ -68130,9 +68578,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), zName) != 0) { goto __8 } @@ -68148,9 +68596,9 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -68181,12 +68629,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12246, + Xsqlite3ErrorMsg(tls, pParse, ts+12260, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10415 + return ts + 10429 } - return ts + 8800 + return ts + 8814 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -68201,7 +68649,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12267, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12281, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -68236,8 +68684,8 @@ __18: Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; - reg1 = libc.AssignPtrInt32(pParse+120, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) - reg2 = libc.AssignPtrInt32(pParse+124, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg1 = libc.AssignPtrInt32(pParse+128, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) + reg2 = libc.AssignPtrInt32(pParse+132, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) reg3 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp3(tls, v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT) Xsqlite3VdbeUsesBtree(tls, v, iDb) @@ -68258,7 +68706,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 200)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -68288,7 +68736,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12302, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12316, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -68312,7 +68760,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12333, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -68321,7 +68769,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 200)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -68332,7 +68780,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12302 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12316 (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -68344,7 +68792,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - if Xsqlite3HashInsert(tls, pHash, ts+12302, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12316, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -68378,7 +68826,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68386,13 +68834,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12376, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12390, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12383, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12397, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32)).Fn-- @@ -68429,7 +68877,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12393, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12407, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68593,10 +69041,10 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12419, + Xsqlite3ErrorMsg(tls, pParse, ts+12433, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12464, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12478, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -68627,7 +69075,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12505, 0) + ts+12519, 0) } } @@ -68672,7 +69120,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12557, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12571, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68761,7 +69209,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12598, 0) + ts+12612, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68787,7 +69235,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*32)).FpBt) != 0) { (*Table)(unsafe.Pointer(pTab)).FpCheck = Xsqlite3ExprListAppend(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pCheckExpr) if (*Parse)(unsafe.Pointer(pParse)).FconstraintName.Fn != 0 { - Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+96, 1) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+104, 1) } else { for zStart++; int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart))])&0x01 != 0; zStart++ { } @@ -68856,7 +69304,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12654, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12668, 0) goto generated_done __2: ; @@ -68869,13 +69317,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12697, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12711, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12719, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68908,7 +69356,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12712, + Xsqlite3ErrorMsg(tls, pParse, ts+12726, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -69029,13 +69477,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1534 - zSep2 = ts + 12743 - zEnd = ts + 4943 + zSep = ts + 1554 + zSep2 = ts + 12757 + zEnd = ts + 4957 } else { - zSep = ts + 12745 - zSep2 = ts + 12749 - zEnd = ts + 12754 + zSep = ts + 12759 + zSep2 = ts + 12763 + zEnd = ts + 12768 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -69043,7 +69491,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12757, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12771, 0) *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8)), 1)))) = uint8('(') @@ -69077,16 +69525,16 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3649, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3663, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - ts + 1534, - ts + 12771, - ts + 12777, - ts + 12782, - ts + 12787, + ts + 1554, + ts + 12785, + ts + 12791, + ts + 12796, + ts + 12801, } func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { @@ -69225,8 +69673,8 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } - if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) + if *(*int32)(unsafe.Pointer(pParse + 200)) != 0 { + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 200)), BTREE_BLOBKEY) } if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { @@ -69353,7 +69801,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return 0 } @@ -69377,7 +69825,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { var pMod uintptr var k uintptr - pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) + pMod = Xsqlite3HashFind(tls, db+576, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8))))) if pMod == uintptr(0) { return } @@ -69476,7 +69924,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { if pSelect != 0 || !(int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM) && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1534, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1554, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -69493,10 +69941,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12793, - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1534))) + ts+12807, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1554))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12826, + Xsqlite3ErrorMsg(tls, pParse, ts+12840, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69515,11 +69963,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12853, 0) + ts+12867, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12903, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12917, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69553,7 +70001,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12935, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12949, 0) return } } @@ -69578,11 +70026,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { - zType = ts + 8800 - zType2 = ts + 12979 + zType = ts + 8814 + zType2 = ts + 12993 } else { - zType = ts + 10415 - zType2 = ts + 12985 + zType = ts + 10429 + zType2 = ts + 12999 } if pSelect != 0 { @@ -69644,7 +70092,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 272 + pEnd2 = pParse + 280 } else { pEnd2 = pEnd } @@ -69653,11 +70101,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12990, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13004, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13005, + ts+13019, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69673,13 +70121,13 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13103, + ts+13117, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13145, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13159, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69694,7 +70142,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9322) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9336) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69724,7 +70172,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13179, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13193, 0) goto create_view_fail __1: ; @@ -69740,7 +70188,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10415, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10429, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -69803,10 +70251,7 @@ __10: return } -// The Table structure pTable is really a VIEW. Fill in the names of -// the columns of the view in the pTable structure. Return the number -// of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { +func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -69824,12 +70269,8 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return rc } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { - return 0 - } - if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13215, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13229, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69889,6 +70330,13 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i return nErr } +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { + if !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) && int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { + return 0 + } + return viewGetColumnNames(tls, pParse, pTable) +} + func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { var i uintptr @@ -69948,13 +70396,13 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13245, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13259, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13260, + ts+13274, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -69995,10 +70443,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13327, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13341, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11224, + ts+11238, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -70030,12 +70478,12 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13341, + ts+13355, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13386, + ts+13400, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -70063,11 +70511,11 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { } func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3272, 4) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3286, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7059, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7073, 10) == 0 { return 0 } return 1 @@ -70145,9 +70593,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -70206,21 +70654,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13453, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13467, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13481, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13495, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13515, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13529, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -70232,7 +70680,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11416, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11430, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -70296,7 +70744,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13547, + ts+13561, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -70308,7 +70756,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13610, 0) + ts+13624, 0) goto fk_end goto __7 __6: @@ -70393,7 +70841,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13704, + ts+13718, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -70620,12 +71068,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x400>>10)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13750, + Xsqlite3ErrorMsg(tls, pParse, ts+13764, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13778 + return ts + 13792 } - return ts + 13784 + return ts + 13798 }())) return 1 } @@ -70746,7 +71194,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13789, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13803, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -70765,7 +71213,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13795, + ts+13809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70791,26 +71239,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13845, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13859, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13873, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13887, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13898, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13912, 0) goto exit_create_index __17: ; @@ -70824,7 +71272,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13789, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13803, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70836,10 +71284,10 @@ __21: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } - if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { + if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13932, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70851,7 +71299,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13966, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13980, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70880,7 +71328,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13990, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14004, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70901,9 +71349,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70942,7 +71390,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13789) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13803) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -71043,7 +71491,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14013, 0) + ts+14027, 0) goto exit_create_index __56: ; @@ -71057,6 +71505,7 @@ __57: j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 12, 0x1000) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 4, 0x10) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) @@ -71077,6 +71526,7 @@ __60: goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 5, 0x20) + libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 4, 0x10) __61: ; __59: @@ -71258,7 +71708,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14074, libc.VaList(bp+48, 0)) + ts+14088, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -71310,8 +71760,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14116, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 119536) + Xsqlite3ErrorMsg(tls, pParse, ts+14130, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) goto exit_create_index __101: ; @@ -71357,12 +71807,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14133, + zStmt = Xsqlite3MPrintf(tls, db, ts+14147, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1534 + return ts + 1554 } - return ts + 14153 + return ts + 14167 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -71370,7 +71820,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14161, + ts+14175, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -71384,7 +71834,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14220, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14234, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71545,7 +71995,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14247, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14261, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71560,7 +72010,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14265, libc.VaList(bp+8, 0)) + ts+14279, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71571,9 +72021,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71599,9 +72049,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14338, + ts+14352, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11412, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11426, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -71682,6 +72132,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 + if pList == uintptr(0) { return } @@ -71689,7 +72140,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer(pList+8+uintptr(i)*16)).FzName) } - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 @@ -71735,7 +72186,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14398, + Xsqlite3ErrorMsg(tls, pParse, ts+14412, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71870,6 +72321,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { var i int32 var pItem uintptr + if pList == uintptr(0) { return } @@ -71881,11 +72333,13 @@ __1: } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) + } + if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } - Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) + Xsqlite3DbNNFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4000>>14)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 88))) @@ -71912,7 +72366,7 @@ __2: goto __3 __3: ; - Xsqlite3DbFreeNN(tls, db, pList) + Xsqlite3DbNNFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the @@ -71940,12 +72394,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && pOnUsing != uintptr(0) && ((*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14434, + Xsqlite3ErrorMsg(tls, pParse, ts+14448, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14470 + return ts + 14484 } - return ts + 14473 + return ts + 14487 }())) goto append_from_error __1: @@ -72114,7 +72568,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14479, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14493, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -72150,9 +72604,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14485 + return ts + 14499 } - return ts + 14494 + return ts + 14508 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -72177,7 +72631,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14479, ts + 14501, ts + 14485} +var az = [3]uintptr{ts + 14493, ts + 14515, ts + 14499} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -72192,7 +72646,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14509, 0) + ts+14523, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -72210,7 +72664,7 @@ var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLU func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(1)<<iDb) != YDbMask(0)) == 0 { - *(*YDbMask)(unsafe.Pointer(pToplevel + 116)) |= YDbMask(1) << iDb + *(*YDbMask)(unsafe.Pointer(pToplevel + 124)) |= YDbMask(1) << iDb if !(0 != 0) && iDb == 1 { Xsqlite3OpenTempDatabase(tls, pToplevel) } @@ -72258,7 +72712,7 @@ func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int return pParse }() sqlite3CodeVerifySchemaAtToplevel(tls, pToplevel, iDb) - *(*YDbMask)(unsafe.Pointer(pToplevel + 112)) |= YDbMask(1) << iDb + *(*YDbMask)(unsafe.Pointer(pToplevel + 120)) |= YDbMask(1) << iDb *(*U8)(unsafe.Pointer(pToplevel + 32)) |= U8(setStatement) } @@ -72329,17 +72783,17 @@ func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx Xsqlite3StrAccumInit(tls, bp+8, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136))) if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 { - Xsqlite3_str_appendf(tls, bp+8, ts+14579, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3_str_appendf(tls, bp+8, ts+14593, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) } else { for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ { var zCol uintptr zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*24)).FzCnName if j != 0 { - Xsqlite3_str_append(tls, bp+8, ts+14590, 2) + Xsqlite3_str_append(tls, bp+8, ts+14604, 2) } Xsqlite3_str_appendall(tls, bp+8, (*Table)(unsafe.Pointer(pTab)).FzName) - Xsqlite3_str_append(tls, bp+8, ts+1547, 1) + Xsqlite3_str_append(tls, bp+8, ts+1567, 1) Xsqlite3_str_appendall(tls, bp+8, zCol) } } @@ -72362,11 +72816,11 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab var zMsg uintptr var rc int32 if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11999, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14593, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14607, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72496,7 +72950,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14602, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14616, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72592,7 +73046,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14648, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14662, libc.VaList(bp, zName)) } } } @@ -72697,7 +73151,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { var pColl uintptr - pColl = Xsqlite3HashFind(tls, db+640, zName) + pColl = Xsqlite3HashFind(tls, db+648, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 @@ -72711,7 +73165,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui (*CollSeq)(unsafe.Pointer(pColl + 2*40)).FzName = pColl + 3*40 (*CollSeq)(unsafe.Pointer(pColl + 2*40)).Fenc = U8(SQLITE_UTF16BE) libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint64(nName)) - pDel = Xsqlite3HashInsert(tls, db+640, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) + pDel = Xsqlite3HashInsert(tls, db+648, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) @@ -72790,7 +73244,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14678, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14692, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72917,7 +73371,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, nName = Xsqlite3Strlen30(tls, zName) - p = Xsqlite3HashFind(tls, db+616, zName) + p = Xsqlite3HashFind(tls, db+624, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { @@ -72951,7 +73405,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, for z = (*FuncDef)(unsafe.Pointer(pBest)).FzName; *(*U8)(unsafe.Pointer(z)) != 0; z++ { *(*U8)(unsafe.Pointer(z)) = Xsqlite3UpperToLower[*(*U8)(unsafe.Pointer(z))] } - pOther = Xsqlite3HashInsert(tls, db+616, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) + pOther = Xsqlite3HashInsert(tls, db+624, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) @@ -72974,26 +73428,27 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(896) + defer tls.Free(896) var pElem uintptr var pSchema uintptr = p - *(*Hash)(unsafe.Pointer(bp + 24)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash - *(*Hash)(unsafe.Pointer(bp)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3{}))) + *(*Hash)(unsafe.Pointer(bp + 872)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash + *(*Hash)(unsafe.Pointer(bp + 848)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash Xsqlite3HashInit(tls, pSchema+56) Xsqlite3HashClear(tls, pSchema+32) - for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { - Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) + for pElem = (*Hash)(unsafe.Pointer(bp + 848)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + Xsqlite3DeleteTrigger(tls, bp, (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp) + Xsqlite3HashClear(tls, bp+848) Xsqlite3HashInit(tls, pSchema+8) - for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { + for pElem = (*Hash)(unsafe.Pointer(bp + 872)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata - Xsqlite3DeleteTable(tls, uintptr(0), pTab) + Xsqlite3DeleteTable(tls, bp, pTab) } - Xsqlite3HashClear(tls, bp+24) + Xsqlite3HashClear(tls, bp+872) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -73059,10 +73514,26 @@ func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColNam Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } +func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0) { + return 1 + } + + if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && + int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { + Xsqlite3ErrorMsg(tls, pParse, ts+14723, + libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + } + return 0 +} + func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) + return vtabIsReadOnly(tls, pParse, pTab) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 @@ -73075,19 +73546,21 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { return Xsqlite3ReadOnlyShadowTables(tls, db) } -// Check to make sure the given table is writable. If it is not -// writable, generate an error message and return 1. If it is -// writable return 0; +// Check to make sure the given table is writable. +// +// If pTab is not writable -> generate an error message and return 1. +// If pTab is writable but other errors have occurred -> return 1. +// If pTab is writable and no prior errors -> return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14756, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14738, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14785, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73314,17 +73787,19 @@ __18: goto __20 } - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } - Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { + Xsqlite3VdbeAddOp3(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) + goto __22 __21: + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) +__22: ; goto __19 __19: @@ -73337,10 +73812,10 @@ __20: __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { - goto __22 + goto __23 } bComplex = 1 -__22: +__23: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { @@ -73349,15 +73824,15 @@ __22: return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __23 + goto __24 } pPk = uintptr(0) nPk = int16(1) iRowSet = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, iRowSet) - goto __24 -__23: + goto __25 +__24: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) @@ -73366,98 +73841,98 @@ __23: iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__24: +__25: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { - goto __25 + goto __26 } goto delete_from_cleanup -__25: +__26: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { - goto __26 + goto __27 } Xsqlite3MultiWrite(tls, pParse) -__26: +__27: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { - goto __27 + goto __28 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) -__27: +__28: ; if !(memCnt != 0) { - goto __28 + goto __29 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) -__28: +__29: ; if !(pPk != 0) { - goto __29 + goto __30 } i = 0 -__31: +__32: if !(i < int32(nPk)) { - goto __33 + goto __34 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), iPk+i) - goto __32 -__32: - i++ - goto __31 goto __33 __33: + i++ + goto __32 + goto __34 +__34: ; iKey = iPk - goto __30 -__29: + goto __31 +__30: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) -__30: +__31: ; if !(eOnePass != ONEPASS_OFF) { - goto __34 + goto __35 } nKey = nPk aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { - goto __36 + goto __37 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup -__36: +__37: ; libc.Xmemset(tls, aToOpen, 1, uint64(nIdx+1)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 72)) >= 0) { - goto __37 + goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) -__37: +__38: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { - goto __38 + goto __39 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) -__38: +__39: ; if !(addrEphOpen != 0) { - goto __39 + goto __40 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) -__39: +__40: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) - goto __35 -__34: + goto __36 +__35: if !(pPk != 0) { - goto __40 + goto __41 } iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -73465,138 +73940,143 @@ __34: Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, iPk, int32(nPk), iKey, Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPk), int32(nPk)) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iEphCur, iKey, iPk, int32(nPk)) - goto __41 -__40: + goto __42 +__41: nKey = int16(1) Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) -__41: +__42: ; Xsqlite3WhereEnd(tls, pWInfo) -__35: +__36: ; if !!(isView != 0) { - goto __42 + goto __43 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { - goto __43 + goto __44 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) -__43: +__44: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { - goto __44 + goto __45 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) -__44: +__45: ; -__42: +__43: ; if !(eOnePass != ONEPASS_OFF) { - goto __45 + goto __46 } if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { - goto __47 + goto __48 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80)), addrBypass, iKey, int32(nKey)) -__47: +__48: ; - goto __46 -__45: + goto __47 +__46: if !(pPk != 0) { - goto __48 + goto __49 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __50 + goto __51 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) - goto __51 -__50: - Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) + goto __52 __51: + Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) +__52: ; - goto __49 -__48: + goto __50 +__49: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) -__49: +__50: ; -__46: +__47: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __52 + goto __53 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { - goto __54 + goto __55 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { - goto __55 + goto __56 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) -__55: +__56: ; -__54: +__55: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -11) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) - goto __53 -__52: + goto __54 +__53: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80)), *(*int32)(unsafe.Pointer(bp + 84)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) -__53: +__54: ; if !(eOnePass != ONEPASS_OFF) { - goto __56 + goto __57 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) - goto __57 -__56: + goto __58 +__57: if !(pPk != 0) { - goto __58 + goto __59 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) - goto __59 -__58: + goto __60 +__59: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) -__59: +__60: ; -__57: +__58: ; __16: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __60 + goto __61 } Xsqlite3AutoincrementEnd(tls, pParse) -__60: +__61: ; if !(memCnt != 0) { - goto __61 + goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14776) -__61: + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14823) +__62: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) - Xsqlite3DbFree(tls, db, aToOpen) + if !(aToOpen != 0) { + goto __63 + } + Xsqlite3DbNNFreeNN(tls, db, aToOpen) +__63: + ; return } @@ -73699,7 +74179,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11272) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11286) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73929,7 +74409,7 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6177, ts + 6172, ts + 7931, ts + 7926, ts + 6167} +var azType2 = [5]uintptr{ts + 6191, ts + 6186, ts + 7945, ts + 7940, ts + 6181} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73988,7 +74468,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) return } iVal = -iVal @@ -74292,7 +74772,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14806, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14853, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74482,7 +74962,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } } - if c <= U32(0x80) { + if c < U32(0x80) { var bMatch int32 if noCase != 0 { *(*uint8)(unsafe.Pointer(bp + 16)) = uint8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) @@ -74595,13 +75075,27 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { - return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + if zString == uintptr(0) { + return libc.Bool32(zGlobPattern != uintptr(0)) + } else if zGlobPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) + } + return int32(0) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { - return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + if zStr == uintptr(0) { + return libc.Bool32(zPattern != uintptr(0)) + } else if zPattern == uintptr(0) { + return 1 + } else { + return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) + } + return int32(0) } func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74624,7 +75118,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14811, -1) + Xsqlite3_result_error(tls, context, ts+14858, -1) return } if argc == 3 { @@ -74634,7 +75128,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14844, -1) + ts+14891, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74687,7 +75181,7 @@ func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3649, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3663, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -74727,13 +75221,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+4911, libc.VaList(bp, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+4925, libc.VaList(bp, r1)) zVal = Xsqlite3_str_value(tls, pStr) if zVal != 0 { Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, ts+14889, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14936, libc.VaList(bp+8, r1)) } } break @@ -74741,7 +75235,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case SQLITE_INTEGER: { - Xsqlite3_str_appendf(tls, pStr, ts+1314, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) + Xsqlite3_str_appendf(tls, pStr, ts+1334, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } @@ -74770,13 +75264,13 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14896, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14943, libc.VaList(bp+24, zArg)) break } default: { - Xsqlite3_str_append(tls, pStr, ts+1535, 4) + Xsqlite3_str_append(tls, pStr, ts+1555, 4) break } @@ -75086,7 +75580,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10844} +var azOne = [1]uintptr{ts + 10858} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -75098,7 +75592,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1534 + zIn = ts + 1554 } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } @@ -75122,7 +75616,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14899, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14946, 4, uintptr(0)) } } @@ -75147,7 +75641,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+12024, -1) + Xsqlite3_result_error(tls, context, ts+12038, -1) return } @@ -75225,7 +75719,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14789, -1) + Xsqlite3_result_error(tls, context, ts+14836, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75487,7 +75981,7 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14904, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14951, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75507,14 +76001,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14910, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14910, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14957, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14910, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14957, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75754,107 +76248,107 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { } var aBuiltinFunc = [101]FuncDef{ - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14915}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14935}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14948}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14966}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14983}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14998}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15024}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15049}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15058}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15069}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15076}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15090}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15096}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15102}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15107}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15107}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15111}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15111}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15115}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15122}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15137}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15143}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15150}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15165}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15180}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15186}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15196}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15203}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15228}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15260}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15271}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15295}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15303}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15325}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15341}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15351}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15355}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15361}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15365}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15365}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15371}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15371}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15384}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14910}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6512}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15389}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15394}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15402}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15408}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15414}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15421}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15427}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15417}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15432}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15446}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 14962}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14982}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14995}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 15013}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15022}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15030}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15045}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15071}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15096}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15105}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15116}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15123}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15137}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15143}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15143}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15149}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15149}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15154}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15154}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15154}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15158}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15158}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15169}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15177}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15197}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15204}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15212}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15217}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15221}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15227}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15239}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15243}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15257}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15268}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15275}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15290}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15307}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15318}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15324}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15342}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15350}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15364}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15388}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15398}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15402}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15408}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15412}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15412}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15418}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15418}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15431}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14957}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15436}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15441}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15449}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15455}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15460}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15465}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15475}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15461}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15464}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15468}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15474}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15464}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15479}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15498}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15504}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15537}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15540}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6512}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15545}} + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15487}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15493}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15497}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15502}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15507}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15512}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15518}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15522}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15526}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15530}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15535}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15540}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15545}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15551}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15557}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15563}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15568}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15576}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15584}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15587}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6526}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15592}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75975,7 +76469,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15549, + ts+15596, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -76635,8 +77129,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6378, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6374, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6392, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6388, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76715,7 +77209,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 80)).Fz = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*Token)(unsafe.Pointer(bp + 80)).Fn = uint32(Xsqlite3Strlen30(tls, (*Token)(unsafe.Pointer(bp+80)).Fz)) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5122) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5136) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort) } @@ -76818,7 +77312,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { var pNext uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)); pFKey != 0; pFKey = pNext { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { if (*FKey)(unsafe.Pointer(pFKey)).FpPrevTo != 0 { (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpPrevTo)).FpNextTo = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo } else { @@ -76926,6 +77420,27 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { return (*Index)(unsafe.Pointer(pIdx)).FzColAff } +// Compute an affinity string for a table. Space is obtained +// from sqlite3DbMalloc(). The caller is responsible for freeing +// the space when done. +func Xsqlite3TableAffinityStr(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { + var zColAff uintptr + zColAff = Xsqlite3DbMallocRaw(tls, db, uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + if zColAff != 0 { + var i int32 + var j int32 + for i = libc.AssignInt32(&j, 0); i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { + if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { + *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24)).Faffinity + } + } + for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*uint8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { + *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = uint8(0) + } + } + return zColAff +} + // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // @@ -76966,13 +77481,12 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { var i int32 - var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -5) - pPrev = Xsqlite3VdbeGetOp(tls, v, -1) + pPrev = Xsqlite3VdbeGetLastOp(tls, v) (*VdbeOp)(unsafe.Pointer(pPrev)).Fopcode = U8(OP_TypeCheck) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp1, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp2, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp3) @@ -76984,21 +77498,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { } zColAff = (*Table)(unsafe.Pointer(pTab)).FzColAff if zColAff == uintptr(0) { - var db uintptr = Xsqlite3VdbeDb(tls, v) - zColAff = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) + zColAff = Xsqlite3TableAffinityStr(tls, uintptr(0), pTab) if !(zColAff != 0) { - Xsqlite3OomFault(tls, db) + Xsqlite3OomFault(tls, Xsqlite3VdbeDb(tls, v)) return } - - for i = libc.AssignInt32(&j, 0); i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { - if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { - *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24)).Faffinity - } - } - for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*uint8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { - *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = uint8(0) - } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } @@ -77069,7 +77573,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in Xsqlite3TableAffinity(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iRegStore) if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStored) != U32(0) { - pOp = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, -1) + pOp = Xsqlite3VdbeGetLastOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { var ii int32 var jj int32 @@ -77127,7 +77631,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7896, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7910, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77430,6 +77934,8 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var nIdx int32 var pNx uintptr + var pX uintptr + var y int32 var k int32 var colFlags U32 var addr1 int32 @@ -77593,7 +78099,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15594, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -77618,7 +78124,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15635, + Xsqlite3ErrorMsg(tls, pParse, ts+15682, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77767,7 +78273,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15667, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77777,7 +78283,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15719, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15766, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77829,7 +78335,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15744, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77837,7 +78343,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15790, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -78019,7 +78525,20 @@ __91: ; goto __90 __89: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) + pX = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(k)*32)).FpExpr + y = Xsqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) + if !(y != iRegStore) { + goto __92 + } + Xsqlite3VdbeAddOp2(tls, v, + func() int32 { + if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_Subquery) != U32(0) { + return OP_Copy + } + return OP_SCopy + }(), y, iRegStore) +__92: + ; __90: ; __88: @@ -78034,137 +78553,137 @@ __70: ; endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { - goto __92 + goto __93 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) if !(ipkColumn < 0) { - goto __93 + goto __94 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) - goto __94 -__93: + goto __95 +__94: ; if !(useTempTable != 0) { - goto __95 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) - goto __96 -__95: + goto __97 +__96: ; Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) -__96: +__97: ; addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regCols) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) Xsqlite3VdbeJumpHere(tls, v, addr1) Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regCols) -__94: +__95: ; Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __97 + goto __98 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) -__97: +__98: ; if !!(isView != 0) { - goto __98 + goto __99 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) -__98: +__99: ; Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_BEFORE, pTab, regCols-int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1, onError, endOfLoop) Xsqlite3ReleaseTempRange(tls, pParse, regCols, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) -__92: +__93: ; if !!(isView != 0) { - goto __99 + goto __100 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __100 + goto __101 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) -__100: +__101: ; if !(ipkColumn >= 0) { - goto __101 + goto __102 } if !(useTempTable != 0) { - goto __103 + goto __104 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) - goto __104 -__103: + goto __105 +__104: if !(pSelect != 0) { - goto __105 + goto __106 } - goto __106 -__105: + goto __107 +__106: pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*32)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { - goto __107 + goto __108 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) - goto __108 -__107: - Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) + goto __109 __108: + Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) +__109: ; -__106: +__107: ; -__104: +__105: ; if !!(appendFlag != 0) { - goto __109 + goto __110 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __110 + goto __111 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) - goto __111 -__110: + goto __112 +__111: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) -__111: +__112: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) -__109: +__110: ; - goto __102 -__101: + goto __103 +__102: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { - goto __112 + goto __113 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) - goto __113 -__112: + goto __114 +__113: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176)), regRowid, regAutoinc) appendFlag = U8(1) -__113: +__114: ; -__102: +__103: ; autoIncStep(tls, pParse, regAutoinc, regRowid) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { - goto __114 + goto __115 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) -__114: +__115: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __115 + goto __116 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) @@ -78176,64 +78695,68 @@ __114: return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) - goto __116 -__115: + goto __117 +__116: *(*int32)(unsafe.Pointer(bp + 184)) = 0 Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) + if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { + goto __118 + } Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) - +__118: + ; bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176)), *(*int32)(unsafe.Pointer(bp + 180)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) -__116: +__117: ; -__99: +__100: ; if !(regRowCount != 0) { - goto __117 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) -__117: +__119: ; if !(pTrigger != 0) { - goto __118 + goto __120 } Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) -__118: +__120: ; Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { - goto __119 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) - goto __120 -__119: + goto __122 +__121: if !(pSelect != 0) { - goto __121 + goto __123 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) -__121: +__123: ; -__120: +__122: ; insert_end: if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { - goto __122 + goto __124 } Xsqlite3AutoincrementEnd(tls, pParse) -__122: +__124: ; if !(regRowCount != 0) { - goto __123 + goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15811) -__123: + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) +__125: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) @@ -78241,7 +78764,11 @@ insert_cleanup: Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) - Xsqlite3DbFree(tls, db, aRegIdx) + if !(aRegIdx != 0) { + goto __126 + } + Xsqlite3DbNNFreeNN(tls, db, aRegIdx) +__126: } func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { @@ -78544,7 +79071,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -79635,13 +80162,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 129438) + return Xsqlite3MisuseError(tls, 131055) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1534 + zSql = ts + 1554 __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -80080,6 +80607,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fdeserialize: 0, Fserialize: 0, Fdb_name: 0, + Fvalue_encoding: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80118,7 +80646,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12024, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12038, 0) __3: ; return SQLITE_ERROR @@ -80127,7 +80655,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15825 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -80142,7 +80670,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11985, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11999, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -80178,7 +80706,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15848, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -80192,7 +80720,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15857, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -80216,7 +80744,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15861, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -80234,7 +80762,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15867, libc.VaList(bp+16, zEntry, zFile)) + ts+15914, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -80261,7 +80789,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15910, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15957, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -80299,7 +80827,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15942, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15989, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80309,7 +80837,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 15979, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80465,7 +80993,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15982, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16029, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80473,63 +81001,63 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { } var pragCName = [57]uintptr{ - ts + 5043, - ts + 16021, - ts + 8800, - ts + 16025, - ts + 16030, - ts + 16033, - ts + 16043, - ts + 16053, - ts + 16059, - ts + 16063, - ts + 16068, - ts + 16073, - ts + 16081, - ts + 16092, - ts + 16095, - ts + 16102, - ts + 16063, - ts + 16068, - ts + 16109, - ts + 16114, - ts + 16117, - ts + 16124, - ts + 16059, - ts + 16063, - ts + 16130, - ts + 16135, - ts + 16140, - ts + 16063, - ts + 16144, + ts + 5057, ts + 16068, - ts + 16152, + ts + 8814, + ts + 16072, + ts + 16077, + ts + 16080, + ts + 16090, + ts + 16100, + ts + 16106, + ts + 16110, + ts + 16115, + ts + 16120, + ts + 16128, + ts + 16139, + ts + 16142, + ts + 16149, + ts + 16110, + ts + 16115, ts + 16156, ts + 16161, - ts + 11416, - ts + 11412, - ts + 16167, - ts + 16172, + ts + 16164, + ts + 16171, + ts + 16106, + ts + 16110, ts + 16177, - ts + 16021, - ts + 16063, ts + 16182, - ts + 16189, - ts + 16196, - ts + 8800, - ts + 16204, - ts + 5046, - ts + 16210, - ts + 16021, - ts + 16063, - ts + 16215, - ts + 16220, - ts + 15417, - ts + 16225, - ts + 16238, - ts + 16247, - ts + 16254, - ts + 16265, + ts + 16187, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, + ts + 16203, + ts + 16208, + ts + 11430, + ts + 11426, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8814, + ts + 16251, + ts + 5060, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, + ts + 16285, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -80547,238 +81075,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16273, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16288, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16303, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16315, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16331, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16254, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16344, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16356, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16376, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16392, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16413, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16428, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16444, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16458, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16471, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16485, + {FzName: ts + 16532, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16504, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16523, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16546, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16555, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16573, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16590, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16603, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16618, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16636, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16646, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16660, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16676, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16701, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16720, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16731, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16742, + {FzName: ts + 16789, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16754, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16770, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16783, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16802, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16821, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16834, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16849, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16859, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16871, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16880, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16891, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16901, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16913, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16924, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16936, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16953, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 16972, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 16998, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17013, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17027, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17046, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17060, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17076, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17088, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17099, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17110, + {FzName: ts + 17157, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17122, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17133, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17154, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17162, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17177, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17190, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17209, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17224, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80800,7 +81328,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17240)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -80812,10 +81340,10 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { func getLockingMode(tls *libc.TLS, z uintptr) int32 { if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17265) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17275) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80824,13 +81352,13 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7944) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7958) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17282) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17287) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80845,9 +81373,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { if int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '2' { return int32(*(*uint8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16215) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17299) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -80861,7 +81389,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17306, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80952,19 +81480,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17368 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17377 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17389 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17397 + zName = ts + 17444 break default: - zName = ts + 17406 + zName = ts + 17453 break } return zName @@ -80981,7 +81509,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17416, ts + 17423, ts + 17431, ts + 17435, ts + 17299, ts + 17444, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -81028,13 +81556,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17448 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17450 + zType = ts + 17497 } else { - zType = ts + 7454 + zType = ts + 7468 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17452, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17499, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -81042,7 +81570,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17459, ts + 17464, ts + 17472} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -81067,8 +81595,8 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { - bp := tls.Alloc(616) - defer tls.Free(616) + bp := tls.Alloc(672) + defer tls.Free(672) var zLeft uintptr var zRight uintptr @@ -81175,13 +81703,22 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var nIdx int32 var pTab8 uintptr var pIdx4 uintptr + + var a1 int32 var zErr uintptr - var pCol1 uintptr - var doError int32 + var jmp2 int32 + var zErr1 uintptr + var pCol1 uintptr + var labelError int32 + var labelOk int32 + var p11 int32 + var p3 int32 + var p4 int32 + var doTypeCheck int32 var addrCkFault int32 var addrCkOk int32 - var zErr1 uintptr + var zErr2 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 @@ -81201,6 +81738,8 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var r1 int32 var bStrict int32 + var r2 int32 + var mxCol int32 var x2 uintptr var pTbls uintptr var aRoot uintptr @@ -81251,7 +81790,7 @@ __1: Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+480) if !(iDb < 0) { goto __2 } @@ -81266,7 +81805,7 @@ __2: return __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480))) if !!(zLeft != 0) { goto __4 } @@ -81276,7 +81815,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17480, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81293,30 +81832,30 @@ __6: goto pragma_out __7: ; - *(*uintptr)(unsafe.Pointer(bp + 448)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 448 + 1*8)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 448 + 2*8)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 448 + 3*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 488 + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 488 + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 488 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+448) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+488) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 448)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 448))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 488)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 488))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 448)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 488)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 448)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 448))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 488)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 488))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -81537,7 +82076,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17484) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -81571,7 +82110,7 @@ __66: goto __15 __19: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(zLeft))]) == 'p') { @@ -81580,36 +82119,36 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+480) == 0) { + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+520) == 0) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 480)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 480)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 520)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 480)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 480)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 520)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 __20: - zRet = ts + 17275 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81647,7 +82186,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17265 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81728,21 +82267,21 @@ __95: __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+488) - if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+528) + if !(*(*I64)(unsafe.Pointer(bp + 528)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 488)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 528)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 488)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 488))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 488))) + *(*I64)(unsafe.Pointer(bp + 528)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 528))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 528))) goto __15 __23: @@ -81784,15 +82323,15 @@ __100: goto __15 __24: - *(*int32)(unsafe.Pointer(bp + 496)) = 0 - if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+496) != 0) || *(*int32)(unsafe.Pointer(bp + 496)) <= 0) { + *(*int32)(unsafe.Pointer(bp + 536)) = 0 + if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+536) != 0) || *(*int32)(unsafe.Pointer(bp + 536)) <= 0) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 496)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 536)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 496)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 536)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -81829,14 +82368,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 500)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+500) != 0) { + *(*int32)(unsafe.Pointer(bp + 540)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+540) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 500))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 540))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 500)) != 0))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 540)) != 0))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) @@ -81855,17 +82394,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+504) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+544) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) __113: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 @@ -81876,7 +82415,7 @@ __114: if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __117 } - Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) __117: ; goto __115 @@ -81888,12 +82427,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 504)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+504) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 544)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+544) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 544))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -81930,11 +82469,11 @@ __123: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+512) - if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 512)) == 0) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+552) + if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 552)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17489, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81953,7 +82492,7 @@ __127: if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -81975,7 +82514,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17514, 0) + ts+17561, 0) goto __133 __132: if !(iDb != 1) { @@ -82029,7 +82568,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17567) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __142 } @@ -82126,13 +82665,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17573 + return ts + 17620 } - return ts + 17581 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1534), + Xsqlite3ColumnType(tls, pCol, ts+1554), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { return 1 @@ -82197,20 +82736,20 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17588, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17635, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } - *(*uintptr)(unsafe.Pointer(bp + 520)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+520, uintptr(0)) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 520))) + *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + Xsqlite3_prepare(tls, db, zSql, -1, bp+560, uintptr(0)) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 560))) Xsqlite3DbFree(tls, db, zSql) __172: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __173 } - Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1490, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __173: ; @@ -82243,29 +82782,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10415 + zType = ts + 10429 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12697 + zType = ts + 12711 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17604 + zType = ts + 17651 goto __183 __182: - zType = ts + 8800 + zType = ts + 8814 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17611, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82331,7 +82870,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17618, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17665, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82341,7 +82880,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17623, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17670, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -82378,12 +82917,12 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 528)) = [3]uintptr{ts + 17628, ts + 17630, ts + 16092} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17632, + *(*[3]uintptr)(unsafe.Pointer(bp + 568)) = [3]uintptr{ts + 17675, ts + 17677, ts + 16139} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17679, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 528 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0xc000>>14)))*8)), + *(*uintptr)(unsafe.Pointer(bp + 568 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0xc000>>14)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __197 __197: @@ -82412,7 +82951,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17638, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) @@ -82428,13 +82967,13 @@ __201: __37: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 - p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst + p = (*Hash)(unsafe.Pointer(db + 648)).Ffirst __203: if !(p != 0) { goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17689, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82473,7 +83012,7 @@ __207: goto __208 __208: ; - j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst + j = (*Hash)(unsafe.Pointer(db + 624)).Ffirst __212: if !(j != 0) { goto __214 @@ -82492,13 +83031,13 @@ __214: __39: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 - j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst + j1 = (*Hash)(unsafe.Pointer(db + 576)).Ffirst __215: if !(j1 != 0) { goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82514,7 +83053,7 @@ __218: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7454, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7468, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82549,7 +83088,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17645, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82557,7 +83096,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17654)) + ts+17701)) goto __227 __227: j2++ @@ -82630,20 +83169,20 @@ __235: goto __236 __238: ; - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pParent)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pParent)).FzName) - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, uintptr(0)) if !(x1 == 0) { goto __239 } - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) == uintptr(0)) { goto __241 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __242 __241: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 552)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 552))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 592)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 592))) __242: ; goto __240 @@ -82681,12 +83220,12 @@ __245: goto __247 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 552)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 560)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 592)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 600)) = uintptr(0) if !(pParent != 0) { goto __248 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+552, bp+560) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+592, bp+600) __248: ; @@ -82703,8 +83242,8 @@ __250: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __252 } - if *(*uintptr)(unsafe.Pointer(bp + 560)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 600)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 600)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } @@ -82717,11 +83256,11 @@ __251: goto __252 __252: ; - if !(*(*uintptr)(unsafe.Pointer(bp + 552)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 592)) != 0) { goto __253 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, 0, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 552))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 592))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol) goto __254 @@ -82746,10 +83285,10 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17659, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17706, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 600))) goto __246 __246: i8++ @@ -82787,17 +83326,17 @@ __259: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __260 } - if !(Xsqlite3GetInt32(tls, zRight, bp+568) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+608) != 0) { goto __261 } - if !(*(*int32)(unsafe.Pointer(bp + 568)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 608)) <= 0) { goto __263 } - *(*int32)(unsafe.Pointer(bp + 568)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 608)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __263: ; goto __262 @@ -82813,7 +83352,7 @@ __262: ; __260: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 568))-1, 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 608))-1, 1) i9 = 0 __264: @@ -82963,7 +83502,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17663, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17710, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82990,178 +83529,307 @@ __293: goto __291 __294: ; - if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { - pPk1 = uintptr(0) - } else { - pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + if !(isQuick != 0 || (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __295 } + pPk1 = uintptr(0) + r2 = 0 + goto __296 +__295: + pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) + r2 = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 1, r2, r2+int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)-1) +__296: + ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+572, bp+576) + 1, uintptr(0), bp+612, bp+616) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__295: +__297: if !(pIdx5 != 0) { - goto __297 + goto __299 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) - goto __296 -__296: + goto __298 +__298: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __295 goto __297 -__297: + goto __299 +__299: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 572)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 612)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) + + mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 +__300: + if !(mxCol >= 0 && + (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || + int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { + goto __301 + } + mxCol-- + goto __300 +__301: + ; + if !(mxCol >= 0) { + goto __302 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), mxCol, 3) + Xsqlite3VdbeTypeofColumn(tls, v, 3) +__302: + ; if !!(isQuick != 0) { - goto __298 + goto __303 } + if !(pPk1 != 0) { + goto __304 + } + a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 612)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) - -__298: + Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) + zErr = Xsqlite3MPrintf(tls, db, + ts+17734, + libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeJumpHere(tls, v, a1) + Xsqlite3VdbeJumpHere(tls, v, a1+1) + j4 = 0 +__305: + if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { + goto __307 + } + Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 612)), j4, r2+j4) + goto __306 +__306: + j4++ + goto __305 + goto __307 +__307: + ; +__304: + ; +__303: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__299: +__308: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __301 + goto __310 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 + if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __302 + goto __311 } - goto __300 -__302: + goto __309 +__311: ; - if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) == 0 && !(bStrict != 0)) { - goto __303 + if !(bStrict != 0) { + goto __312 } - goto __300 -__303: + doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) > COLTYPE_ANY) + goto __313 +__312: + doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) +__313: ; - if bStrict != 0 { - doError = Xsqlite3VdbeMakeLabel(tls, pParse) - } else { - doError = 0 + if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) == 0 && !(doTypeCheck != 0)) { + goto __314 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 572)), j4, 3) - if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { - goto __304 + goto __309 +__314: + ; + p4 = SQLITE_NULL + if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { + goto __315 } - Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) -__304: + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) + p11 = -1 + p3 = 3 + goto __316 +__315: + if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { + goto __317 + } + *(*uintptr)(unsafe.Pointer(bp + 624)) = uintptr(0) + Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, + (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+624) + if !(*(*uintptr)(unsafe.Pointer(bp + 624)) != 0) { + goto __318 + } + p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 624))) +__318: + ; +__317: + ; + p11 = *(*int32)(unsafe.Pointer(bp + 612)) + if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __319 + } + + p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) + goto __320 +__319: + p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) + +__320: + ; +__316: ; + labelError = Xsqlite3VdbeMakeLabel(tls, pParse) + labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)) != 0) { - goto __305 + goto __321 } - jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17687, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + + jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) != COLTYPE_ANY) { - goto __306 + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + if !(doTypeCheck != 0) { + goto __322 } - Xsqlite3VdbeGoto(tls, v, doError) - goto __307 -__306: - integrityCheckResultRow(tls, v) -__307: - ; + Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) -__305: + goto __323 +__322: ; - if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && - int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) != COLTYPE_ANY) { - goto __308 +__323: + ; +__321: + ; + if !(bStrict != 0 && doTypeCheck != 0) { + goto __324 } - jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, - int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28])) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + + Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17707, - libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28], + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, + libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) - Xsqlite3VdbeResolveLabel(tls, v, doError) - integrityCheckResultRow(tls, v) - Xsqlite3VdbeJumpHere(tls, v, jmp2) -__308: + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __325 +__324: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { + goto __326 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17812, + libc.VaList(bp+416, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + goto __327 +__326: + if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { + goto __328 + } + + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) + + if !(p11 >= 0) { + goto __329 + } + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 612)), j4, 3) +__329: ; - goto __300 -__300: + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17835, -1) + Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) + Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) + + zErr1 = Xsqlite3MPrintf(tls, db, ts+17837, + libc.VaList(bp+432, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) +__328: + ; +__327: + ; +__325: + ; + Xsqlite3VdbeResolveLabel(tls, v, labelError) + integrityCheckResultRow(tls, v) + Xsqlite3VdbeResolveLabel(tls, v, labelOk) + goto __309 +__309: j4++ - goto __299 - goto __301 -__301: + goto __308 + goto __310 +__310: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __309 + goto __330 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __310 + goto __331 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 572)) + 1 + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 612)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__311: +__332: if !(k3 > 0) { - goto __313 + goto __334 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __312 -__312: + goto __333 +__333: k3-- - goto __311 - goto __313 -__313: + goto __332 + goto __334 +__334: ; Xsqlite3ExprIfTrue(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8)).FpExpr, addrCkOk, SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17729, - libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) + zErr2 = Xsqlite3MPrintf(tls, db, ts+17857, + libc.VaList(bp+448, (*Table)(unsafe.Pointer(pTab9)).FzName)) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr2, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) -__310: +__331: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__309: +__330: ; if !!(isQuick != 0) { - goto __314 + goto __335 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__315: +__336: if !(pIdx5 != 0) { - goto __317 + goto __338 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __318 + goto __339 } - goto __316 -__318: + goto __337 +__339: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 572)), 0, 0, bp+580, + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 612)), 0, 0, bp+632, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 576))+j4, ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 616))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17759) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17764) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17892) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -83169,87 +83837,93 @@ __318: Xsqlite3VdbeJumpHere(tls, v, jmp21) if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __319 + goto __340 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__320: +__341: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __322 + goto __343 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FaiColumn + uintptr(kk)*2))) if !(iCol1 >= 0 && uint32(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(iCol1)*24 + 8))&0xf0>>4)) != 0) { - goto __323 + goto __344 } - goto __321 -__323: + goto __342 +__344: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __321 -__321: + goto __342 +__342: kk++ - goto __320 - goto __322 -__322: + goto __341 + goto __343 +__343: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 576))+j4) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 616))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 576))+j4, uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 616))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17785) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17913) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__319: +__340: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __316 -__316: + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 632))) + goto __337 +__337: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __315 - goto __317 -__317: + goto __336 + goto __338 +__338: ; -__314: +__335: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 612)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __324 + goto __345 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17812) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17940) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__325: +__346: if !(pIdx5 != 0) { - goto __327 + goto __348 } if !(pPk1 == pIdx5) { - goto __328 + goto __349 } - goto __326 -__328: + goto __347 +__349: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 576))+j4, 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 616))+j4, 3) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, 8+j4, 0, 3) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 2, 3) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, addr1) - goto __326 -__326: + goto __347 +__347: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __325 - goto __327 -__327: + goto __346 + goto __348 +__348: ; -__324: + if !(pPk1 != 0) { + goto __350 + } + Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) +__350: + ; +__345: ; goto __291 __291: @@ -83267,14 +83941,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __329 + goto __351 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 568)) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 608)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17841 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17969 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__329: +__351: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83282,27 +83956,27 @@ __329: __45: if !!(zRight != 0) { - goto __330 + goto __352 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __332 + goto __354 } goto pragma_out -__332: +__354: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __331 -__330: + goto __353 +__352: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __333 + goto __355 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__334: +__356: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __336 + goto __358 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __337 + goto __359 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83316,25 +83990,25 @@ __334: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __336 -__337: + goto __358 +__359: ; - goto __335 -__335: + goto __357 +__357: pEnc += 16 - goto __334 - goto __336 -__336: + goto __356 + goto __358 +__358: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __338 + goto __360 } - Xsqlite3ErrorMsg(tls, pParse, ts+17844, libc.VaList(bp+416, zRight)) -__338: + Xsqlite3ErrorMsg(tls, pParse, ts+17972, libc.VaList(bp+456, zRight)) +__360: ; -__333: +__355: ; -__331: +__353: ; goto __15 @@ -83342,50 +84016,57 @@ __46: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { - goto __339 + goto __361 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __341 + goto __363 } goto __15 -__341: +__363: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp2 = iCookie (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp5 = U16(1) - goto __340 -__339: + if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { + goto __364 + } + + (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) +__364: + ; + goto __362 +__361: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __342 + goto __365 } goto __15 -__342: +__365: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*24)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) -__340: +__362: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__343: +__366: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __344 + goto __367 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __343 -__344: + goto __366 +__367: ; Xsqlite3VdbeReusable(tls, v) @@ -83400,31 +84081,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __345 + goto __368 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17282) == 0) { - goto __346 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __369 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __347 -__346: - if !(Xsqlite3StrICmp(tls, zRight, ts+17869) == 0) { - goto __348 + goto __370 +__369: + if !(Xsqlite3StrICmp(tls, zRight, ts+17997) == 0) { + goto __371 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __349 -__348: - if !(Xsqlite3StrICmp(tls, zRight, ts+17435) == 0) { - goto __350 + goto __372 +__371: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__350: +__373: ; -__349: +__372: ; -__347: +__370: ; -__345: +__368: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83434,10 +84115,10 @@ __345: __49: if !(zRight != 0) { - goto __351 + goto __374 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__351: +__374: ; returnSingleInt(tls, v, func() int64 { @@ -83457,19 +84138,19 @@ __50: __51: if !(zRight != 0) { - goto __352 + goto __375 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __354 + goto __377 } goto __15 -__354: +__377: ; - goto __353 -__352: + goto __376 +__375: opMask = U32(0xfffe) -__353: +__376: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83478,86 +84159,86 @@ __353: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__355: +__378: if !(iDb <= iDbLast) { - goto __357 + goto __380 } if !(iDb == 1) { - goto __358 + goto __381 } - goto __356 -__358: + goto __379 +__381: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__359: +__382: if !(k4 != 0) { - goto __361 + goto __384 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __362 + goto __385 } - goto __360 -__362: + goto __383 +__385: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__363: +__386: if !(pIdx6 != 0) { - goto __365 + goto __388 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x100>>8) != 0) { - goto __366 + goto __389 } szThreshold = int16(0) - goto __365 -__366: + goto __388 +__389: ; - goto __364 -__364: + goto __387 +__387: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __363 - goto __365 -__365: + goto __386 + goto __388 +__388: ; if !(szThreshold != 0) { - goto __367 + goto __390 } Xsqlite3OpenTable(tls, pParse, iTabCur, iDb, pTab10, OP_OpenRead) Xsqlite3VdbeAddOp3(tls, v, OP_IfSmaller, iTabCur, int32(U32(Xsqlite3VdbeCurrentAddr(tls, v)+2)+opMask&U32(1)), int32(szThreshold)) -__367: +__390: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17877, - libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) + zSubSql = Xsqlite3MPrintf(tls, db, ts+18005, + libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __368 + goto __391 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __369 -__368: + goto __392 +__391: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__369: +__392: ; - goto __360 -__360: + goto __383 +__383: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __359 - goto __361 -__361: + goto __382 + goto __384 +__384: ; - goto __356 -__356: + goto __379 +__379: iDb++ - goto __355 - goto __357 -__357: + goto __378 + goto __380 +__380: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83565,60 +84246,60 @@ __357: __52: ; if !(zRight != 0) { - goto __370 + goto __393 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__370: +__393: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __371 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { + goto __394 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__371: + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) +__394: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: - if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __372 + if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK) { + goto __395 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)))) { - goto __373 + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)))) { + goto __396 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__373: + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 648))) +__396: ; -__372: +__395: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 __55: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __374 + Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { + goto __397 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__374: + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656))&int64(0x7fffffff))) +__397: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 __56: if !(zRight != 0 && - Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && - *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __375 + Xsqlite3DecOrHexToI64(tls, zRight, bp+664) == SQLITE_OK && + *(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) >= int64(0)) { + goto __398 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__375: + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 664)) & int64(0x7fffffff)) +__398: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83626,10 +84307,10 @@ __375: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __376 + goto __399 } -__376: +__399: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83662,6 +84343,14 @@ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, } +var aStdTypeMask = [6]uint8{ + uint8(0x1f), + uint8(0x18), + uint8(0x11), + uint8(0x11), + uint8(0x13), + uint8(0x14), +} var iLn5 int32 = 0 var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, @@ -83673,14 +84362,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 17895, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17900, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17906, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17915, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17924, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17932, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17940}, - {FzName: ts + 17947}, + {FzName: ts + 18023, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18028, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18034, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18043, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18052, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18060, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18068}, + {FzName: ts + 18075}, {}, } var setCookie = [2]VdbeOpList{ @@ -83732,7 +84421,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]uint8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+17953) + Xsqlite3_str_appendall(tls, bp+32, ts+18081) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83740,7 +84429,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+17968, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83753,19 +84442,19 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+17975, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18103, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17981) + Xsqlite3_str_appendall(tls, bp+32, ts+18109) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+17993) + Xsqlite3_str_appendall(tls, bp+32, ts+18121) j++ } - Xsqlite3_str_append(tls, bp+32, ts+4943, 1) + Xsqlite3_str_append(tls, bp+32, ts+4957, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) @@ -83781,7 +84470,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -83929,7 +84618,7 @@ __1: var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } @@ -83945,13 +84634,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+18008) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18016, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18144, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18020, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18148, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83960,7 +84649,7 @@ __3: rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+8, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -84028,33 +84717,33 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+18024, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18152, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134576) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*8)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*8)) } else { - zObj = ts + 4994 + zObj = ts + 5008 } - z = Xsqlite3MPrintf(tls, db, ts+18052, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18180, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18083, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18211, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 134583) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) } } var azAlterType = [3]uintptr{ - ts + 18091, - ts + 18098, - ts + 18110, + ts + 18219, + ts + 18226, + ts + 18238, } // Check to see if any sibling index (another index on the same table) @@ -84114,7 +84803,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14116) + corruptSchema(tls, pData, argv, ts+14130) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 7, 0x80) @@ -84146,13 +84835,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18121) + corruptSchema(tls, pData, argv, ts+18249) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14116) + corruptSchema(tls, pData, argv, ts+14130) } } } @@ -84185,16 +84874,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8800 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8814 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7864 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18134 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7878 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18262 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -84279,7 +84968,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11699) + ts+11713) rc = SQLITE_ERROR goto initone_error_out __13: @@ -84314,7 +85003,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18206) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18334) rc = SQLITE_ERROR goto initone_error_out __17: @@ -84328,7 +85017,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18230, + ts+18358, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84511,16 +85200,20 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + if (*Parse)(unsafe.Pointer(pParse)).FaTableLock != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) + } for (*Parse)(unsafe.Pointer(pParse)).FpCleanup != 0 { var pCleanup uintptr = (*Parse)(unsafe.Pointer(pParse)).FpCleanup (*Parse)(unsafe.Pointer(pParse)).FpCleanup = (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup})).f(tls, db, (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr) - Xsqlite3DbFreeNN(tls, db, pCleanup) + Xsqlite3DbNNFreeNN(tls, db, pCleanup) + } + if (*Parse)(unsafe.Pointer(pParse)).FaLabel != 0 { + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) } - Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } @@ -84588,20 +85281,20 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { - libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) - libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(pParse)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse (*Parse)(unsafe.Pointer(pParse)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) } } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var rc int32 var i int32 @@ -84613,8 +85306,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) - libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) (*Parse)(unsafe.Pointer(bp + 16)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 (*Parse)(unsafe.Pointer(bp + 16)).Fdb = db @@ -84623,7 +85316,7 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, bp+16, ts+1470, 0) + Xsqlite3ErrorMsg(tls, bp+16, ts+1490, 0) __1: ; if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { @@ -84634,7 +85327,7 @@ __1: (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; - (*Parse)(unsafe.Pointer(bp + 16)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) + (*Parse)(unsafe.Pointer(bp + 16)).FprepFlags = U8(prepFlags & U32(0xff)) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 @@ -84654,7 +85347,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18264, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18392, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84670,100 +85363,104 @@ __6: ; __3: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FpDisconnect != 0) { + goto __9 + } Xsqlite3VtabUnlockList(tls, db) - +__9: + ; if !(nBytes >= 0 && (nBytes == 0 || int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { - goto __9 + goto __10 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { - goto __11 + goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18294, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18422, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare -__11: +__12: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { - goto __12 + goto __13 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) - goto __13 -__12: - (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) + goto __14 __13: + (*Parse)(unsafe.Pointer(bp + 16)).FzTail = zSql + uintptr(nBytes) +__14: ; - goto __10 -__9: - Xsqlite3RunParser(tls, bp+16, zSql) + goto __11 __10: + Xsqlite3RunParser(tls, bp+16, zSql) +__11: ; if !(pzTail != 0) { - goto __14 + goto __15 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16)).FzTail -__14: +__15: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __15 + goto __16 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) -__15: +__16: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __16 + goto __17 } (*Parse)(unsafe.Pointer(bp + 16)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16)).FcheckSchema = U8(0) -__16: +__17: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { - goto __17 + goto __18 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { - goto __19 + goto __20 } schemaIsValid(tls, bp+16) -__19: +__20: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { - goto __20 + goto __21 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16)).FpVdbe) -__20: +__21: ; rc = (*Parse)(unsafe.Pointer(bp + 16)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { - goto __21 + goto __22 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3649, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3663, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16)).FzErrMsg) - goto __22 -__21: - Xsqlite3Error(tls, db, rc) + goto __23 __22: + Xsqlite3Error(tls, db, rc) +__23: ; - goto __18 -__17: + goto __19 +__18: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) -__18: +__19: ; -__23: +__24: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { - goto __24 + goto __25 } pT = (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) - goto __23 -__24: + goto __24 +__25: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) @@ -84776,7 +85473,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135368) + return Xsqlite3MisuseError(tls, 137115) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84875,7 +85572,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 135516) + return Xsqlite3MisuseError(tls, 137263) } if nBytes >= 0 { var sz int32 @@ -85023,7 +85720,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } p = pPrior bFree = 1 @@ -85198,8 +85895,8 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 || jointype&(JT_OUTER|JT_LEFT|JT_RIGHT) == JT_OUTER { - var zSp1 uintptr = ts + 10844 - var zSp2 uintptr = ts + 10844 + var zSp1 uintptr = ts + 10858 + var zSp2 uintptr = ts + 10858 if pB == uintptr(0) { zSp1++ } @@ -85207,13 +85904,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18313, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18441, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18343)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18471)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85388,7 +86085,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x20>>5)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18377, libc.VaList(bp, 0)) + ts+18505, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85433,7 +86130,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x8>>3)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18427, libc.VaList(bp+8, zName)) + ts+18555, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85444,7 +86141,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x8>>3)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x20>>5) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18491, + Xsqlite3ErrorMsg(tls, pParse, ts+18619, libc.VaList(bp+16, zName)) break } @@ -85488,7 +86185,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6512, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6526, Fn: uint32(8)} // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. @@ -85835,6 +86532,9 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) + if (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst != 0 { + Xsqlite3VdbeChangeP4(tls, v, -1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) + } if eDest == SRT_DistFifo { var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) @@ -86010,7 +86710,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { - Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) + Xsqlite3DbNNFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } @@ -86072,16 +86772,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18528 + z = ts + 18656 break case TK_INTERSECT: - z = ts + 18538 + z = ts + 18666 break case TK_EXCEPT: - z = ts + 18548 + z = ts + 18676 break default: - z = ts + 18555 + z = ts + 18683 break } return z @@ -86091,7 +86791,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18689, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { @@ -86297,8 +86997,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1099 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16204 + zType = ts + 1119 + *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16251 } else { *(*uintptr)(unsafe.Pointer(bp + 72)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) @@ -86437,13 +87137,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16204 + zCol = ts + 16251 } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomClear}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -86451,7 +87151,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86541,7 +87241,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16204 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86551,7 +87251,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18584, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18712, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -86567,7 +87267,7 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18593, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18721, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -86854,7 +87554,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18601, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18729, 0) return __1: ; @@ -86945,7 +87645,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18650, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18778, 0) goto end_of_recursive_query __15: ; @@ -86965,7 +87665,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18820, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -87002,7 +87702,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18698, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18826, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -87036,11 +87736,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18713, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18841, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1534 + return ts + 1554 } - return ts + 18736 + return ts + 18864 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -87141,8 +87841,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18738, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18753, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18866, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18881, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87189,7 +87889,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18528, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18656, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87256,7 +87956,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -87318,7 +88018,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18772, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18900, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -87471,10 +88171,10 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18793, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18921, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18839, + ts+18967, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87728,8 +88428,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*Select)(unsafe.Pointer(pPrior)).FpNext = uintptr(0) (*Select)(unsafe.Pointer(pPrior)).FpOrderBy = Xsqlite3ExprListDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pOrderBy, 0) - Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7160) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7160) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7174) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7174) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87756,13 +88456,13 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18921, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19049, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) addrSelectA = Xsqlite3VdbeCurrentAddr(tls, v) + 1 addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18932, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19060, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87774,7 +88474,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18937, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19065, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87875,7 +88575,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87901,6 +88601,7 @@ type SubstContext1 = struct { FisOuterJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr + FpCList uintptr } // An instance of the SubstContext object describes an substitution edit @@ -87917,7 +88618,7 @@ type SubstContext1 = struct { // the left operands of a RIGHT JOIN. In either case, we need to potentially // bypass the substituted expression with OP_IfNullRow. // -// Suppose the original expression integer constant. Even though the table +// Suppose the original expression is an integer constant. Even though the table // has the nullRow flag set, because the expression is an integer constant, // it will not be NULLed out. So instead, we insert an OP_IfNullRow opcode // that checks to see if the nullRow flag is set on the table. If the nullRow @@ -87954,7 +88655,8 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { { var pNew uintptr - var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr + var iColumn int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) + var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr(iColumn)*32)).FpExpr if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) @@ -87965,6 +88667,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable + (*Expr)(unsafe.Pointer(bp)).FiColumn = int16(-99) (*Expr)(unsafe.Pointer(bp)).Fflags = U32(EP_IfNullRow) pCopy = bp } @@ -87989,15 +88692,20 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IntValue) } - if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { - var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) - pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, - func() uintptr { - if pColl != 0 { - return (*CollSeq)(unsafe.Pointer(pColl)).FzName - } - return ts + 1079 - }()) + { + var pNat uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) + var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, + (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpCList+8+uintptr(iColumn)*32)).FpExpr) + if pNat != pColl || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { + pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, + func() uintptr { + if pColl != 0 { + return (*CollSeq)(unsafe.Pointer(pColl)).FzName + } + return ts + 1099 + }()) + } + } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } @@ -88174,9 +88882,16 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC Xsqlite3WalkSelect(tls, bp, p) } +func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { + for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { + pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior + } + return (*Select)(unsafe.Pointer(pSel)).FpEList +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(88) + defer tls.Free(88) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr @@ -88245,7 +88960,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(JT_OUTER|JT_LTORJ) != 0 { if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc > 1 || - isAgg != 0 || int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSubSrc+8)).FpTab)).FeTabType) == TABTYP_VTAB || (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) || int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_RIGHT != 0 { @@ -88261,17 +88975,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc >= 2 && - int32((*SrcItem)(unsafe.Pointer(pSubSrc+8+uintptr((*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc-1)*104)).Ffg.Fjointype)&JT_OUTER != 0 { - if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_NATURAL != 0 || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x20>>5)) != 0 || - *(*uintptr)(unsafe.Pointer(pSubitem + 72)) != uintptr(0) || - uint32(int32(*(*uint16)(unsafe.Pointer(pSubitem + 60 + 4))&0x10>>4)) != 0 { - return 0 - } - } - if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { + var ii int32 if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } @@ -88292,7 +88997,6 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg } if (*Select)(unsafe.Pointer(p)).FpOrderBy != 0 { - var ii int32 for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr; ii++ { if int32(*(*U16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy + 8 + uintptr(ii)*32 + 24))) == 0 { return 0 @@ -88304,6 +89008,17 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } + for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { + var aff uint8 + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { + if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { + return 0 + } + } + } + if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { if (*Parse)(unsafe.Pointer(pParse)).FnSelect > 500 { return 0 @@ -88459,6 +89174,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = isOuterJoin (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSub) substSelect(tls, bp, pParent, 0) } @@ -88482,8 +89198,8 @@ __2: goto __3 __3: ; - Xsqlite3AggInfoPersistWalkerInit(tls, bp+32, pParse) - Xsqlite3WalkSelect(tls, bp+32, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+40, pParse) + Xsqlite3WalkSelect(tls, bp+40, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -88659,8 +89375,8 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin } func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, pSrc uintptr) int32 { - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(40) + defer tls.Free(40) var pNew uintptr var nChng int32 = 0 @@ -88677,6 +89393,11 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var op U8 = (*Select)(unsafe.Pointer(pSel)).Fop + + if int32(op) != TK_ALL && int32(op) != TK_SELECT { + return 0 + } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } @@ -88706,6 +89427,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp)).FiNewTable = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor (*SubstContext)(unsafe.Pointer(bp)).FisOuterJoin = 0 (*SubstContext)(unsafe.Pointer(bp)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList + (*SubstContext)(unsafe.Pointer(bp)).FpCList = findLeftmostExprlist(tls, pSubq) pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -88739,12 +89461,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15107) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15154) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15111) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15158) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88810,7 +89532,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18943, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19071, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88893,7 +89615,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2000>>13)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18961, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19089, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -89022,7 +89744,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4000>>14)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18984, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19112, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 7, 0x80) @@ -89048,7 +89770,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 9, 0x200) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19004, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19132, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -89064,7 +89786,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19047 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19175 pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -89090,7 +89812,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+19070, + Xsqlite3ErrorMsg(tls, pParse, ts+19198, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -89101,9 +89823,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19108 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19236 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19142 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19270 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89130,9 +89852,9 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { } } -// The SrcList_item structure passed as the second argument represents a +// The SrcItem structure passed as the second argument represents a // sub-query in the FROM clause of a SELECT statement. This function -// allocates and populates the SrcList_item.pTab object. If successful, +// allocates and populates the SrcItem.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { @@ -89150,7 +89872,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19180, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19308, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89262,7 +89984,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19184, + Xsqlite3ErrorMsg(tls, pParse, ts+19312, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89281,7 +90003,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19223, + Xsqlite3ErrorMsg(tls, pParse, ts+19351, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -89289,7 +90011,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x100>>8)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19254, + Xsqlite3ErrorMsg(tls, pParse, ts+14723, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89390,7 +90112,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6372 + zSchemaName = ts + 6386 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89405,7 +90127,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*32 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19287, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19382, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 14, 0xc000) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } @@ -89470,7 +90192,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*32)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19292, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19387, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89482,7 +90204,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11985, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11999, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 14, 0xc000) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89501,9 +90223,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19301, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19396, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19319, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19414, 0) } } } @@ -89513,7 +90235,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19434, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89663,13 +90385,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19370, 0) + ts+19465, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19421, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89850,19 +90572,19 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19454, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19549, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19466 + return ts + 19561 } - return ts + 1534 + return ts + 1554 }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1534 + return ts + 1554 }())) } } @@ -89875,7 +90597,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON|EP_IsFalse) == U32(EP_IsFalse)) == 0 && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { var db uintptr = (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(pWalker)).FpParse)).Fdb - var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7864) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -90033,7 +90755,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pItem2 uintptr var pExpr uintptr var pExpr1 uintptr - var r1 int32 var pCol uintptr var regBase int32 @@ -90132,7 +90853,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19489, + ts+19584, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90193,7 +90914,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19543, + Xsqlite3ErrorMsg(tls, pParse, ts+19638, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __15: @@ -90297,7 +91018,7 @@ __27: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __30 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1534, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1554, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __30: ; pSub1 = (*SrcItem)(unsafe.Pointer(pItem1)).FpSelect @@ -90307,7 +91028,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 300)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x80>>7) == 0 || @@ -90339,7 +91060,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+96, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19583, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19678, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 10, 0x400) @@ -90397,8 +91118,11 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19598, libc.VaList(bp+40, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19693, libc.VaList(bp+40, pItem1)) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) Xsqlite3Select(tls, pParse, pSub1, bp+96) + Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+96)).FzAffSdst) + (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90432,7 +91156,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 300)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90525,16 +91249,21 @@ __50: (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) __59: ; + if !((*Select)(unsafe.Pointer(p)).FpLimit != 0) { + goto __60 + } computeLimitRegisters(tls, pParse, p, iEnd) +__60: + ; if !((*Select)(unsafe.Pointer(p)).FiLimit == 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0) { - goto __60 + goto __61 } Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex, uint8(OP_SorterOpen)) *(*U8)(unsafe.Pointer(bp + 48 + 36)) |= U8(SORTFLAG_UseSorter) -__60: +__61: ; if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != 0) { - goto __61 + goto __62 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, @@ -90543,13 +91272,13 @@ __60: -8) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) - goto __62 -__61: - (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + goto __63 __62: + (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(WHERE_DISTINCT_NOOP) +__63: ; if !(!(isAgg != 0) && pGroupBy == uintptr(0)) { - goto __63 + goto __64 } wctrlFlags = U16(func() uint32 { @@ -90561,52 +91290,52 @@ __62: (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_FixedLimit)) pWin = (*Select)(unsafe.Pointer(p)).FpWin if !(pWin != 0) { - goto __65 + goto __66 } Xsqlite3WindowCodeInit(tls, pParse, p) -__65: +__66: ; pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, p, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { - goto __66 + goto __67 } goto select_end -__66: +__67: ; if !(int32(Xsqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) { - goto __67 + goto __68 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) -__67: +__68: ; if !((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && Xsqlite3WhereIsDistinct(tls, pWInfo) != 0) { - goto __68 + goto __69 } (*DistinctCtx)(unsafe.Pointer(bp + 136)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) -__68: +__69: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __69 + goto __70 } (*SortCtx)(unsafe.Pointer(bp + 48)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) (*SortCtx)(unsafe.Pointer(bp + 48)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) if !((*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __70 + goto __71 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) -__70: +__71: ; -__69: +__70: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex >= 0 && (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy == uintptr(0)) { - goto __71 + goto __72 } Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__71: +__72: ; if !(pWin != 0) { - goto __72 + goto __73 } addrGosub = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -90624,111 +91353,111 @@ __71: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) Xsqlite3VdbeResolveLabel(tls, v, iBreak) - goto __73 -__72: + goto __74 +__73: selectInnerLoop(tls, pParse, p, -1, bp+48, bp+136, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) Xsqlite3WhereEnd(tls, pWInfo) -__73: +__74: ; - goto __64 -__63: + goto __65 +__64: sortPTab = 0 sortOut = 0 orderByGrp = 0 if !(pGroupBy != 0) { - goto __74 + goto __75 } k = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pItem2 = (*Select)(unsafe.Pointer(p)).FpEList + 8 -__76: +__77: if !(k > 0) { - goto __78 + goto __79 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __77 -__77: - k-- - pItem2 += 32 - goto __76 goto __78 __78: + k-- + pItem2 += 32 + goto __77 + goto __79 +__79: ; k = (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr pItem2 = pGroupBy + 8 -__79: +__80: if !(k > 0) { - goto __81 + goto __82 } *(*U16)(unsafe.Pointer(pItem2 + 24 + 2)) = U16(0) - goto __80 -__80: - k-- - pItem2 += 32 - goto __79 goto __81 __81: + k-- + pItem2 += 32 + goto __80 + goto __82 +__82: ; if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > 66) { - goto __82 + goto __83 } (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(66) -__82: +__83: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0 && (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy)).FnExpr) { - goto __83 + goto __84 } ii1 = 0 -__84: +__85: if !(ii1 < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __86 + goto __87 } sortFlags = U8(int32((*ExprList_item)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy+8+uintptr(ii1)*32)).Ffg.FsortFlags) & KEYINFO_ORDER_DESC) (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32)).Ffg.FsortFlags = sortFlags - goto __85 -__85: - ii1++ - goto __84 goto __86 __86: + ii1++ + goto __85 + goto __87 +__87: ; if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy, -1) == 0) { - goto __87 + goto __88 } orderByGrp = 1 -__87: +__88: ; -__83: +__84: ; - goto __75 -__74: + goto __76 +__75: ; (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(0) -__75: +__76: ; addrEnd = Xsqlite3VdbeMakeLabel(tls, pParse) pAggInfo = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(AggInfo{}))) if !(pAggInfo != 0) { - goto __88 + goto __89 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{agginfoFree})), pAggInfo) -__88: +__89: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __89 + goto __90 } goto select_end -__89: +__90: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId libc.Xmemset(tls, bp+152, 0, uint64(unsafe.Sizeof(NameContext{}))) @@ -90747,33 +91476,33 @@ __89: Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) Xsqlite3ExprAnalyzeAggList(tls, bp+152, (*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy) if !(pHaving != 0) { - goto __90 + goto __91 } if !(pGroupBy != 0) { - goto __91 + goto __92 } havingToWhere(tls, pParse, p) pWhere = (*Select)(unsafe.Pointer(p)).FpWhere -__91: +__92: ; Xsqlite3ExprAnalyzeAggregates(tls, bp+152, pHaving) -__90: +__91: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator = (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn if !((*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(0) && (*Select)(unsafe.Pointer(p)).FpHaving == uintptr(0) && (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1) { - goto __92 + goto __93 } minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208) - goto __93 -__92: - minMaxFlag = U8(WHERE_ORDERBY_NORMAL) + goto __94 __93: + minMaxFlag = U8(WHERE_ORDERBY_NORMAL) +__94: ; i = 0 -__94: +__95: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __96 + goto __97 } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr @@ -90781,28 +91510,28 @@ __94: Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __97 + goto __98 } Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__97: +__98: ; *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __95 -__95: - i++ - goto __94 goto __96 __96: + i++ + goto __95 + goto __97 +__97: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __98 + goto __99 } goto select_end -__98: +__99: ; if !(pGroupBy != 0) { - goto __99 + goto __100 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90813,7 +91542,7 @@ __98: (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr != uintptr(0) && (*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr)).Fflags&U32(EP_xIsSelect) == U32(0) && *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) != uintptr(0)) { - goto __101 + goto __102 } pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) + 8)).FpExpr pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) @@ -90824,7 +91553,7 @@ __98: } else { distFlag = uint16(0) } -__101: +__102: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, @@ -90850,7 +91579,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, - uintptr(0), uint16(func() int32 { + p, uint16(func() int32 { if int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct) == 2 { return WHERE_DISTINCTBY } @@ -90863,27 +91592,27 @@ __101: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __102 + goto __103 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__102: +__103: ; eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __103 + goto __104 } groupBySort = 0 - goto __104 -__103: + goto __105 +__104: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+136)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19614 + return ts + 19709 } - return ts + 19623 + return ts + 19718 }()) groupBySort = 1 @@ -90891,49 +91620,49 @@ __103: nCol = nGroupBy j = nGroupBy i = 0 -__105: +__106: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __107 + goto __108 } if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __108 + goto __109 } nCol++ j++ -__108: +__109: ; - goto __106 -__106: - i++ - goto __105 goto __107 __107: + i++ + goto __106 + goto __108 +__108: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__109: +__110: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __111 + goto __112 } pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __112 + goto __113 } - r1 = j + regBase - Xsqlite3ExprCodeGetColumnOfTable(tls, v, - (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab, (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable, int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn), r1) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__112: +__113: ; - goto __110 -__110: - i++ - goto __109 goto __111 __111: + i++ + goto __110 + goto __112 +__112: ; + (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, regRecord) @@ -90947,45 +91676,45 @@ __111: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__104: +__105: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __113 + goto __114 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__113: +__114: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __114 + goto __115 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__114: +__115: ; j = 0 -__115: +__116: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __117 + goto __118 } if !(groupBySort != 0) { - goto __118 + goto __119 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __119 -__118: + goto __120 +__119: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__119: +__120: ; - goto __116 -__116: - j++ - goto __115 goto __117 __117: + j++ + goto __116 + goto __118 +__118: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -91004,16 +91733,16 @@ __117: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __120 + goto __121 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __121 -__120: + goto __122 +__121: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__121: +__122: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -91044,16 +91773,16 @@ __121: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __122 + goto __123 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__122: +__123: ; - goto __100 -__99: + goto __101 +__100: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __123 + goto __124 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -91066,98 +91795,98 @@ __99: Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab1)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab1)).FzName) if !!((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __125 + goto __126 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__125: +__126: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x8000>>15) != 0) { - goto __126 + goto __127 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__127: +__128: if !(pIdx != 0) { - goto __129 + goto __130 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x2000>>13) == 0 && int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab1)).FszTabRow) && (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) && (!(pBest != 0) || int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Index)(unsafe.Pointer(pBest)).FszIdxRow))) { - goto __130 + goto __131 } pBest = pIdx -__130: +__131: ; - goto __128 -__128: - pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext - goto __127 goto __129 __129: + pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __128 + goto __130 +__130: ; -__126: +__127: ; if !(pBest != 0) { - goto __131 + goto __132 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__131: +__132: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __132 + goto __133 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__132: +__133: ; Xsqlite3VdbeAddOp2(tls, v, OP_Count, iCsr, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiMem) Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCsr) explainSimpleCount(tls, pParse, pTab1, pBest) - goto __124 -__123: + goto __125 +__124: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __133 + goto __134 } i = 0 -__135: +__136: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __137 - } - if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __138 } - goto __136 -__138: - ; - if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __139 } goto __137 __139: ; - goto __136 -__136: - i++ - goto __135 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __140 + } + goto __138 +__140: + ; goto __137 __137: + i++ + goto __136 + goto __138 +__138: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __140 + goto __141 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__140: +__141: ; - goto __134 -__133: + goto __135 +__134: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __141 + goto __142 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -91166,79 +91895,79 @@ __133: } else { distFlag1 = uint16(0) } -__141: +__142: ; -__134: +__135: ; resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), - pDistinct1, uintptr(0), uint16(int32(minMaxFlag)|int32(distFlag1)), 0) + pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __142 + goto __143 } goto select_end -__142: +__143: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __143 + goto __144 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __144 + goto __145 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__144: +__145: ; -__143: +__144: ; if !(regAcc != 0) { - goto __145 + goto __146 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__145: +__146: ; if !(minMaxFlag != 0) { - goto __146 + goto __147 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__146: +__147: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__124: +__125: ; (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) -__100: +__101: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) -__64: +__65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __147 + goto __148 } - explainTempTable(tls, pParse, ts+19614) -__147: + explainTempTable(tls, pParse, ts+19709) +__148: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __148 + goto __149 } explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19632 + return ts + 19727 } - return ts + 19655 + return ts + 19750 }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__148: +__149: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91313,7 +92042,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if !(z == uintptr(0)) { goto __10 } @@ -91335,7 +92064,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19664, 0) + ts+19759, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91431,7 +92160,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp if (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { if pzErrMsg != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg))) - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3649, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3663, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg) } @@ -91523,7 +92252,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { if (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema == (*Table)(unsafe.Pointer(pTab)).FpSchema && (*Trigger)(unsafe.Pointer(pTrig)).Ftable != 0 && 0 == Xsqlite3StrICmp(tls, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, (*Table)(unsafe.Pointer(pTab)).FzName) && - (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema != pTmpSchema { + ((*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema != pTmpSchema || (*Trigger)(unsafe.Pointer(pTrig)).FbReturning != 0) { (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList pList = pTrig } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING { @@ -91568,7 +92297,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19729, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19824, 0) goto trigger_cleanup __3: ; @@ -91612,7 +92341,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19775, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19870, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -91630,7 +92359,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19783, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_orphan_error __11: ; @@ -91642,7 +92371,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19775, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19870, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91657,7 +92386,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19824, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19919, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91669,22 +92398,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8058, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8072, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19850, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19945, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19888, + Xsqlite3ErrorMsg(tls, pParse, ts+19983, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19925 + return ts + 20020 } - return ts + 19932 + return ts + 20027 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91693,7 +92422,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19938, libc.VaList(bp+24, pTableName+8)) + ts+20033, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91722,9 +92451,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91842,7 +92571,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19775, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19870, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+72, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91875,7 +92604,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+19984, + ts+20079, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91900,13 +92629,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20032, + ts+20127, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20107, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20202, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92162,7 +92891,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20136, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20231, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92201,9 +92930,9 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12072 + return ts + 12086 } - return ts + 5879 + return ts + 5893 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92215,7 +92944,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20156, + ts+20251, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -92329,12 +93058,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20218, + ts+20313, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20266 + return ts + 20361 } - return ts + 20273 + return ts + 20368 }())) __15: ; @@ -92448,7 +93177,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20280, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20375, 0) return 1 } @@ -92499,7 +93228,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab var pNew uintptr var pReturning uintptr - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 192)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 200)) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) libc.Xmemset(tls, bp+128, 0, uint64(unsafe.Sizeof(SrcList{}))) @@ -92568,7 +93297,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+6066, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6080, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -6) } @@ -92631,8 +93360,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { } func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { - bp := tls.Alloc(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92665,26 +93394,26 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 28 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+416, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 416)).FpParse = bp + 8 + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 (*Parse)(unsafe.Pointer(bp + 8)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(bp + 8)).FpToplevel = pTop (*Parse)(unsafe.Pointer(bp + 8)).FzAuthContext = (*Trigger)(unsafe.Pointer(pTrigger)).FzName (*Parse)(unsafe.Pointer(bp + 8)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(bp + 8)).FnQueryLoop = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop - (*Parse)(unsafe.Pointer(bp + 8)).FdisableVtab = (*Parse)(unsafe.Pointer(pParse)).FdisableVtab + (*Parse)(unsafe.Pointer(bp + 8)).FprepFlags = (*Parse)(unsafe.Pointer(pParse)).FprepFlags v = Xsqlite3GetVdbe(tls, bp+8) if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20322, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20417, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) } if (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen != 0 { pWhen = Xsqlite3ExprDup(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && - SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+416, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+424, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92701,7 +93430,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt transferParseError(tls, pParse, bp+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+128) + (*SubProgram)(unsafe.Pointer(pProgram)).FaOp = Xsqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+136) } (*SubProgram)(unsafe.Pointer(pProgram)).FnMem = (*Parse)(unsafe.Pointer(bp + 8)).FnMem (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*Parse)(unsafe.Pointer(bp + 8)).FnTab @@ -92894,10 +93623,12 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg bp := tls.Alloc(8) defer tls.Free(8) - if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { + var pCol uintptr + + pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + if (*Column)(unsafe.Pointer(pCol)).FiDflt != 0 { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) var enc U8 = (*Sqlite3)(unsafe.Pointer(Xsqlite3VdbeDb(tls, v))).Fenc - var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), Xsqlite3ColumnExpr(tls, pTab, pCol), enc, @@ -92906,7 +93637,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp)), -10) } } - if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_REAL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) } } @@ -93268,7 +93999,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20336, + ts+20431, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -93300,7 +94031,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20372, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20467, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -93310,7 +94041,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7639 + return ts + 7653 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -94180,7 +94911,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20391) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20486) __169: ; update_cleanup: @@ -94486,10 +95217,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*uint8)(unsafe.Pointer(bp + 216)) = uint8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20404, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216, ts+20499, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20408, libc.VaList(bp+8, bp+216)) + ts+20503, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -94580,7 +95311,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12126, -1) + ts+12140, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94612,7 +95343,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var zSubSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20481, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20485, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20576, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20580, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94749,23 +95480,25 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var nDb int32 var zDbMain uintptr var zOut uintptr + var pgflags U32 var id uintptr var i int32 rc = SQLITE_OK pDb = uintptr(0) + pgflags = U32(PAGER_SYNCHRONOUS_OFF) if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20489) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20584) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20529) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20624) return SQLITE_ERROR __2: ; @@ -94776,7 +95509,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20572) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20667) return SQLITE_ERROR __5: ; @@ -94785,7 +95518,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 76)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1534 + zOut = ts + 1554 __4: ; saved_flags = (*Sqlite3)(unsafe.Pointer(db)).Fflags @@ -94804,7 +95537,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20590, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20685, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94824,20 +95557,22 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20613) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20708) goto end_of_vacuum __8: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_VacuumInto) + + pgflags = U32(U64((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).Fsafety_level) | (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK)) __7: ; nRes = Xsqlite3BtreeGetRequestedReserve(tls, pMain) Xsqlite3BtreeSetCacheSize(tls, pTemp, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fcache_size) Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) - Xsqlite3BtreeSetPagerFlags(tls, pTemp, uint32(PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL)) + Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14479) + rc = execSql(tls, db, pzErrMsg, ts+14493) if !(rc != SQLITE_OK) { goto __9 } @@ -94882,7 +95617,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20640, + ts+20735, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94891,7 +95626,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20748, + ts+20843, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94902,7 +95637,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20802, + ts+20897, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94913,7 +95648,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20953, + ts+21048, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -95035,7 +95770,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule (*Module)(unsafe.Pointer(pMod)).FpEpoTab = uintptr(0) (*Module)(unsafe.Pointer(pMod)).FnRefModule = 1 } - pDel = Xsqlite3HashInsert(tls, db+568, zCopy, pMod) + pDel = Xsqlite3HashInsert(tls, db+576, zCopy, pMod) if pDel != 0 { if pDel == pMod { Xsqlite3OomFault(tls, db) @@ -95077,7 +95812,7 @@ func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { var pThis uintptr var pNext uintptr - for pThis = (*Hash)(unsafe.Pointer(db + 568)).Ffirst; pThis != 0; pThis = pNext { + for pThis = (*Hash)(unsafe.Pointer(db + 576)).Ffirst; pThis != 0; pThis = pNext { var pMod uintptr = (*HashElem)(unsafe.Pointer(pThis)).Fdata pNext = (*HashElem)(unsafe.Pointer(pThis)).Fnext if azNames != 0 { @@ -95234,7 +95969,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { - if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) } if *(*uintptr)(unsafe.Pointer(p + 64 + 8)) != 0 { @@ -95258,7 +95993,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(2+*(*int32)(unsafe.Pointer(pTable + 64)))) if *(*int32)(unsafe.Pointer(pTable + 64))+3 >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12353, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12367, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95342,11 +96077,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32(int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1)) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21083, libc.VaList(bp, pParse+256)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21178, libc.VaList(bp, pParse+264)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21107, + ts+21202, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -95356,7 +96091,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21206, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21301, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95390,7 +96125,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { - var pArg uintptr = pParse + 368 + var pArg uintptr = pParse + 376 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz (*Token)(unsafe.Pointer(pArg)).Fn = (*Token)(unsafe.Pointer(p)).Fn @@ -95417,7 +96152,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21225, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21320, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95455,9 +96190,9 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21267, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21362, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } Xsqlite3DbFree(tls, db, pVTable) @@ -95467,7 +96202,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21297 + var zFormat uintptr = ts + 21392 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95479,12 +96214,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) = pVTable for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { - var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1534) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, ts+1554) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16095, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, zType+uintptr(i), 6) && (i == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -95537,17 +96272,17 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 } zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21343, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21438, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+16) if rc != SQLITE_OK { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) @@ -95596,10 +96331,10 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pTab = Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) zMod = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - pMod = Xsqlite3HashFind(tls, db+568, zMod) + pMod = Xsqlite3HashFind(tls, db+576, zMod) if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21343, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21438, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -95619,8 +96354,8 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { - bp := tls.Alloc(416) - defer tls.Free(416) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95633,7 +96368,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 148074) + return Xsqlite3MisuseError(tls, 149843) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95675,7 +96410,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { - return ts + 3649 + return ts + 3663 } return uintptr(0) }(), libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+8)).FzErrMsg)) @@ -96043,7 +96778,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+8) if rc != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -96086,7 +96821,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 148565) + rc = Xsqlite3MisuseError(tls, 150334) } else { ap = va switch op { @@ -96113,7 +96848,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 148583) + rc = Xsqlite3MisuseError(tls, 150352) break } @@ -96341,31 +97076,13 @@ type InLoop = struct { F__ccgo_pad1 [3]byte } -// Each instance of this object records a change to a single node -// in an expression tree to cause that node to point to a column -// of an index rather than an expression or a virtual column. All -// such transformations need to be undone at the end of WHERE clause -// processing. -type WhereExprMod1 = struct { - FpNext uintptr - FpExpr uintptr - Forig Expr -} - -// Each instance of this object records a change to a single node -// in an expression tree to cause that node to point to a column -// of an index rather than an expression or a virtual column. All -// such transformations need to be undone at the end of WHERE clause -// processing. -type WhereExprMod = WhereExprMod1 - func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21362 + return ts + 21457 } if i == -1 { - return ts + 16204 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -96374,35 +97091,35 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21375, 1) + Xsqlite3_str_append(tls, pStr, ts+21470, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12743, 1) + Xsqlite3_str_append(tls, pStr, ts+12757, 1) } - Xsqlite3_str_append(tls, pStr, ts+4994, 1) + Xsqlite3_str_append(tls, pStr, ts+5008, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } } @@ -96419,29 +97136,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21377, 2) + Xsqlite3_str_append(tls, pStr, ts+21472, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21369, 5) + Xsqlite3_str_append(tls, pStr, ts+21464, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21380 + return ts + 21475 } - return ts + 21385 + return ts + 21480 }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21393) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21488) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21395) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21490) } - Xsqlite3_str_append(tls, pStr, ts+4943, 1) + Xsqlite3_str_append(tls, pStr, ts+4957, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -96482,11 +97199,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21397, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21492, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21403 + return ts + 21498 } - return ts + 21410 + return ts + 21505 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96496,43 +97213,43 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10900 + zFmt = ts + 10914 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21415 + zFmt = ts + 21510 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21448 + zFmt = ts + 21543 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21473 + zFmt = ts + 21568 } else { - zFmt = ts + 21491 + zFmt = ts + 21586 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21500, 7) + Xsqlite3_str_append(tls, bp+64, ts+21595, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp uint8 - var zRowid uintptr = ts + 16204 - Xsqlite3_str_appendf(tls, bp+64, ts+21508, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21603, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = uint8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21539, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21634, libc.VaList(bp+32, zRowid)) cRangeOp = uint8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = uint8('>') } else { cRangeOp = uint8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21549, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21644, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21554, + Xsqlite3_str_appendf(tls, bp+64, ts+21649, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 16)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21581, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21676, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96564,25 +97281,25 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21592, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21687, libc.VaList(bp, pItem)) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK) != 0 { var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21613, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21708, 0) } } else { for i = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip); i < int32(*(*U16)(unsafe.Pointer(pLoop + 24))); i++ { var z uintptr = explainIndexColumnName(tls, *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)), i) if i > int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp+24, ts+21369, 5) + Xsqlite3_str_append(tls, bp+24, ts+21464, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21380, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21475, libc.VaList(bp+16, z)) } } - Xsqlite3_str_append(tls, bp+24, ts+4943, 1) + Xsqlite3_str_append(tls, bp+24, ts+4957, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) @@ -96943,7 +97660,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 7, 0x80) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 7, 0x80) Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur) if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) != 0 && (*Parse)(unsafe.Pointer(func() uintptr { @@ -96996,104 +97713,6 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg } } -// An instance of the IdxExprTrans object carries information about a -// mapping from an expression on table columns into a column in an index -// down through the Walker. -type IdxExprTrans = IdxExprTrans1 - -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { - var pNew uintptr - pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) - if pNew == uintptr(0) { - return - } - (*WhereExprMod)(unsafe.Pointer(pNew)).FpNext = (*WhereInfo)(unsafe.Pointer((*IdxExprTrans)(unsafe.Pointer(pTrans)).FpWInfo)).FpExprMods - (*WhereInfo)(unsafe.Pointer((*IdxExprTrans)(unsafe.Pointer(pTrans)).FpWInfo)).FpExprMods = pNew - (*WhereExprMod)(unsafe.Pointer(pNew)).FpExpr = pExpr - libc.Xmemcpy(tls, pNew+16, pExpr, uint64(unsafe.Sizeof(Expr{}))) -} - -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) - if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { - pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) - preserveExpr(tls, pX, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3ExprAffinity(tls, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_COLUMN) - (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCur - (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar((*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCol) - - *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Skip | EP_Unlikely | EP_WinFunc | EP_Subrtn)) - *(*uintptr)(unsafe.Pointer(pExpr + 64)) = uintptr(0) - return WRC_Prune - } else { - return WRC_Continue - } - return int32(0) -} - -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { - if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { - var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) - if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { - preserveExpr(tls, pX, pExpr) - (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCur - (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar((*IdxExprTrans)(unsafe.Pointer(pX)).FiIdxCol) - *(*uintptr)(unsafe.Pointer(pExpr + 64)) = uintptr(0) - } - } - return WRC_Continue -} - -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { - bp := tls.Alloc(88) - defer tls.Free(88) - - var iIdxCol int32 - var aColExpr uintptr - var pTab uintptr - - aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr - if aColExpr == uintptr(0) && !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x20>>5) != 0) { - return - } - pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCur = iIdxCur - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpWInfo = pWInfo - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).Fdb = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb - for iIdxCol = 0; iIdxCol < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); iIdxCol++ { - var iRef I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) - if int32(iRef) == -2 { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FpIdxExpr = (*ExprList_item)(unsafe.Pointer(aColExpr + 8 + uintptr(iIdxCol)*32)).FpExpr - if Xsqlite3ExprIsConstant(tls, (*IdxExprTrans)(unsafe.Pointer(bp+48)).FpIdxExpr) != 0 { - continue - } - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransNode})) - } else if int32(iRef) >= 0 && - int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*24)).FcolFlags)&COLFLAG_HASCOLL == 0 || - Xsqlite3StrICmp(tls, Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iRef)*24), - uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) == 0) { - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiTabCol = int32(iRef) - (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) int32 - }{whereIndexExprTransColumn})) - } else { - continue - } - (*IdxExprTrans)(unsafe.Pointer(bp + 48)).FiIdxCol = iIdxCol - Xsqlite3WalkExpr(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpWhere) - Xsqlite3WalkExprList(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) - Xsqlite3WalkExprList(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) - } -} - func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { var i int32 var pTerm uintptr @@ -97132,7 +97751,7 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, defer tls.Free(8) for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { - var pLevel uintptr = pWInfo + 872 + uintptr(iLevel)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLevel)*104 var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter == 0 { continue @@ -97152,6 +97771,8 @@ func filterPullDown(tls *libc.TLS, pParse uintptr, pWInfo uintptr, iLevel int32, regRowid = Xsqlite3GetTempReg(tls, pParse) regRowid = codeEqualityTerm(tls, pParse, pTerm, pLevel, 0, 0, regRowid) + Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MustBeInt, regRowid, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, regRowid, 1) @@ -97302,12 +97923,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI iReleaseReg = 0 pIdx = uintptr(0) - pWC = pWInfo + 120 + pWC = pWInfo + 104 db = (*Parse)(unsafe.Pointer(pParse)).Fdb pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor - (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+608, iCur) + (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady = notReady & ^Xsqlite3WhereGetMask(tls, pWInfo+592, iCur) bRev = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask >> iLevel & uint64(1)) addrBrk = libc.AssignPtrInt32(pLevel+12, libc.AssignPtrInt32(pLevel+16, Xsqlite3VdbeMakeLabel(tls, pParse))) @@ -97326,13 +97947,13 @@ __2: if !(j > 0) { goto __4 } - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FiLeftJoin != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FiLeftJoin != 0) { goto __5 } goto __4 __5: ; - if !((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(j)*104)).FpRJ != 0) { + if !((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(j)*104)).FpRJ != 0) { goto __6 } goto __4 @@ -97345,7 +97966,7 @@ __3: goto __4 __4: ; - addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(j)*104)).FaddrBrk + addrHalt = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(j)*104)).FaddrBrk if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x400>>10)) != 0) { goto __7 @@ -97407,7 +98028,7 @@ __15: goto __19 } - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit)).FiOffset) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FiOffset) __19: ; @@ -97554,6 +98175,8 @@ __36: if !((*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter != 0) { goto __37 } + Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, iRowidReg, addrNxt) + Xsqlite3VdbeAddOp4Int(tls, v, OP_Filter, (*WhereLevel)(unsafe.Pointer(pLevel)).FregFilter, addrNxt, iRowidReg, 1) @@ -97896,13 +98519,20 @@ __75: addrSeekScan = Xsqlite3VdbeAddOp1(tls, v, OP_SeekScan, (int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))+9)/10) - + if !(pRangeStart != 0) { + goto __77 + } + Xsqlite3VdbeChangeP5(tls, v, uint16(1)) + Xsqlite3VdbeChangeP2(tls, v, addrSeekScan, Xsqlite3VdbeCurrentAddr(tls, v)+1) + addrSeekScan = 0 +__77: + ; __76: ; Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(regBignull != 0) { - goto __77 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -97910,104 +98540,113 @@ __76: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1-startEq) -__77: +__78: ; __73: ; nConstraint1 = int32(nEq) if !(pRangeEnd != 0) { - goto __78 + goto __79 } pRight3 = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FpExpr)).FpRight if !(addrSeekScan != 0) { - goto __80 + goto __81 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__80: +__81: ; codeExprOrVector(tls, pParse, pRight3, regBase+int32(nEq), int32(nTop)) if !(int32((*WhereTerm)(unsafe.Pointer(pRangeEnd)).FwtFlags)&TERM_VNULL == 0 && Xsqlite3ExprCanBeNull(tls, pRight3) != 0) { - goto __81 + goto __82 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regBase+int32(nEq), addrNxt) -__81: +__82: ; if !(zEndAff != 0) { - goto __82 + goto __83 } updateRangeAffinityStr(tls, pRight3, int32(nTop), zEndAff) codeApplyAffinity(tls, pParse, regBase+int32(nEq), int32(nTop), zEndAff) - goto __83 -__82: - ; + goto __84 __83: ; +__84: + ; nConstraint1 = nConstraint1 + int32(nTop) if !(Xsqlite3ExprIsVector(tls, pRight3) == 0) { - goto __84 + goto __85 } disableTerm(tls, pLevel, pRangeEnd) - goto __85 -__84: - endEq = 1 + goto __86 __85: + endEq = 1 +__86: ; - goto __79 -__78: + goto __80 +__79: if !(bStopAtNull != 0) { - goto __86 + goto __87 } if !(regBignull == 0) { - goto __87 + goto __88 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regBase+int32(nEq)) endEq = 0 -__87: +__88: ; nConstraint1++ -__86: +__87: ; -__79: +__80: + ; + if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { + goto __89 + } + Xsqlite3DbNNFreeNN(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) +__89: + ; + if !(zEndAff != 0) { + goto __90 + } + Xsqlite3DbNNFreeNN(tls, db, zEndAff) +__90: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))) - Xsqlite3DbFree(tls, db, zEndAff) - if !((*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 == 0) { - goto __88 + goto __91 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) -__88: +__91: ; if !(nConstraint1 != 0) { - goto __89 + goto __92 } if !(regBignull != 0) { - goto __90 + goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+3) -__90: +__93: ; op1 = int32(aEndOp[bRev*2+endEq]) Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1) if !(addrSeekScan != 0) { - goto __91 + goto __94 } Xsqlite3VdbeJumpHere(tls, v, addrSeekScan) -__91: +__94: ; -__89: +__92: ; if !(regBignull != 0) { - goto __92 + goto __95 } Xsqlite3VdbeAddOp2(tls, v, OP_If, regBignull, Xsqlite3VdbeCurrentAddr(tls, v)+2) @@ -98016,92 +98655,86 @@ __89: Xsqlite3VdbeAddOp4Int(tls, v, op1, iIdxCur, addrNxt, regBase, nConstraint1+int32(bSeekPastNull)) -__92: +__95: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_EARLYOUT) != U32(0)) { - goto __93 + goto __96 } Xsqlite3VdbeAddOp3(tls, v, OP_SeekHit, iIdxCur, int32(nEq), int32(nEq)) -__93: +__96: ; omitTable = libc.Bool32((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) != U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) if !(omitTable != 0) { - goto __94 + goto __97 } - goto __95 -__94: + goto __98 +__97: if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __96 + goto __99 } codeDeferredSeek(tls, pWInfo, pIdx, iCur, iIdxCur) - goto __97 -__96: + goto __100 +__99: if !(iCur != iIdxCur) { - goto __98 + goto __101 } pPk = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) iRowidReg = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) j = 0 -__99: +__102: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { - goto __101 + goto __104 } k = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, k, iRowidReg+j) - goto __100 -__100: + goto __103 +__103: j++ - goto __99 - goto __101 -__101: + goto __102 + goto __104 +__104: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, iCur, addrCont, iRowidReg, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) -__98: +__101: ; -__97: +__100: ; -__95: +__98: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0) { - goto __102 + goto __105 } - if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_OR_SUBCLAUSE|WHERE_RIGHT_JOIN) == 0) { - goto __104 - } - whereIndexExprTrans(tls, pIdx, iCur, iIdxCur, pWInfo) -__104: - ; if !((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0) { - goto __105 + goto __107 } whereApplyPartialIndexConstraints(tls, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) -__105: +__107: ; - goto __103 -__102: + goto __106 +__105: ; -__103: +__106: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_ONEROW) != 0) { - goto __106 + goto __108 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __107 -__106: + goto __109 +__108: if !(bRev != 0) { - goto __108 + goto __110 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Prev) - goto __109 -__108: + goto __111 +__110: (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Next) -__109: +__111: ; -__107: +__109: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iIdxCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp3 = func() uint8 { @@ -98111,24 +98744,24 @@ __107: return uint8(0) }() if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_CONSTRAINT) == U32(0)) { - goto __110 + goto __112 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) - goto __111 -__110: + goto __113 +__112: ; -__111: +__113: ; if !(omitTable != 0) { - goto __112 + goto __114 } pIdx = uintptr(0) -__112: +__114: ; goto __53 __52: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_MULTI_OR) != 0) { - goto __113 + goto __115 } pCov = uintptr(0) iCovCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -98148,152 +98781,153 @@ __52: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = regReturn if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __115 + goto __117 } nNotReady = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - 1 - pOrTab = Xsqlite3DbMallocRaw(tls, db, uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) + pOrTab = Xsqlite3DbMallocRawNN(tls, db, + uint64(unsafe.Sizeof(SrcList{}))+uint64(nNotReady)*uint64(unsafe.Sizeof(SrcItem{}))) if !(pOrTab == uintptr(0)) { - goto __117 + goto __119 } return notReady -__117: +__119: ; (*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc = U32(U8(nNotReady + 1)) (*SrcList)(unsafe.Pointer(pOrTab)).FnSrc = int32((*SrcList)(unsafe.Pointer(pOrTab)).FnAlloc) libc.Xmemcpy(tls, pOrTab+8, pTabItem, uint64(unsafe.Sizeof(SrcItem{}))) origSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 k = 1 -__118: +__120: if !(k <= nNotReady) { - goto __120 + goto __122 } libc.Xmemcpy(tls, pOrTab+8+uintptr(k)*104, origSrc+uintptr((*WhereLevel)(unsafe.Pointer(pLevel+uintptr(k)*104)).FiFrom)*104, uint64(unsafe.Sizeof(SrcItem{}))) - goto __119 -__119: + goto __121 +__121: k++ - goto __118 goto __120 -__120: + goto __122 +__122: ; - goto __116 -__115: + goto __118 +__117: pOrTab = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList -__116: +__118: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __121 + goto __123 } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __122 + goto __124 } regRowset = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowset) - goto __123 -__122: + goto __125 +__124: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab) regRowset = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, regRowset, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) -__123: +__125: ; regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) -__121: +__123: ; iRetInit = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regReturn) if !((*WhereClause)(unsafe.Pointer(pWC)).FnTerm > 1) { - goto __124 + goto __126 } iTerm = 0 -__125: +__127: if !(iTerm < (*WhereClause)(unsafe.Pointer(pWC)).FnTerm) { - goto __127 + goto __129 } pExpr = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iTerm)*56)).FpExpr if !((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56 == pTerm) { - goto __128 + goto __130 } - goto __126 -__128: + goto __128 +__130: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED|TERM_SLICE) != 0) { - goto __129 + goto __131 } - goto __126 -__129: + goto __128 +__131: ; if !(int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iTerm)*56)).FeOperator)&WO_ALL == 0) { - goto __130 + goto __132 } - goto __126 -__130: + goto __128 +__132: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0)) { - goto __131 + goto __133 } - goto __126 -__131: + goto __128 +__133: ; pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pAndExpr = Xsqlite3ExprAnd(tls, pParse, pAndExpr, pExpr) - goto __126 -__126: + goto __128 +__128: iTerm++ - goto __125 goto __127 -__127: + goto __129 +__129: ; if !(pAndExpr != 0) { - goto __132 + goto __134 } pAndExpr = Xsqlite3PExpr(tls, pParse, TK_AND|0x10000, uintptr(0), pAndExpr) -__132: +__134: ; -__124: +__126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21621, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21716, 0) ii = 0 -__133: +__135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { - goto __135 + goto __137 } pOrTerm = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56 if !((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0) { - goto __136 + goto __138 } pOrExpr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr jmp1 = 0 pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __137 + goto __139 } Xsqlite3ExprDelete(tls, db, pDelete) - goto __134 -__137: + goto __136 +__139: ; if !(pAndExpr != 0) { - goto __138 + goto __140 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr pOrExpr = pAndExpr -__138: +__140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21636, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21731, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) if !(pSubWInfo != 0) { - goto __139 + goto __141 } addrExplain = Xsqlite3WhereExplainOneScan(tls, - pParse, pOrTab, pSubWInfo+872, uint16(0)) + pParse, pOrTab, pSubWInfo+856, uint16(0)) _ = addrExplain if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DUPLICATES_OK == 0) { - goto __140 + goto __142 } iSet = func() int32 { if ii == (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm-1 { @@ -98302,121 +98936,121 @@ __138: return ii }() if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __141 + goto __143 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, -1, regRowid) jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_RowSetTest, regRowset, 0, regRowid, iSet) - goto __142 -__141: + goto __144 +__143: pPk2 = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = int32((*Index)(unsafe.Pointer(pPk2)).FnKeyCol) r = Xsqlite3GetTempRange(tls, pParse, nPk) iPk = 0 -__143: +__145: if !(iPk < nPk) { - goto __145 + goto __147 } iCol = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk2)).FaiColumn + uintptr(iPk)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, iCol, r+iPk) - goto __144 -__144: + goto __146 +__146: iPk++ - goto __143 goto __145 -__145: + goto __147 +__147: ; if !(iSet != 0) { - goto __146 + goto __148 } jmp1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, regRowset, 0, r, nPk) -__146: +__148: ; if !(iSet >= 0) { - goto __147 + goto __149 } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r, nPk, regRowid) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, regRowset, regRowid, r, nPk) if !(iSet != 0) { - goto __148 + goto __150 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) -__148: +__150: ; -__147: +__149: ; Xsqlite3ReleaseTempRange(tls, pParse, r, nPk) -__142: +__144: ; -__140: +__142: ; Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReturn, iLoopBody) if !(jmp1 != 0) { - goto __149 + goto __151 } Xsqlite3VdbeJumpHere(tls, v, jmp1) -__149: +__151: ; - if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 76))&0x40>>6)) != 0) { - goto __150 + if !(uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68))&0x40>>6)) != 0) { + goto __152 } untestedTerms = 1 -__150: +__152: ; - pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 872)).FpWLoop + pSubLoop = (*WhereLevel)(unsafe.Pointer(pSubWInfo + 856)).FpWLoop if !((*WhereLoop)(unsafe.Pointer(pSubLoop)).FwsFlags&U32(WHERE_INDEXED) != U32(0) && (ii == 0 || *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) == pCov) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY))) { - goto __151 + goto __153 } pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 + 8)) - goto __152 -__151: + goto __154 +__153: pCov = uintptr(0) -__152: +__154: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0) { - goto __153 + goto __155 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 7, 0x80) -__153: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 7, 0x80) +__155: ; Xsqlite3WhereEnd(tls, pSubWInfo) Xsqlite3VdbeExplainPop(tls, pParse) -__139: +__141: ; Xsqlite3ExprDelete(tls, db, pDelete) -__136: +__138: ; - goto __134 -__134: + goto __136 +__136: ii++ - goto __133 goto __135 -__135: + goto __137 +__137: ; Xsqlite3VdbeExplainPop(tls, pParse) *(*uintptr)(unsafe.Pointer(pLevel + 72)) = pCov if !(pCov != 0) { - goto __154 + goto __156 } (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iCovCur -__154: +__156: ; if !(pAndExpr != 0) { - goto __155 + goto __157 } (*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, pAndExpr) -__155: +__157: ; Xsqlite3VdbeChangeP1(tls, v, iRetInit, Xsqlite3VdbeCurrentAddr(tls, v)) Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk) @@ -98425,36 +99059,36 @@ __155: (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeCurrentAddr(tls, v) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > 1) { - goto __156 + goto __158 } - Xsqlite3DbFree(tls, db, pOrTab) -__156: + Xsqlite3DbFreeNN(tls, db, pOrTab) +__158: ; if !!(untestedTerms != 0) { - goto __157 + goto __159 } disableTerm(tls, pLevel, pTerm) -__157: +__159: ; - goto __114 -__113: + goto __116 +__115: ; if !(uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 + 4))&0x200>>9)) != 0) { - goto __158 + goto __160 } (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop) - goto __159 -__158: + goto __161 +__160: ; (*WhereLevel)(unsafe.Pointer(pLevel)).Fop = aStep[bRev] (*WhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iCur (*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = 1 + Xsqlite3VdbeAddOp2(tls, v, int32(aStart[bRev]), iCur, addrHalt) (*WhereLevel)(unsafe.Pointer(pLevel)).Fp5 = U8(SQLITE_STMTSTATUS_FULLSCAN_STEP) -__159: +__161: ; -__114: +__116: ; __53: ; @@ -98472,219 +99106,219 @@ __8: } return 2 }() -__160: +__162: iNext = 0 pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm -__163: +__165: if !(j > 0) { - goto __165 + goto __167 } skipLikeAddr = 0 if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __166 + goto __168 } - goto __164 -__166: + goto __166 +__168: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __167 + goto __169 } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 6, 0x40) - goto __164 -__167: + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 6, 0x40) + goto __166 +__169: ; pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __168 + goto __170 } if !!((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) { - goto __169 + goto __171 } - goto __164 - goto __170 -__169: + goto __166 + goto __172 +__171: if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LEFT == JT_LEFT && !((*Expr)(unsafe.Pointer(pE)).Fflags&U32(EP_OuterON) != U32(0))) { - goto __171 + goto __173 } - goto __164 - goto __172 -__171: - m = Xsqlite3WhereGetMask(tls, pWInfo+608, *(*int32)(unsafe.Pointer(pE + 52))) + goto __166 + goto __174 +__173: + m = Xsqlite3WhereGetMask(tls, pWInfo+592, *(*int32)(unsafe.Pointer(pE + 52))) if !(m&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != 0) { - goto __173 + goto __175 } - goto __164 -__173: + goto __166 +__175: + ; +__174: ; __172: ; __170: ; -__168: - ; if !(iLoop == 1 && !(Xsqlite3ExprCoveredByIndex(tls, pE, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, pIdx) != 0)) { - goto __174 + goto __176 } iNext = 2 - goto __164 -__174: + goto __166 +__176: ; if !(iLoop < 3 && int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_VARSELECT != 0) { - goto __175 + goto __177 } if !(iNext == 0) { - goto __176 + goto __178 } iNext = 3 -__176: +__178: ; - goto __164 -__175: + goto __166 +__177: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKECOND != 0) { - goto __177 + goto __179 } - goto __164 -__177: + goto __166 +__179: ; Xsqlite3ExprIfFalse(tls, pParse, pE, addrCont, SQLITE_JUMPIFNULL) if !(skipLikeAddr != 0) { - goto __178 + goto __180 } Xsqlite3VdbeJumpHere(tls, v, skipLikeAddr) -__178: +__180: ; *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __164 -__164: + goto __166 +__166: j-- pTerm += 56 - goto __163 goto __165 -__165: + goto __167 +__167: ; iLoop = iNext - goto __161 -__161: + goto __163 +__163: if iLoop > 0 { - goto __160 + goto __162 } - goto __162 -__162: + goto __164 +__164: ; pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = (*WhereClause)(unsafe.Pointer(pWC)).FnBase -__179: +__181: if !(j > 0) { - goto __181 + goto __183 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __182 + goto __184 } - goto __180 -__182: + goto __182 +__184: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&(WO_EQ|WO_IS) == 0) { - goto __183 + goto __185 } - goto __180 -__183: + goto __182 +__185: ; if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&WO_EQUIV == 0) { - goto __184 + goto __186 } - goto __180 -__184: + goto __182 +__186: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != iCur) { - goto __185 + goto __187 } - goto __180 -__185: + goto __182 +__187: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) { - goto __186 + goto __188 } - goto __180 -__186: + goto __182 +__188: ; pE1 = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr pAlt = Xsqlite3WhereFindTerm(tls, pWC, iCur, *(*int32)(unsafe.Pointer(pTerm + 32)), notReady, uint32(WO_EQ|WO_IN|WO_IS), uintptr(0)) if !(pAlt == uintptr(0)) { - goto __187 + goto __189 } - goto __180 -__187: + goto __182 +__189: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FwtFlags)&TERM_CODED != 0) { - goto __188 + goto __190 } - goto __180 -__188: + goto __182 +__190: ; if !(int32((*WhereTerm)(unsafe.Pointer(pAlt)).FeOperator)&WO_IN != 0 && (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr + 32)))).FpEList)).FnExpr > 1) { - goto __189 + goto __191 } - goto __180 -__189: + goto __182 +__191: ; *(*Expr)(unsafe.Pointer(bp + 24)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 24)).FpLeft = (*Expr)(unsafe.Pointer(pE1)).FpLeft Xsqlite3ExprIfFalse(tls, pParse, bp+24, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18)) |= U16(TERM_CODED) - goto __180 -__180: + goto __182 +__182: j-- pTerm += 56 - goto __179 goto __181 -__181: + goto __183 +__183: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __190 + goto __192 } jmp11 = 0 pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ pTab1 = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FpTab if !((*Table)(unsafe.Pointer(pTab1)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __191 + goto __193 } r2 = Xsqlite3GetTempRange(tls, pParse, 2) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, -1, r2+1) nPk1 = 1 - goto __192 -__191: + goto __194 +__193: pPk3 = Xsqlite3PrimaryKeyIndex(tls, pTab1) nPk1 = int32((*Index)(unsafe.Pointer(pPk3)).FnKeyCol) r2 = Xsqlite3GetTempRange(tls, pParse, nPk1+1) iPk1 = 0 -__193: +__195: if !(iPk1 < nPk1) { - goto __195 + goto __197 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk3)).FaiColumn + uintptr(iPk1)*2))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab1, iCur, iCol1, r2+1+iPk1) - goto __194 -__194: + goto __196 +__196: iPk1++ - goto __193 goto __195 -__195: + goto __197 +__197: ; -__192: +__194: ; jmp11 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 0, r2+1, nPk1) @@ -98694,24 +99328,24 @@ __192: Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3VdbeJumpHere(tls, v, jmp11) Xsqlite3ReleaseTempRange(tls, pParse, r2, nPk1+1) -__190: +__192: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0) { - goto __196 + goto __198 } (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrFirst = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin) if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0)) { - goto __197 + goto __199 } goto code_outer_join_constraints -__197: +__199: ; -__196: +__198: ; if !((*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0) { - goto __198 + goto __200 } pRJ1 = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeAddOp2(tls, v, OP_BeginSubrtn, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ1)).FregReturn) @@ -98722,41 +99356,41 @@ __196: code_outer_join_constraints: pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa j = 0 -__199: +__201: if !(j < (*WhereClause)(unsafe.Pointer(pWC)).FnBase) { - goto __201 + goto __203 } if !(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&(TERM_VIRTUAL|TERM_CODED) != 0) { - goto __202 + goto __204 } - goto __200 -__202: + goto __202 +__204: ; if !((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll&(*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady != uint64(0)) { - goto __203 + goto __205 } - goto __200 -__203: + goto __202 +__205: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_LTORJ != 0) { - goto __204 + goto __206 } - goto __200 -__204: + goto __202 +__206: ; Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_CODED) - goto __200 -__200: + goto __202 +__202: j++ pTerm += 56 - goto __199 goto __201 -__201: + goto __203 +__203: ; -__198: +__200: ; return (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady } @@ -98790,7 +99424,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ var pSubWhere uintptr = uintptr(0) - var pWC uintptr = pWInfo + 120 + var pWC uintptr = pWInfo + 104 var pSubWInfo uintptr var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop var pTabItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -98798,13 +99432,13 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21645, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21740, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 - mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FpWLoop)).FmaskSelf - Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+872+uintptr(k)*104)).FiTabCur) - iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(k)*104)).FiIdxCur + mAll = mAll | (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FpWLoop)).FmaskSelf + Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, (*WhereLevel)(unsafe.Pointer(pWInfo+856+uintptr(k)*104)).FiTabCur) + iIdxCur = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(k)*104)).FiIdxCur if iIdxCur != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iIdxCur) } @@ -99083,7 +99717,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8 + 1*32)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { for i = 0; i < int32(uint64(unsafe.Sizeof(aOp))/uint64(unsafe.Sizeof(Op2{}))); i++ { if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), aOp[i].FzOp) == 0 { *(*uint8)(unsafe.Pointer(peOp2)) = aOp[i].FeOp2 @@ -99096,7 +99730,7 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin pCol = (*ExprList_item)(unsafe.Pointer(pList + 8)).FpExpr - if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pCol + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pCol)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCol + 64)))).FeTabType) == TABTYP_VTAB { var pVtab uintptr var pMod uintptr @@ -99120,11 +99754,11 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var pRight uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight - if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pLeft + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 64)))).FeTabType) == TABTYP_VTAB { + if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 64)))).FeTabType) == TABTYP_VTAB { res++ } - if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { + if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB) { res++ { var t uintptr = pLeft @@ -99156,10 +99790,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16053, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15384, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14910, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21659, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14957, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21754, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99301,7 +99935,7 @@ __1: { if allowedOp(tls, int32((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAndTerm)).FpExpr)).Fop)) != 0 || int32((*WhereTerm)(unsafe.Pointer(pAndTerm)).FeOperator) == WO_AUX { - b = b | Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pAndTerm)).FleftCursor) } } @@ -99318,10 +99952,10 @@ __1: } else if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_COPIED != 0 { } else { var b Bitmask - b = Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) + b = Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FwtFlags)&TERM_VIRTUAL != 0 { var pOther uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr((*WhereTerm)(unsafe.Pointer(pOrTerm)).FiParent)*56 - b = b | Xsqlite3WhereGetMask(tls, pWInfo+608, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) + b = b | Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOther)).FleftCursor) } indexable = indexable & b if int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_EQ == 0 { @@ -99378,7 +100012,7 @@ __3: if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCursor { goto __8 } - if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+608, + if chngToIN&Xsqlite3WhereGetMask(tls, pWInfo+592, (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor) == uint64(0) { goto __8 } @@ -99564,6 +100198,7 @@ __3: if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) != -2 { continue } + if Xsqlite3ExprCompareSkip(tls, pExpr, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, iCur) == 0 { *(*int32)(unsafe.Pointer(aiCurCol)) = iCur *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 @@ -99619,7 +100254,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).FbVarSelect = 0 @@ -99656,12 +100291,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } } else if prereqAll>>1 >= x { if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && int32((*SrcItem)(unsafe.Pointer(pSrc+8)).Ffg.Fjointype)&JT_LTORJ != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21666, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21761, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99740,7 +100375,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_OuterON) != U32(0)) && 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6695 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6709 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99834,7 +100469,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21707 + return ts + 21802 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -100028,7 +100663,7 @@ func whereAddLimitExpr(tls *libc.TLS, pWC uintptr, iReg int32, pExpr uintptr, iC // exist only so that they may be passed to the xBestIndex method of the // single virtual table in the FROM clause of the SELECT. func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { - if p != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 && + if (*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(0) && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) == U32(0) && ((*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc == 1 && int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc+8)).FpTab)).FeTabType) == TABTYP_VTAB) { var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy @@ -100207,7 +100842,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21714, + Xsqlite3ErrorMsg(tls, pParse, ts+21809, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100277,6 +100912,9 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { // is positive but less than the number of ORDER BY terms means that // block sorting is required. func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) < 0 { + return 0 + } return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -100303,10 +100941,10 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { // the final answer. func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { var pInner uintptr - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x20>>5) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x20>>5) != 0) { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } - pInner = pWInfo + 872 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 + pInner = pWInfo + 856 + uintptr(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1)*104 if (*WhereLevel)(unsafe.Pointer(pInner)).FpRJ != 0 { return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue @@ -100326,14 +100964,14 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { var pInner uintptr var i int32 - if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 76))&0x20>>5) != 0) { + if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 68))&0x20>>5) != 0) { return } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == 0 { return } for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { - pInner = pWInfo + 872 + uintptr(i)*104 + pInner = pWInfo + 856 + uintptr(i)*104 if (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pInner)).FpWLoop)).FwsFlags&U32(WHERE_COLUMN_IN) != U32(0) { Xsqlite3VdbeGoto(tls, v, (*WhereLevel)(unsafe.Pointer(pInner)).FaddrNxt) return @@ -100370,14 +101008,14 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { - libc.Xmemcpy(tls, aiCur, pWInfo+48, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) + libc.Xmemcpy(tls, aiCur, pWInfo+40, uint64(unsafe.Sizeof(int32(0)))*uint64(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x80 >> 7) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x80 >> 7) } func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { @@ -100820,6 +101458,18 @@ __2: __3: } +func constraintCompatibleWithOuterJoin(tls *libc.TLS, pTerm uintptr, pSrc uintptr) int32 { + if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || + *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { + return 0 + } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != 0 && + (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_InnerON) != U32(0) { + return 0 + } + return 1 +} + func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { var aff uint8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { @@ -100829,11 +101479,9 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm return 0 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - return 0 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + return 0 } if (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight¬Ready != uint64(0) { return 0 @@ -100928,7 +101576,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21750, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21845, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100999,7 +101647,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21776 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21871 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101233,7 +101881,7 @@ func sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, pL } for libc.PreIncInt32(&iLevel, 1) < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) { var pTabItem uintptr - pLevel = pWInfo + 872 + uintptr(iLevel)*104 + pLevel = pWInfo + 856 + uintptr(iLevel)*104 pTabItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0 { continue @@ -101295,11 +101943,9 @@ __1: goto __2 } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - goto __2 - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + goto __2 } nTerm++ *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_OK) @@ -101367,7 +102013,7 @@ __3: uint64(unsafe.Sizeof(sqlite3_index_orderby{}))*uint64(nOrderBy)+uint64(unsafe.Sizeof(HiddenIndexInfo1{}))+ uint64(unsafe.Sizeof(uintptr(0)))*uint64(nTerm)) if pIdxInfo == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+1470, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1490, 0) return uintptr(0) } pHidden = pIdxInfo + 1*96 @@ -101489,9 +102135,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) } else if !(int32((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3649, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3663, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -101559,7 +102205,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro var iUpper TRowcnt var iGap TRowcnt if i >= (*Index)(unsafe.Pointer(pIdx)).FnSample { - iUpper = TRowcnt(Xsqlite3LogEstToInt(tls, *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst)))) + iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) } @@ -101908,9 +102554,12 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+88 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) + (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 88 + (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) } whereLoopClearUnion(tls, db, p) - whereLoopInit(tls, p) + (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) + (*WhereLoop)(unsafe.Pointer(p)).FwsFlags = U32(0) } func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { @@ -101934,7 +102583,8 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { whereLoopClearUnion(tls, db, pTo) - if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm) > int32((*WhereLoop)(unsafe.Pointer(pTo)).FnLSlot) && + whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint64(uintptr(0)+64)) return SQLITE_NOMEM } @@ -101950,32 +102600,22 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { whereLoopClear(tls, db, p) - Xsqlite3DbFreeNN(tls, db, p) + Xsqlite3DbNNFreeNN(tls, db, p) } func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { - Xsqlite3WhereClauseClear(tls, pWInfo+120) + Xsqlite3WhereClauseClear(tls, pWInfo+104) for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) } - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree != 0 { var pNext uintptr = (*WhereMemBlock)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree)).FpNext - Xsqlite3DbFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) + Xsqlite3DbNNFreeNN(tls, db, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpMemToFree = pNext } - Xsqlite3DbFreeNN(tls, db, pWInfo) -} - -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { - for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods - (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext - libc.Xmemcpy(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, p+16, uint64(unsafe.Sizeof(Expr{}))) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p) - } + Xsqlite3DbNNFreeNN(tls, db, pWInfo) } func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { @@ -102121,7 +102761,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { return SQLITE_OK } - ppPrev = whereLoopFindLesser(tls, pWInfo+88, pTemplate) + ppPrev = whereLoopFindLesser(tls, pWInfo+80, pTemplate) if ppPrev == uintptr(0) { return SQLITE_OK @@ -102364,13 +103004,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb continue } - if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 { - if !((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).Fflags&U32(EP_OuterON|EP_InnerON) != U32(0)) || - *(*int32)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { - continue - } + if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0 && + !(constraintCompatibleWithOuterJoin(tls, pTerm, pSrc) != 0) { + continue } - if int32((*Index)(unsafe.Pointer(pProbe)).FonError) != OE_None && int32(saved_nEq) == int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol)-1 { *(*uint8)(unsafe.Pointer(pBuilder + 44)) |= uint8(SQLITE_BLDF1_UNIQUE) } else { @@ -102381,7 +103018,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = saved_nBtm *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = saved_nTop (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = saved_nLTerm - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + if int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm) >= int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLSlot) && + whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { break } *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTerm @@ -102436,31 +103074,33 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } else if int32(eOp)&WO_ISNULL != 0 { *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_NULL) - } else if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = U16(whereRangeVectorLen(tls, - pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm)) - pBtm = pTerm - pTop = uintptr(0) - if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { - pTop = pTerm + 1*56 - - if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { - break - } - *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTop - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) - } } else { - *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) - *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(whereRangeVectorLen(tls, - pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm)) - pTop = pTerm - if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_BTM_LIMIT) != U32(0) { - pBtm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)-2)*8)) + var nVecLen int32 = whereRangeVectorLen(tls, + pParse, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, pProbe, int32(saved_nEq), pTerm) + if int32(eOp)&(int32(WO_EQ)<<(TK_GT-TK_EQ)|int32(WO_EQ)<<(TK_GE-TK_EQ)) != 0 { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_BTM_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 2)) = U16(nVecLen) + pBtm = pTerm + pTop = uintptr(0) + if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_LIKEOPT != 0 { + pTop = pTerm + 1*56 + + if whereLoopResize(tls, db, pNew, int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1) != 0 { + break + } + *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(libc.PostIncUint16(&(*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm, 1))*8)) = pTop + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(1) + } } else { - pBtm = uintptr(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_COLUMN_RANGE | WHERE_TOP_LIMIT) + *(*U16)(unsafe.Pointer(pNew + 24 + 4)) = U16(nVecLen) + pTop = pTerm + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_BTM_LIMIT) != U32(0) { + pBtm = *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)-2)*8)) + } else { + pBtm = uintptr(0) + } } } @@ -102663,6 +103303,64 @@ __3: return 0 } +func whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintptr) int32 { + var i int32 + var pIdx uintptr + var aiColumn uintptr + var nColumn U16 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + return WRC_Continue + } + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur { + return WRC_Continue + } + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) + return WRC_Abort +} + +func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { + return U32(1) + } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { + break + } + } + if i >= int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) { + return U32(1) + } + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{whereIsCoveringIndexWalkCallback})) + (*Walker)(unsafe.Pointer(bp)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{Xsqlite3SelectWalkNoop})) + *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 + (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) + Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) + return U32((*Walker)(unsafe.Pointer(bp)).FeCode) +} + func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { bp := tls.Alloc(158) defer tls.Free(158) @@ -102794,6 +103492,9 @@ __1: }() (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = LogEst(int32(rSize) + 16 - 2*libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat4) != U32(0))) + if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { + *(*U32)(unsafe.Pointer(pNew + 56)) |= U32(WHERE_VIEWSCAN) + } whereLoopOutputAdjust(tls, pWC, pNew, rSize) rc = whereLoopInsert(tls, pBuilder, pNew) @@ -102808,6 +103509,9 @@ __1: m = uint64(0) } else { m = (*SrcItem)(unsafe.Pointer(pSrc)).FcolUsed & (*Index)(unsafe.Pointer(pProbe)).FcolNotIdxed + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) { + m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { if m == uint64(0) { return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) @@ -102838,7 +103542,7 @@ __1: var nLookup LogEst = LogEst(int32(rSize) + 16) var ii int32 var iCur int32 = (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor - var pWC2 uintptr = pWInfo + 120 + var pWC2 uintptr = pWInfo + 104 for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pWC2)).FnTerm; ii++ { var pTerm uintptr = (*WhereClause)(unsafe.Pointer(pWC2)).Fa + uintptr(ii)*56 if !(Xsqlite3ExprCoveredByIndex(tls, (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr, iCur, pProbe) != 0) { @@ -102994,7 +103698,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103052,7 +103756,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21787, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21882, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103410,7 +104114,7 @@ func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { var pNew uintptr pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - whereLoopInit(tls, pNew) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FiPlanLimit = uint32(SQLITE_QUERY_PLANNER_LIMIT) iTab = 0 pItem = pTabList + 8 @@ -103422,7 +104126,7 @@ __1: var mUnusable Bitmask = uint64(0) (*WhereLoop)(unsafe.Pointer(pNew)).FiTab = U8(iTab) *(*uint32)(unsafe.Pointer(pBuilder + 48)) += uint32(SQLITE_QUERY_PLANNER_LIMIT_INCR) - (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) + (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf = Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(pItem)).FiCursor) if bFirstPastRJ != 0 || int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS|JT_LTORJ) != 0 { if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LTORJ != 0 { @@ -103437,7 +104141,7 @@ __1: var p uintptr for p = pItem + 1*104; p < pEnd; p += 104 { if mUnusable != 0 || int32((*SrcItem)(unsafe.Pointer(p)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { - mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+608, (*SrcItem)(unsafe.Pointer(p)).FiCursor) + mUnusable = mUnusable | Xsqlite3WhereGetMask(tls, pWInfo+592, (*SrcItem)(unsafe.Pointer(p)).FiCursor) } } rc = whereLoopAddVirtual(tls, pBuilder, mPrereq, mUnusable) @@ -103450,7 +104154,7 @@ __1: mPrior = mPrior | (*WhereLoop)(unsafe.Pointer(pNew)).FmaskSelf if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { - Xsqlite3_log(tls, SQLITE_WARNING, ts+21813, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21908, 0) rc = SQLITE_OK } else { goto __3 @@ -103551,7 +104255,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur { continue } - pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+120, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), + pTerm = Xsqlite3WhereFindTerm(tls, pWInfo+104, iCur, int32((*Expr)(unsafe.Pointer(pOBExpr)).FiColumn), ^ready, uint32(eqOpMask), uintptr(0)) if pTerm == uintptr(0) { continue @@ -103725,7 +104429,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } p = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr - mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+608, p) + mTerm = Xsqlite3WhereExprUsage(tls, pWInfo+592, p) if mTerm == uint64(0) && !(Xsqlite3ExprIsConstant(tls, p) != 0) { continue } @@ -103777,7 +104481,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { - return int32(*(*uint8)(unsafe.Pointer(pWInfo + 76)) & 0x10 >> 4) + return int32(*(*uint8)(unsafe.Pointer(pWInfo + 68)) & 0x10 >> 4) } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { @@ -103805,7 +104509,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var mxChoice int32 var nLoop int32 var pParse uintptr - var db uintptr var iLoop int32 var ii int32 var jj int32 @@ -103826,7 +104529,6 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { var nSpace int32 pParse = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse - db = (*Parse)(unsafe.Pointer(pParse)).Fdb nLoop = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) if nLoop <= 1 { @@ -103848,7 +104550,7 @@ func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { nSpace = int32((uint64(unsafe.Sizeof(WherePath{})) + uint64(unsafe.Sizeof(uintptr(0)))*uint64(nLoop)) * uint64(mxChoice) * uint64(2)) nSpace = int32(uint64(nSpace) + uint64(unsafe.Sizeof(LogEst(0)))*uint64(nOrderBy)) - pSpace = Xsqlite3DbMallocRawNN(tls, db, uint64(nSpace)) + pSpace = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nSpace)) if pSpace == uintptr(0) { return SQLITE_NOMEM } @@ -103910,9 +104612,8 @@ __3: var nOut LogEst var rCost LogEst var rUnsorted LogEst - var isOrdered I8 = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered + var isOrdered I8 var maskNew Bitmask - *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) if (*WhereLoop)(unsafe.Pointer(pWLoop)).Fprereq & ^(*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop != uint64(0) { continue @@ -103928,7 +104629,9 @@ __3: rUnsorted = Xsqlite3LogEstAdd(tls, rUnsorted, (*WherePath)(unsafe.Pointer(pFrom)).FrUnsorted) nOut = LogEst(int32((*WherePath)(unsafe.Pointer(pFrom)).FnRow) + int32((*WhereLoop)(unsafe.Pointer(pWLoop)).FnOut)) maskNew = (*WherePath)(unsafe.Pointer(pFrom)).FmaskLoop | (*WhereLoop)(unsafe.Pointer(pWLoop)).FmaskSelf + isOrdered = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32(isOrdered) < 0 { + *(*Bitmask)(unsafe.Pointer(bp)) = uint64(0) isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, uint16(iLoop), pWLoop, bp) @@ -103948,6 +104651,11 @@ __3: rUnsorted = int16(int32(rUnsorted) - 2) } + if iLoop == 0 && (*WhereLoop)(unsafe.Pointer(pWLoop)).FwsFlags&U32(WHERE_VIEWSCAN) != U32(0) { + rCost = int16(int32(rCost) + -10) + nOut = int16(int32(nOut) + -30) + } + jj = 0 pTo = aTo __7: @@ -104044,8 +104752,8 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21848, 0) - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3ErrorMsg(tls, pParse, ts+21943, 0) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -104057,7 +104765,7 @@ __3: } for iLoop = 0; iLoop < nLoop; iLoop++ { - var pLevel uintptr = pWInfo + 872 + uintptr(iLoop)*104 + var pLevel uintptr = pWInfo + 856 + uintptr(iLoop)*104 (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop = libc.AssignUintptr(&pWLoop, *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(iLoop)*8))) (*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom = (*WhereLoop)(unsafe.Pointer(pWLoop)).FiTab (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur = (*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104)).FiCursor @@ -104072,7 +104780,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } } - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(0), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(0), 5, 0x20) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = (*WherePath)(unsafe.Pointer(pFrom)).FisOrdered if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_DISTINCTBY != 0 { @@ -104092,7 +104800,7 @@ __3: uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*8)), bp+16)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 5, 0x20) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16)) } } @@ -104100,7 +104808,7 @@ __3: } else if nLoop != 0 && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == 1 && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) != 0 { - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 5, 0x20) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 5, 0x20) } } if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_SORTBYGROUP != 0 && @@ -104110,7 +104818,7 @@ __3: pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*8)), bp+24)) if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { - libc.SetBitFieldPtr8Uint32(pWInfo+76, uint32(1), 4, 0x10) + libc.SetBitFieldPtr8Uint32(pWInfo+68, uint32(1), 4, 0x10) (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24)) } } @@ -104118,7 +104826,7 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = (*WherePath)(unsafe.Pointer(pFrom)).FnRow - Xsqlite3DbFreeNN(tls, db, pSpace) + Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_OK } @@ -104150,7 +104858,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { return 0 } iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor - pWC = pWInfo + 120 + pWC = pWInfo + 104 pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) @@ -104207,10 +104915,10 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags != 0 { (*WhereLoop)(unsafe.Pointer(pLoop)).FnOut = int16(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop = pLoop + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop = pLoop (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf = uint64(1) - (*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FiTabCur = iCur + (*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FiTabCur = iCur (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut = int16(1) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = I8((*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr) @@ -104254,16 +104962,16 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask var i int32 var tabUsed Bitmask - tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + tabUsed = Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 { - tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+608, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + tabUsed = tabUsed | Xsqlite3WhereExprListUsage(tls, pWInfo+592, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) } for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 1; i-- { var pTerm uintptr var pEnd uintptr var pItem uintptr var pLoop uintptr - pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + pLoop = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_LEFT|JT_RIGHT) != JT_LEFT { continue @@ -104296,7 +105004,7 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask } if i != int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1 { var nByte int32 = int32(uint64(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)-1-i) * uint64(unsafe.Sizeof(WhereLevel{}))) - libc.Xmemmove(tls, pWInfo+872+uintptr(i)*104, pWInfo+872+uintptr(i+1)*104, uint64(nByte)) + libc.Xmemmove(tls, pWInfo+856+uintptr(i)*104, pWInfo+856+uintptr(i+1)*104, uint64(nByte)) } (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel-- @@ -104308,9 +105016,9 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 var nSearch LogEst - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FnOut + nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { - var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 872 + uintptr(i)*104)).FpWLoop + var pLoop uintptr = (*WhereLevel)(unsafe.Pointer(pWInfo + 856 + uintptr(i)*104)).FpWLoop var reqFlags uint32 = uint32(WHERE_SELFCULL | WHERE_COLUMN_EQ) if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&reqFlags == reqFlags && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK|WHERE_INDEXED) != U32(0) { @@ -104328,6 +105036,58 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { } } +func whereIndexedExprCleanup(tls *libc.TLS, db uintptr, pObject uintptr) { + var pParse uintptr = pObject + for (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) + Xsqlite3DbFreeNN(tls, db, p) + } +} + +func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur int32, pTabItem uintptr) { + var i int32 + var p uintptr + var pTab uintptr + + pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + var pExpr uintptr + var j int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) + var bMaybeNullRow int32 + if j == -2 { + pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(i)*32)).FpExpr + + bMaybeNullRow = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ|JT_RIGHT) != 0) + } else if j >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { + pExpr = Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) + bMaybeNullRow = 0 + } else { + continue + } + if Xsqlite3ExprIsConstant(tls, pExpr) != 0 { + continue + } + p = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(IndexedExpr{}))) + if p == uintptr(0) { + break + } + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = iIdxCur + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol = i + (*IndexedExpr)(unsafe.Pointer(p)).FbMaybeNullRow = U8(bMaybeNullRow) + (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { + Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) + }{whereIndexedExprCleanup})), pParse) + } + } +} + // Generate the beginning of the loop used for WHERE clause processing. // The return value is a pointer to an opaque structure that contains // information needed to terminate the loop. Later, the calling routine @@ -104414,7 +105174,7 @@ func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pLimit uintptr, wctrlFlags U16, iAuxArg int32) uintptr { +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, pSelect uintptr, wctrlFlags U16, iAuxArg int32) uintptr { bp := tls.Alloc(64) defer tls.Free(64) @@ -104471,7 +105231,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21866, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21961, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -104494,31 +105254,30 @@ __3: (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse = pParse (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList = pTabList (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pOrderBy - (*WhereInfo)(unsafe.Pointer(pWInfo)).FpWhere = pWhere (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet = pResultSet - *(*int32)(unsafe.Pointer(pWInfo + 48)) = libc.AssignPtrInt32(pWInfo+48+1*4, -1) + *(*int32)(unsafe.Pointer(pWInfo + 40)) = libc.AssignPtrInt32(pWInfo+40+1*4, -1) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel = U8(nTabList) - (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+56, Xsqlite3VdbeMakeLabel(tls, pParse)) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak = libc.AssignPtrInt32(pWInfo+48, Xsqlite3VdbeMakeLabel(tls, pParse)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags = wctrlFlags (*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit = LogEst(iAuxArg) (*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop = int32((*Parse)(unsafe.Pointer(pParse)).FnQueryLoop) - (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLimit = pLimit - libc.Xmemset(tls, pWInfo+73, 0, - uint64(uintptr(0)+120)-uint64(uintptr(0)+73)) - libc.Xmemset(tls, pWInfo+872, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) + (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect = pSelect + libc.Xmemset(tls, pWInfo+65, 0, + uint64(uintptr(0)+104)-uint64(uintptr(0)+65)) + libc.Xmemset(tls, pWInfo+856, 0, uint64(unsafe.Sizeof(WhereLoop{}))+uint64(nTabList)*uint64(unsafe.Sizeof(WhereLevel{}))) - pMaskSet = pWInfo + 608 + pMaskSet = pWInfo + 592 (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn = 0 *(*int32)(unsafe.Pointer(pMaskSet + 8)) = -99 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 120 + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpWC = pWInfo + 104 (*WhereLoopBuilder)(unsafe.Pointer(bp + 8)).FpNew = pWInfo + uintptr(nByteWInfo) whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpNew) - Xsqlite3WhereClauseInit(tls, pWInfo+120, pWInfo) - Xsqlite3WhereSplit(tls, pWInfo+120, pWhere, uint8(TK_AND)) + Xsqlite3WhereClauseInit(tls, pWInfo+104, pWInfo) + Xsqlite3WhereSplit(tls, pWInfo+104, pWhere, uint8(TK_AND)) if !(nTabList == 0) { goto __4 @@ -104536,13 +105295,13 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21894, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21989, 0) goto __5 __4: ii = 0 __8: createMask(tls, pMaskSet, (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(ii)*104)).FiCursor) - Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+120) + Xsqlite3WhereTabFuncArgs(tls, pParse, pTabList+8+uintptr(ii)*104, pWInfo+104) goto __9 __9: if libc.PreIncInt32(&ii, 1) < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { @@ -104553,169 +105312,174 @@ __10: ; __5: ; - Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+120) - Xsqlite3WhereAddLimit(tls, pWInfo+120, pLimit) - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + Xsqlite3WhereExprAnalyze(tls, pTabList, pWInfo+104) + if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0) { goto __11 } - goto whereBeginError + Xsqlite3WhereAddLimit(tls, pWInfo+104, pSelect) __11: ; - ii = 0 + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __12 + } + goto whereBeginError __12: + ; + ii = 0 +__13: if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).FnBase) { - goto __14 + goto __15 } pT = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FpWC)).Fa + uintptr(ii)*56 if !(int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags)&TERM_VIRTUAL != 0) { - goto __15 + goto __16 } - goto __13 -__15: + goto __14 +__16: ; if !((*WhereTerm)(unsafe.Pointer(pT)).FprereqAll == uint64(0) && (nTabList == 0 || exprIsDeterministic(tls, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr) != 0)) { - goto __16 + goto __17 } Xsqlite3ExprIfFalse(tls, pParse, (*WhereTerm)(unsafe.Pointer(pT)).FpExpr, (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pT + 18)) |= U16(TERM_CODED) -__16: +__17: ; - goto __13 -__13: - ii++ - goto __12 goto __14 __14: + ii++ + goto __13 + goto __15 +__15: ; if !(int32(wctrlFlags)&WHERE_WANT_DISTINCT != 0) { - goto __17 + goto __18 } if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_DistinctOpt) != U32(0)) { - goto __18 + goto __19 } wctrlFlags = libc.Uint16FromInt32(int32(wctrlFlags) & libc.CplInt32(WHERE_WANT_DISTINCT)) - *(*U16)(unsafe.Pointer(pWInfo + 68)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) - goto __19 -__18: - if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+120, pResultSet) != 0) { - goto __20 + *(*U16)(unsafe.Pointer(pWInfo + 60)) &= libc.Uint16FromInt32(libc.CplInt32(WHERE_WANT_DISTINCT)) + goto __20 +__19: + if !(isDistinctRedundant(tls, pParse, pTabList, pWInfo+104, pResultSet) != 0) { + goto __21 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) - goto __21 -__20: + goto __22 +__21: if !(pOrderBy == uintptr(0)) { - goto __22 + goto __23 } - *(*U16)(unsafe.Pointer(pWInfo + 68)) |= U16(WHERE_DISTINCTBY) + *(*U16)(unsafe.Pointer(pWInfo + 60)) |= U16(WHERE_DISTINCTBY) (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy = pResultSet -__22: +__23: ; -__21: +__22: ; -__19: +__20: ; -__17: +__18: ; if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { - goto __23 + goto __24 } rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __24 + goto __25 } goto whereBeginError -__24: +__25: ; if !(int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8)).FbldFlags2)&SQLITE_BLDF2_2NDPASS != 0) { - goto __25 + goto __26 } -__26: +__27: if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops != 0) { - goto __27 + goto __28 } p = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops (*WhereInfo)(unsafe.Pointer(pWInfo)).FpLoops = (*WhereLoop)(unsafe.Pointer(p)).FpNextLoop whereLoopDelete(tls, db, p) - goto __26 -__27: + goto __27 +__28: ; rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { - goto __28 + goto __29 } goto whereBeginError -__28: +__29: ; -__25: +__26: ; wherePathSolver(tls, pWInfo, int16(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __29 + goto __30 } goto whereBeginError -__29: +__30: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0) { - goto __30 + goto __31 } wherePathSolver(tls, pWInfo, int16(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)+1)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __31 + goto __32 } goto whereBeginError -__31: +__32: ; -__30: +__31: ; -__23: +__24: ; if !((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReverseOrder) != uint64(0)) { - goto __32 + goto __33 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = libc.Uint64(libc.Uint64FromInt32(-1)) -__32: +__33: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __33 + goto __34 } goto whereBeginError -__33: +__34: ; notReady = libc.CplUint64(uint64(0)) if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && pResultSet != uintptr(0) && 0 == int32(wctrlFlags)&WHERE_AGG_DISTINCT && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_OmitNoopJoin) == U32(0)) { - goto __34 + goto __35 } notReady = whereOmitNoopJoin(tls, pWInfo, notReady) nTabList = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) -__34: +__35: ; if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BloomFilter) == U32(0)) { - goto __35 + goto __36 } whereCheckIfBloomFilterIsUseful(tls, pWInfo) -__35: +__36: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 200)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 208)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) if !(int32(wctrlFlags)&WHERE_ONEPASS_DESIRED != 0) { - goto __36 + goto __37 } - wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags) + wsFlags = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags) bOnerow = libc.Bool32(wsFlags&WHERE_ONEROW != 0) if !(bOnerow != 0 || 0 != int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW && !(int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabList+8)).FpTab)).FeTabType) == TABTYP_VTAB) && (0 == wsFlags&WHERE_MULTI_OR || int32(wctrlFlags)&WHERE_DUPLICATES_OK != 0)) { - goto __37 + goto __38 } (*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass = func() uint8 { if bOnerow != 0 { @@ -104724,26 +105488,26 @@ __35: return uint8(ONEPASS_MULTI) }() if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabList+8)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && wsFlags&WHERE_IDX_ONLY != 0) { - goto __38 + goto __39 } if !(int32(wctrlFlags)&WHERE_ONEPASS_MULTIROW != 0) { - goto __39 + goto __40 } bFordelete = U8(OPFLAG_FORDELETE) +__40: + ; + (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __39: ; - (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 872)).FpWLoop)).FwsFlags = U32(wsFlags & libc.CplInt32(WHERE_IDX_ONLY)) __38: ; __37: ; -__36: - ; ii = 0 - pLevel = pWInfo + 872 -__40: + pLevel = pWInfo + 856 +__41: if !(ii < nTabList) { - goto __42 + goto __43 } pTabItem = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 @@ -104751,37 +105515,37 @@ __40: iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) || int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { - goto __43 + goto __44 } - goto __44 -__43: + goto __45 +__44: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0)) { - goto __45 + goto __46 } pVTab = Xsqlite3GetVTable(tls, db, pTab) iCur = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor Xsqlite3VdbeAddOp4(tls, v, OP_VOpen, iCur, 0, 0, pVTab, -11) - goto __46 -__45: + goto __47 +__46: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { - goto __47 + goto __48 } - goto __48 -__47: + goto __49 +__48: if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IDX_ONLY) == U32(0) && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0 || int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&(JT_LTORJ|JT_RIGHT) != 0) { - goto __49 + goto __50 } op = OP_OpenRead if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __51 + goto __52 } op = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor -__51: + *(*int32)(unsafe.Pointer(pWInfo + 40)) = (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor +__52: ; Xsqlite3OpenTable(tls, pParse, (*SrcItem)(unsafe.Pointer(pTabItem)).FiCursor, iDb, pTab, op) @@ -104789,92 +105553,98 @@ __51: int32((*Table)(unsafe.Pointer(pTab)).FnCol) < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated|TF_WithoutRowid) == U32(0) && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) == U32(0)) { - goto __52 + goto __53 } b = (*SrcItem)(unsafe.Pointer(pTabItem)).FcolUsed n = 0 -__53: +__54: if !(b != 0) { - goto __55 + goto __56 } - goto __54 -__54: - b = b >> 1 - n++ - goto __53 goto __55 __55: + b = b >> 1 + n++ + goto __54 + goto __56 +__56: ; Xsqlite3VdbeChangeP4(tls, v, -1, uintptr(int64(n)), -3) -__52: +__53: ; Xsqlite3VdbeChangeP5(tls, v, uint16(bFordelete)) - goto __50 -__49: - Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) + goto __51 __50: + Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) +__51: ; -__48: +__49: ; -__46: +__47: ; -__44: +__45: ; if !((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_INDEXED) != 0) { - goto __56 + goto __57 } pIx = *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) op1 = OP_OpenRead if !(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0xc000>>14) == SQLITE_IDXTYPE_PRIMARYKEY && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __57 + goto __58 } iIndexCur = (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur op1 = 0 - goto __58 -__57: + goto __59 +__58: if !(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) != ONEPASS_OFF) { - goto __59 + goto __60 } pJ = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FpIndex iIndexCur = iAuxArg -__61: +__62: if !(pJ != 0 && pJ != pIx) { - goto __62 + goto __63 } iIndexCur++ pJ = (*Index)(unsafe.Pointer(pJ)).FpNext - goto __61 -__62: + goto __62 +__63: ; op1 = OP_OpenWrite - *(*int32)(unsafe.Pointer(pWInfo + 48 + 1*4)) = iIndexCur - goto __60 -__59: + *(*int32)(unsafe.Pointer(pWInfo + 40 + 1*4)) = iIndexCur + goto __61 +__60: if !(iAuxArg != 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE != 0) { - goto __63 + goto __64 } iIndexCur = iAuxArg op1 = OP_ReopenIdx - goto __64 -__63: - iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + goto __65 __64: + iIndexCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + if !(uint32(int32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x10>>4)) != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_IndexedExpr) == U32(0)) { + goto __66 + } + whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) +__66: ; -__60: +__65: ; -__58: +__61: + ; +__59: ; (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = iIndexCur if !(op1 != 0) { - goto __65 + goto __67 } Xsqlite3VdbeAddOp3(tls, v, op1, iIndexCur, int32((*Index)(unsafe.Pointer(pIx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIx) @@ -104884,24 +105654,24 @@ __58: (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IN_SEEKSCAN) == U32(0) && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_ORDERBY_MIN == 0 && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) != WHERE_DISTINCT_ORDERED) { - goto __66 + goto __68 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SEEKEQ)) -__66: +__68: ; -__65: +__67: ; -__56: +__57: ; if !(iDb >= 0) { - goto __67 + goto __69 } Xsqlite3CodeVerifySchema(tls, pParse, iDb) -__67: +__69: ; if !(int32((*SrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&JT_RIGHT != 0 && libc.AssignPtrUintptr(pLevel+48, Xsqlite3WhereMalloc(tls, pWInfo, uint64(unsafe.Sizeof(WhereRightJoin{})))) != uintptr(0)) { - goto __68 + goto __70 } pRJ = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -104911,96 +105681,96 @@ __67: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __69 + goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, 1) pInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, 1, 0) if !(pInfo != 0) { - goto __71 + goto __73 } *(*uintptr)(unsafe.Pointer(pInfo + 32)) = uintptr(0) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags)) = U8(0) Xsqlite3VdbeAppendP4(tls, v, pInfo, -8) -__71: +__73: ; - goto __70 -__69: + goto __72 +__71: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*WhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) -__70: +__72: ; *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) (*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat = int8(0) (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNORDERED) -__68: +__70: ; - goto __41 -__41: - ii++ - pLevel += 104 - goto __40 goto __42 __42: + ii++ + pLevel += 104 + goto __41 + goto __43 +__43: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiTop = Xsqlite3VdbeCurrentAddr(tls, v) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __72 + goto __74 } goto whereBeginError -__72: +__74: ; ii = 0 -__73: +__75: if !(ii < nTabList) { - goto __75 + goto __77 } if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { - goto __76 + goto __78 } goto whereBeginError -__76: +__78: ; - pLevel = pWInfo + 872 + uintptr(ii)*104 + pLevel = pWInfo + 856 + uintptr(ii)*104 wsFlags1 = int32((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags) pSrc = pTabList + 8 + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104 if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x800>>11)) != 0) { - goto __77 + goto __79 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 + 4))&0x1000>>12)) != 0) { - goto __78 + goto __80 } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) - goto __79 -__78: + goto __81 +__80: iOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SrcItem)(unsafe.Pointer(pSrc)).FregReturn, (*SrcItem)(unsafe.Pointer(pSrc)).FaddrFillSub) Xsqlite3VdbeJumpHere(tls, v, iOnce) -__79: +__81: ; -__77: +__79: ; if !(wsFlags1&(WHERE_AUTO_INDEX|WHERE_BLOOMFILTER) != 0) { - goto __80 + goto __82 } if !(wsFlags1&WHERE_AUTO_INDEX != 0) { - goto __81 + goto __83 } - constructAutomaticIndex(tls, pParse, pWInfo+120, + constructAutomaticIndex(tls, pParse, pWInfo+104, pTabList+8+uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*104, notReady, pLevel) - goto __82 -__81: + goto __84 +__83: sqlite3ConstructBloomFilter(tls, pWInfo, ii, pLevel, notReady) -__82: +__84: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __83 + goto __85 } goto whereBeginError -__83: +__85: ; -__80: +__82: ; addrExplain = Xsqlite3WhereExplainOneScan(tls, pParse, pTabList, pLevel, wctrlFlags) @@ -105008,30 +105778,28 @@ __80: notReady = Xsqlite3WhereCodeOneLoopStart(tls, pParse, v, pWInfo, ii, pLevel, notReady) (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont if !(wsFlags1&WHERE_MULTI_OR == 0 && int32(wctrlFlags)&WHERE_OR_SUBCLAUSE == 0) { - goto __84 + goto __86 } _ = addrExplain -__84: +__86: ; - goto __74 -__74: + goto __76 +__76: ii++ - goto __73 goto __75 -__75: + goto __77 +__77: ; (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere = Xsqlite3VdbeCurrentAddr(tls, v) return pWInfo whereBeginError: if !(pWInfo != 0) { - goto __85 + goto __87 } - - whereUndoExprMods(tls, pWInfo) (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) whereInfoFree(tls, db, pWInfo) -__85: +__87: ; return uintptr(0) } @@ -105051,7 +105819,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { for i = int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1; i >= 0; i-- { var addr int32 - pLevel = pWInfo + 872 + uintptr(i)*104 + pLevel = pWInfo + 856 + uintptr(i)*104 if (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ != 0 { var pRJ uintptr = (*WhereLevel)(unsafe.Pointer(pLevel)).FpRJ Xsqlite3VdbeResolveLabel(tls, v, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrCont) @@ -105187,11 +105955,8 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } - if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { - whereUndoExprMods(tls, pWInfo) - } i = 0 - pLevel = pWInfo + 872 + pLevel = pWInfo + 856 __4: if !(i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel)) { goto __6 @@ -105230,6 +105995,16 @@ __4: } else { last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } + if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x10>>4)) != 0 { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + for p != 0 { + if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { + (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 + (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur = -1 + } + p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext + } + } k = (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody + 1 pOp = Xsqlite3VdbeGetOp(tls, v, k) pLastOp = pOp + uintptr(last-k)*24 @@ -105402,7 +106177,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21912, -1) + pCtx, ts+22007, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105535,7 +106310,7 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21968, -1) + pCtx, ts+22063, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105625,17 +106400,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22013)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22024)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22035)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22040)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22053)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22063)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22069)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22080)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22090)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22102)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22107)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22108)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22119)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22130)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22135)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22148)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22158)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22164)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22175)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22185)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22197)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22202)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105681,7 +106456,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22111, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22206, libc.VaList(bp, zName)) } return p } @@ -105725,12 +106500,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+22130, 0) + ts+22225, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22201, 0) + ts+22296, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105753,7 +106528,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*24)).FeEnd) (*Window)(unsafe.Pointer(pWin)).FeExclude = U8(0) if int32((*Window)(unsafe.Pointer(pWin)).FeStart) == TK_FOLLOWING { - (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7864) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7878) } break } @@ -105923,7 +106698,6 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui for i = 0; i < (*ExprList)(unsafe.Pointer(pAppend)).FnExpr; i++ { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pDup uintptr = Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer(pAppend+8+uintptr(i)*32)).FpExpr, 0) - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pDup) break @@ -105960,7 +106734,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+22264, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22359, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -106076,7 +106850,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 48)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7456)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7470)) } pSub = Xsqlite3SelectNew(tls, @@ -106190,7 +106964,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22290, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22385, 0) goto windowAllocErr __2: ; @@ -106255,15 +107029,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22322 + zErr = ts + 22417 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22339 + zErr = ts + 22434 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22355 + zErr = ts + 22450 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22375, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22470, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -106284,7 +107058,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22408, 0) + ts+22503, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106422,7 +107196,7 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regZero) if eCond >= WINDOW_STARTING_NUM { var regString int32 = Xsqlite3GetTempReg(tls, pParse) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -106440,11 +107214,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22455, - ts + 22508, - ts + 21912, - ts + 22559, - ts + 22611, + ts + 22550, + ts + 22603, + ts + 22007, + ts + 22654, + ts + 22706, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106925,13 +107699,17 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) Xsqlite3VdbeJumpHere(tls, v, addr) - Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl) - if op == OP_Gt || op == OP_Ge { - Xsqlite3VdbeChangeP2(tls, v, -1, addrDone) - } + Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, + func() int32 { + if op == OP_Gt || op == OP_Ge { + return addrDone + } + return lbl + }()) + } - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1534, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1554, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -107839,19 +108617,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22661, + Xsqlite3ErrorMsg(tls, pParse, ts+22756, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19655 + return ts + 19750 } - return ts + 22703 + return ts + 22798 }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22709, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22804, 0) } } @@ -107919,7 +108697,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22743, + Xsqlite3ErrorMsg(tls, pParse, ts+22838, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -109016,7 +109794,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22781, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22876, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109991,21 +110769,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16204, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16251, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16117, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+8)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8)).Fz, ts+16164, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22803, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22898, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 8)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -110748,7 +111526,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8)), yymsp+libc.UintptrFromInt32(-4)*24+8) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22830) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22925) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110912,7 +111690,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 128)) = *(*Token)(unsafe.Pointer(yymsp + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp+32, bp+128)) *(*uintptr)(unsafe.Pointer(yymsp + 8)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111129,9 +111907,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8)) != 0 { - return ts + 6690 + return ts + 6704 } - return ts + 6695 + return ts + 6709 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -111410,19 +112188,19 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in { *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)) = *(*Token)(unsafe.Pointer(yymsp + 8)) Xsqlite3ErrorMsg(tls, pParse, - ts+22863, 0) + ts+22958, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+22958, 0) + ts+23053, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23042, 0) + ts+23137, 0) } break case uint32(273): @@ -111801,9 +112579,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22839, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22934, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23127, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23222, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112571,7 +113349,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 2464)).Fz = zSql (*Token)(unsafe.Pointer(bp + 2464)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23144, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23239, libc.VaList(bp, bp+2464)) break } } @@ -112592,9 +113370,9 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg != 0 || (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_DONE { if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { - (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3649, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3663, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23169, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23264, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112607,7 +113385,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) } if (*Parse)(unsafe.Pointer(pParse)).FpVList != 0 { - Xsqlite3DbFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) + Xsqlite3DbNNFreeNN(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList) } (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParentParse @@ -112767,7 +113545,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23180, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112780,11 +113558,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19775, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19870, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23187, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23282, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23192, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23287, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112797,9 +113575,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23202, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23297, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23206, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23301, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -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)<<n - 1) << ofst) + *(*U32)(unsafe.Pointer(pRbu + 332)) |= U32((int32(1)<<n - 1) << ofst) } } } @@ -128616,7 +129425,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags if (*Rbu_file)(unsafe.Pointer(pDb)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL { var nOpen Size_t if (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FzTarget == uintptr(0) { - zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6367) + zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6381) zOpen = Xsqlite3_filename_wal(tls, zOpen) } nOpen = libc.Xstrlen(tls, zOpen) @@ -128631,14 +129440,14 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32171, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32267, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) } if rc == SQLITE_OK { rc = (*struct { - f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 + f func(*libc.TLS, uintptr, Sqlite3_filename, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxOpen})).f(tls, pRealVfs, zOpen, (*Rbu_file)(unsafe.Pointer(pFd)).FpReal, oflags, pOutFlags) } if (*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pFd)).FpReal)).FpMethods != 0 { @@ -129435,13 +130244,13 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11272, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11286, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { zPragma = Xsqlite3_mprintf(tls, - ts+32182, 0) + ts+32278, 0) } else if rc == SQLITE_ERROR { - zPragma = Xsqlite3_mprintf(tls, ts+1534, 0) + zPragma = Xsqlite3_mprintf(tls, ts+1554, 0) } else { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0) @@ -129452,7 +130261,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32303, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32399, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -129550,7 +130359,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { break } } - if 0 == Xsqlite3_stricmp(tls, ts+11272, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11286, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -129799,7 +130608,7 @@ __4: goto error_out __7: ; - Xsqlite3ValueSetStr(tls, p, 0, ts+1534, uint8(0), uintptr(0)) + Xsqlite3ValueSetStr(tls, p, 0, ts+1554, uint8(0), uintptr(0)) (*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob = p __6: ; @@ -130123,14 +130932,14 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, defer tls.Free(64) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 var zRet uintptr = uintptr(0) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32332, + zRet = Xsqlite3_mprintf(tls, ts+32428, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 21369 + zSep = ts + 21464 if zRet == uintptr(0) { break } @@ -130145,7 +130954,7 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp defer tls.Free(64) var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 var zRet uintptr = uintptr(0) var bHave int32 = 0 @@ -130153,9 +130962,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32366, + ts+32462, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = ts + 32407 + zSep = ts + 32503 if zRet == uintptr(0) { break } @@ -130163,7 +130972,7 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp } if bHave == 0 { - zRet = Xsqlite3_mprintf(tls, ts+7456, 0) + zRet = Xsqlite3_mprintf(tls, ts+7470, 0) } return zRet @@ -130174,7 +130983,7 @@ func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32412, + ts+32508, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } @@ -130217,7 +131026,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32490, + ts+32586, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -130344,7 +131153,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32543, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32639, 0) __16: ; rc = SQLITE_SCHEMA @@ -130609,7 +131418,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { bp := tls.Alloc(32) defer tls.Free(32) - Xsqlite3_snprintf(tls, int32(uint64(unsafe.Sizeof([24]uint8{}))-uint64(1)), bp+8, ts+4961, libc.VaList(bp, iVal)) + Xsqlite3_snprintf(tls, int32(uint64(unsafe.Sizeof([24]uint8{}))-uint64(1)), bp+8, ts+4975, libc.VaList(bp, iVal)) sessionAppendStr(tls, p, bp+8, pRc) } @@ -130818,29 +131627,29 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11272, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11286, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32570, libc.VaList(bp, zDb)) + ts+32666, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_NOMEM } } else { var i int32 - var zSep uintptr = ts + 1534 + var zSep uintptr = ts + 1554 *(*SessionBuffer)(unsafe.Pointer(bp + 8)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32680, bp+24) + sessionAppendStr(tls, bp+8, ts+32776, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) - sessionAppendStr(tls, bp+8, ts+1547, bp+24) + sessionAppendStr(tls, bp+8, ts+1567, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32695, bp+24) + sessionAppendStr(tls, bp+8, ts+32791, bp+24) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+24) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24) - sessionAppendStr(tls, bp+8, ts+32703, bp+24) + sessionAppendStr(tls, bp+8, ts+32799, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21369 + zSep = ts + 21464 } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8)).FaBuf @@ -130949,7 +131758,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32709, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32805, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40)) } @@ -131041,7 +131850,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24)).FaBuf) - Xsqlite3_exec(tls, db, ts+32729, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32825, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40)) } @@ -131304,7 +132113,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 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<expr>\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<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\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<expr>\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<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\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 |