diff options
author | Wim <wim@42.be> | 2023-03-09 22:48:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 22:48:00 +0100 |
commit | 08779c29099e8940493df56d28d8aa131ac8342e (patch) | |
tree | 7ad8ce25cf371e582137e1706dd671a6bf4342d0 /vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go | |
parent | d5f9cdf912d43cd2a5cb243e086fbdab9a9073b0 (diff) | |
download | matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.tar.gz matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.tar.bz2 matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.zip |
Update dependencies (#2007)
* Update dependencies
Diffstat (limited to 'vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go')
-rw-r--r-- | vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go | 13041 |
1 files changed, 7007 insertions, 6034 deletions
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go b/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go index a9532862..f29d76ae 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-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. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_openbsd_arm64.go -trace-translation-units testdata/sqlite-amalgamation-3410000/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 @@ -398,6 +398,7 @@ const ( FTS5_LCP = 7 FTS5_LP = 10 FTS5_MAIN_PREFIX = 48 + FTS5_MAX_LEVEL = 64 FTS5_MAX_PAGE_SIZE = 65536 FTS5_MAX_PREFIX_INDEXES = 31 FTS5_MAX_SEGMENT = 2000 @@ -488,6 +489,7 @@ const ( HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 + HAVE_FCHMOD = 0 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 @@ -725,6 +727,7 @@ const ( OPFLG_IN2 = 0x04 OPFLG_IN3 = 0x08 OPFLG_JUMP = 0x01 + OPFLG_NCYCLE = 0x40 OPFLG_OUT2 = 0x10 OPFLG_OUT3 = 0x20 OP_Abortable = 186 @@ -1197,6 +1200,7 @@ const ( SF_Resolved = 0x0000004 SF_SETTABLE = 0xffff0000 SF_UFSrcCheck = 0x0800000 + SF_UpdateFrom = 0x10000000 SF_UsesEphemeral = 0x0000020 SF_Values = 0x0000200 SF_View = 0x0200000 @@ -1228,6 +1232,7 @@ const ( SQLITE_ACCESS_READ = 2 SQLITE_ACCESS_READWRITE = 1 SQLITE_AFF_BLOB = 0x41 + SQLITE_AFF_FLEXNUM = 0x46 SQLITE_AFF_INTEGER = 0x44 SQLITE_AFF_MASK = 0x47 SQLITE_AFF_NONE = 0x40 @@ -1346,6 +1351,7 @@ const ( SQLITE_CacheSpill = 0x00000020 SQLITE_CellSizeCk = 0x00200000 SQLITE_CkptFullFSync = 0x00000010 + SQLITE_Coroutines = 0x02000000 SQLITE_CountOfView = 0x00000200 SQLITE_CoverIdxScan = 0x00000020 SQLITE_CursorHints = 0x00000400 @@ -1712,6 +1718,7 @@ const ( SQLITE_NOTADB = 26 SQLITE_NOTFOUND = 12 SQLITE_NOTICE = 27 + SQLITE_NOTICE_RBU = 795 SQLITE_NOTICE_RECOVER_ROLLBACK = 539 SQLITE_NOTICE_RECOVER_WAL = 283 SQLITE_NOTNULL = 0x90 @@ -1808,11 +1815,14 @@ const ( SQLITE_ResetDatabase = 0x02000000 SQLITE_ReverseOrder = 0x00001000 SQLITE_SAVEPOINT = 32 + SQLITE_SCANSTAT_COMPLEX = 0x0001 SQLITE_SCANSTAT_EST = 2 SQLITE_SCANSTAT_EXPLAIN = 4 SQLITE_SCANSTAT_NAME = 3 + SQLITE_SCANSTAT_NCYCLE = 7 SQLITE_SCANSTAT_NLOOP = 0 SQLITE_SCANSTAT_NVISIT = 1 + SQLITE_SCANSTAT_PARENTID = 6 SQLITE_SCANSTAT_SELECTID = 5 SQLITE_SCHEMA = 17 SQLITE_SELECT = 21 @@ -1827,7 +1837,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24" + SQLITE_SOURCE_ID = "2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -1935,8 +1945,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.40.1" - SQLITE_VERSION_NUMBER = 3040001 + SQLITE_VERSION = "3.41.0" + SQLITE_VERSION_NUMBER = 3041000 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -2332,6 +2342,7 @@ const ( WHERE_DISTINCT_UNIQUE = 1 WHERE_DISTINCT_UNORDERED = 3 WHERE_DUPLICATES_OK = 0x0010 + WHERE_EXPRIDX = 0x04000000 WHERE_GROUPBY = 0x0040 WHERE_IDX_ONLY = 0x00000040 WHERE_INDEXED = 0x00000200 @@ -3452,6 +3463,7 @@ type sqlite3_api_routines = struct { Fserialize uintptr Fdb_name uintptr Fvalue_encoding uintptr + Fis_interrupted uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4880,10 +4892,8 @@ type U8 = uint8 type I8 = int8 // The datatype used to store estimates of the number of rows in a -// table or index. This is an unsigned integer type. For 99.9% of -// the world, a 32-bit integer is sufficient. But a 64-bit integer -// can be used at compile-time if desired. -type TRowcnt = U32 +// table or index. +type TRowcnt = U64 // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -4939,12 +4949,10 @@ type BusyHandler = BusyHandler1 type AggInfo1 = struct { FdirectMode U8 FuseSortingIdx U8 - F__ccgo_pad1 [2]byte + FnSortingColumn U16 FsortingIdx int32 FsortingIdxPTab int32 - FnSortingColumn int32 - FmnReg int32 - FmxReg int32 + FiFirstReg int32 FpGroupBy uintptr FaCol uintptr FnColumn int32 @@ -5196,7 +5204,6 @@ type Index1 = struct { FaSample uintptr FaiRowEst uintptr FnRowEst0 TRowcnt - F__ccgo_pad3 [4]byte FcolNotIdxed Bitmask } @@ -5317,7 +5324,7 @@ type Parse1 = struct { F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr - FpIdxExpr uintptr + FpIdxEpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5341,11 +5348,13 @@ type Parse1 = struct { FnQueryLoop U32 Foldmask U32 Fnewmask U32 + FnProgressSteps U32 FeTriggerOp U8 FbReturning U8 FeOrconf U8 FdisableTriggers U8 FaTempReg [8]int32 + F__ccgo_pad4 [4]byte FpOuterParse uintptr FsNameToken Token FsLastToken Token @@ -5353,11 +5362,11 @@ type Parse1 = struct { FiPkSortOrder U8 Fexplain U8 FeParseMode U8 - F__ccgo_pad4 [3]byte + F__ccgo_pad5 [3]byte FnVtabLock int32 FnHeight int32 FaddrExplain int32 - F__ccgo_pad5 [4]byte + F__ccgo_pad6 [4]byte FpVList uintptr FpReprepare uintptr FzTail uintptr @@ -5989,7 +5998,7 @@ type Vdbe1 = struct { FnOp int32 FnOpAlloc int32 FaColName uintptr - FpResultSet uintptr + FpResultRow uintptr FzErrMsg uintptr FpVList uintptr FstartTime I64 @@ -6127,10 +6136,8 @@ type AggInfo_col = struct { FpTab uintptr FpCExpr uintptr FiTable int32 - FiMem int32 FiColumn I16 FiSorterColumn I16 - F__ccgo_pad1 [4]byte } // An instance of this structure contains information needed to generate @@ -6145,12 +6152,10 @@ type AggInfo_col = struct { // original Select structure that describes the SELECT statement. These // fields do not need to be freed when deallocating the AggInfo structure. type AggInfo_func = struct { - FpFExpr uintptr - FpFunc uintptr - FiMem int32 - FiDistinct int32 - FiDistAddr int32 - F__ccgo_pad1 [4]byte + FpFExpr uintptr + FpFunc uintptr + FiDistinct int32 + FiDistAddr int32 } // The datatype ynVar is a signed integer, either 16-bit or 32-bit. @@ -6340,10 +6345,12 @@ type RenameCtx1 = struct { } // Context pointer passed down through the tree-walk. -type CoveringIndexCheck = struct { +type CoveringIndexCheck1 = struct { FpIdx uintptr FiTabCur int32 - F__ccgo_pad1 [4]byte + FbExpr U8 + FbUnidx U8 + F__ccgo_pad1 [2]byte } var sqlite3azCompileOpt = [52]uintptr{ @@ -6546,7 +6553,7 @@ var Xsqlite3WhereTrace U32 = U32(0) // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(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)} +var Xsqlite3OpcodeProperty = [187]uint8{uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x41), 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(0x49), uint8(0x49), uint8(0x49), uint8(0x49), uint8(0x01), uint8(0x49), uint8(0x49), uint8(0x49), uint8(0x49), uint8(0x49), uint8(0x49), uint8(0x41), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x41), uint8(0x01), uint8(0x41), uint8(0x41), uint8(0x41), uint8(0x41), uint8(0x41), uint8(0x26), uint8(0x26), uint8(0x41), 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(0x41), 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(0x40), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x40), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x40), uint8(0x00), uint8(0x12), uint8(0x40), uint8(0x40), uint8(0x10), uint8(0x40), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x40), uint8(0x00), uint8(0x40), uint8(0x40), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x50), uint8(0x00), uint8(0x40), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x40), uint8(0x50), uint8(0x40), 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(0x40), uint8(0x50), uint8(0x40), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x02), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} // Name of the default collating sequence var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1083)) @@ -6698,7 +6705,6 @@ type VdbeFrame1 = struct { Fv uintptr FpParent uintptr FaOp uintptr - FanExec uintptr FaMem uintptr FapCsr uintptr FaOnce uintptr @@ -6747,8 +6753,18 @@ type Bft = uint32 // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. +// +// aAddrRange[]: +// +// This array is used by ScanStatus elements associated with EQP +// notes that make an SQLITE_SCANSTAT_NCYCLE value available. It is +// an array of up to 3 ranges of VM addresses for which the Vdbe.anCycle[] +// values should be summed to calculate the NCYCLE value. Each pair of +// integer addresses is a start and end address (both inclusive) for a range +// instructions. A start value of 0 indicates an empty range. type ScanStatus1 = struct { FaddrExplain int32 + FaAddrRange [6]int32 FaddrLoop int32 FaddrVisit int32 FiSelectID int32 @@ -6759,6 +6775,15 @@ type ScanStatus1 = struct { // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. +// +// aAddrRange[]: +// +// This array is used by ScanStatus elements associated with EQP +// notes that make an SQLITE_SCANSTAT_NCYCLE value available. It is +// an array of up to 3 ranges of VM addresses for which the Vdbe.anCycle[] +// values should be summed to calculate the NCYCLE value. Each pair of +// integer addresses is a start and end address (both inclusive) for a range +// instructions. A start value of 0 indicates an empty range. type ScanStatus = ScanStatus1 // The DblquoteStr object holds the text of a double-quoted @@ -6875,7 +6900,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, 23140) + return Xsqlite3MisuseError(tls, 23229) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7690,14 +7715,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i var iOrigJD I64 var iGuess I64 var cnt int32 = 0 - var iErr int32 + var iErr I64 computeJD(tls, p) iGuess = libc.AssignInt64(&iOrigJD, (*DateTime)(unsafe.Pointer(p)).FiJD) - iErr = 0 + iErr = int64(0) for __ccgo := true; __ccgo; __ccgo = iErr != 0 && libc.PostIncInt32(&cnt, 1) < 3 { libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(DateTime{}))) - iGuess = iGuess - I64(iErr) + iGuess = iGuess - iErr (*DateTime)(unsafe.Pointer(bp)).FiJD = iGuess (*DateTime)(unsafe.Pointer(bp)).FvalidJD = int8(1) rc = toLocaltime(tls, bp, pCtx) @@ -7705,7 +7730,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, i return rc } computeJD(tls, bp) - iErr = int32((*DateTime)(unsafe.Pointer(bp)).FiJD - iOrigJD) + iErr = (*DateTime)(unsafe.Pointer(bp)).FiJD - iOrigJD } libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FiJD = iGuess @@ -9513,7 +9538,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) zStart++ } n = int32((int64(zEnd) - int64(zStart)) / 1) - for n > 0 && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart + uintptr(n-1))))])&0x01 != 0 { + for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart + uintptr(n-1))))])&0x01 != 0 { n-- } return Xsqlite3DbStrNDup(tls, db, zStart, uint64(n)) @@ -9769,6 +9794,8 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis var i int32 var nPad int32 var ch uint32 + var nCopyBytes I64 + var nPrior I64 var z uintptr @@ -10759,6 +10786,7 @@ __180: if !(precision > 1) { goto __192 } + nPrior = int64(1) width = width - (precision - 1) if !(width > 1 && !(flag_leftjustify != 0)) { goto __193 @@ -10767,11 +10795,35 @@ __180: width = 0 __193: ; + Xsqlite3_str_append(tls, pAccum, bp+16, length) + precision-- __194: - if !(libc.PostDecInt32(&precision, 1) > 1) { + if !(precision > 1) { goto __195 } - Xsqlite3_str_append(tls, pAccum, bp+16, length) + if !(nPrior > I64(precision-1)) { + goto __196 + } + nPrior = I64(precision - 1) +__196: + ; + nCopyBytes = I64(length) * nPrior + if !(nCopyBytes+I64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar) >= I64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnAlloc)) { + goto __197 + } + Xsqlite3StrAccumEnlarge(tls, pAccum, nCopyBytes) +__197: + ; + if !((*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0) { + goto __198 + } + goto __195 +__198: + ; + Xsqlite3_str_append(tls, pAccum, + (*Sqlite3_str)(unsafe.Pointer(pAccum)).FzText+uintptr(I64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar)-nCopyBytes), int32(nCopyBytes)) + precision = int32(I64(precision) - nPrior) + nPrior = nPrior * int64(2) goto __194 __195: ; @@ -10783,30 +10835,30 @@ __192: __69: __70: if !(bArgList != 0) { - goto __196 + goto __199 } bufpt = getTextArg(tls, pArgList) xtype = EtByte(EtSTRING) - goto __197 -__196: + goto __200 +__199: bufpt = libc.VaUintptr(&ap) -__197: +__200: ; if !(bufpt == uintptr(0)) { - goto __198 + goto __201 } bufpt = ts + 1538 - goto __199 -__198: + goto __202 +__201: if !(int32(xtype) == EtDYNSTRING) { - goto __200 + goto __203 } if !((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar == U32(0) && (*Sqlite3_str)(unsafe.Pointer(pAccum)).FmxAlloc != 0 && width == 0 && precision < 0 && int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError) == 0) { - goto __201 + goto __204 } (*Sqlite3_str)(unsafe.Pointer(pAccum)).FzText = bufpt @@ -10815,83 +10867,83 @@ __198: *(*U8)(unsafe.Pointer(pAccum + 29)) |= U8(SQLITE_PRINTF_MALLOCED) length = 0 goto __58 -__201: +__204: ; zExtra = bufpt -__200: +__203: ; -__199: +__202: ; if !(precision >= 0) { - goto __202 + goto __205 } if !(flag_altform2 != 0) { - goto __204 + goto __207 } z = bufpt -__206: +__209: if !(libc.PostDecInt32(&precision, 1) > 0 && *(*uint8)(unsafe.Pointer(z)) != 0) { - goto __207 + goto __210 } if !(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0) { - goto __208 + goto __211 } -__209: +__212: if !(int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80) { - goto __210 + goto __213 } z++ - goto __209 -__210: + goto __212 +__213: ; -__208: +__211: ; - goto __206 -__207: + goto __209 +__210: ; length = int32((int64(z) - int64(bufpt)) / 1) - goto __205 -__204: + goto __208 +__207: length = 0 -__211: +__214: if !(length < precision && *(*int8)(unsafe.Pointer(bufpt + uintptr(length))) != 0) { - goto __213 + goto __216 } - goto __212 -__212: + goto __215 +__215: length++ - goto __211 - goto __213 -__213: + goto __214 + goto __216 +__216: ; -__205: +__208: ; - goto __203 -__202: + goto __206 +__205: length = 0x7fffffff & int32(libc.Xstrlen(tls, bufpt)) -__203: +__206: ; adjust_width_for_utf8: if !(flag_altform2 != 0 && width > 0) { - goto __214 + goto __217 } ii = length - 1 -__215: +__218: if !(ii >= 0) { - goto __216 + goto __219 } if !(int32(*(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostDecInt32(&ii, 1)))))&0xc0 == 0x80) { - goto __217 + goto __220 } width++ -__217: +__220: ; - goto __215 -__216: + goto __218 +__219: ; -__214: +__217: ; goto __58 __71: @@ -10905,17 +10957,17 @@ __73: }() if !(bArgList != 0) { - goto __218 + goto __221 } escarg = getTextArg(tls, pArgList) - goto __219 -__218: + goto __222 +__221: escarg = libc.VaUintptr(&ap) -__219: +__222: ; isnull = libc.Bool32(escarg == uintptr(0)) if !(isnull != 0) { - goto __220 + goto __223 } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { @@ -10923,90 +10975,90 @@ __219: } return ts + 1544 }() -__220: +__223: ; k = I64(precision) i1 = libc.AssignInt64(&n1, int64(0)) -__221: +__224: if !(k != int64(0) && int32(libc.AssignInt8(&ch1, *(*int8)(unsafe.Pointer(escarg + uintptr(i1))))) != 0) { - goto __223 + goto __226 } if !(int32(ch1) == int32(q)) { - goto __224 + goto __227 } n1++ -__224: +__227: ; if !(flag_altform2 != 0 && int32(ch1)&0xc0 == 0xc0) { - goto __225 + goto __228 } -__226: +__229: if !(int32(*(*int8)(unsafe.Pointer(escarg + uintptr(i1+int64(1)))))&0xc0 == 0x80) { - goto __227 + goto __230 } i1++ - goto __226 -__227: + goto __229 +__230: ; -__225: +__228: ; - goto __222 -__222: + goto __225 +__225: i1++ k-- - goto __221 - goto __223 -__223: + goto __224 + goto __226 +__226: ; needQuote = libc.Bool32(!(isnull != 0) && int32(xtype) == EtSQLESCAPE2) n1 = n1 + (i1 + int64(3)) if !(n1 > int64(SQLITE_PRINT_BUF_SIZE)) { - goto __228 + goto __231 } bufpt = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, n1)) if !(bufpt == uintptr(0)) { - goto __230 + goto __233 } return -__230: +__233: ; - goto __229 -__228: + goto __232 +__231: bufpt = bp + 16 -__229: +__232: ; j = int64(0) if !(needQuote != 0) { - goto __231 + goto __234 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt64(&j, 1)))) = q -__231: +__234: ; k = i1 i1 = int64(0) -__232: +__235: if !(i1 < k) { - goto __234 + goto __237 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt64(&j, 1)))) = libc.AssignInt8(&ch1, *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))) if !(int32(ch1) == int32(q)) { - goto __235 + goto __238 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt64(&j, 1)))) = ch1 -__235: +__238: ; - goto __233 -__233: + goto __236 +__236: i1++ - goto __232 - goto __234 -__234: + goto __235 + goto __237 +__237: ; if !(needQuote != 0) { - goto __236 + goto __239 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt64(&j, 1)))) = q -__236: +__239: ; *(*int8)(unsafe.Pointer(bufpt + uintptr(j))) = int8(0) length = int32(j) @@ -11014,89 +11066,89 @@ __236: __74: if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_INTERNAL == 0) { - goto __237 + goto __240 } return -__237: +__240: ; if !(flag_alternateform != 0) { - goto __238 + goto __241 } pExpr = libc.VaUintptr(&ap) if !(pExpr != 0 && !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0))) { - goto __240 + goto __243 } Xsqlite3_str_appendall(tls, pAccum, *(*uintptr)(unsafe.Pointer(pExpr + 8))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, pExpr) -__240: +__243: ; - goto __239 -__238: + goto __242 +__241: pToken = libc.VaUintptr(&ap) if !(pToken != 0 && (*Token)(unsafe.Pointer(pToken)).Fn != 0) { - goto __241 + goto __244 } Xsqlite3_str_append(tls, pAccum, (*Token)(unsafe.Pointer(pToken)).Fz, int32((*Token)(unsafe.Pointer(pToken)).Fn)) Xsqlite3RecordErrorByteOffset(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, (*Token)(unsafe.Pointer(pToken)).Fz) -__241: +__244: ; -__239: +__242: ; length = libc.AssignInt32(&width, 0) goto __58 __75: if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_INTERNAL == 0) { - goto __242 + goto __245 } return -__242: +__245: ; pItem = libc.VaUintptr(&ap) if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 && !(flag_altform2 != 0)) { - goto __243 + goto __246 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) - goto __244 -__243: + goto __247 +__246: if !((*SrcItem)(unsafe.Pointer(pItem)).FzName != 0) { - goto __245 + goto __248 } if !((*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0) { - goto __247 + goto __250 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) Xsqlite3_str_append(tls, pAccum, ts+1551, 1) -__247: +__250: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) - goto __246 -__245: + goto __249 +__248: if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) { - goto __248 + goto __251 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) - goto __249 -__248: + goto __252 +__251: pSel = (*SrcItem)(unsafe.Pointer(pItem)).FpSelect if !((*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_NestedFrom) != 0) { - goto __250 + goto __253 } Xsqlite3_str_appendf(tls, pAccum, ts+1553, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) - goto __251 -__250: + goto __254 +__253: Xsqlite3_str_appendf(tls, pAccum, ts+1563, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) -__251: +__254: ; -__249: +__252: ; -__246: +__249: ; -__244: +__247: ; length = libc.AssignInt32(&width, 0) goto __58 @@ -11109,32 +11161,32 @@ __58: ; width = width - length if !(width > 0) { - goto __252 + goto __255 } if !!(flag_leftjustify != 0) { - goto __254 + goto __257 } Xsqlite3_str_appendchar(tls, pAccum, width, int8(' ')) -__254: +__257: ; Xsqlite3_str_append(tls, pAccum, bufpt, length) if !(flag_leftjustify != 0) { - goto __255 + goto __258 } Xsqlite3_str_appendchar(tls, pAccum, width, int8(' ')) -__255: +__258: ; - goto __253 -__252: + goto __256 +__255: Xsqlite3_str_append(tls, pAccum, bufpt, length) -__253: +__256: ; if !(zExtra != 0) { - goto __256 + goto __259 } Xsqlite3DbFree(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, zExtra) zExtra = uintptr(0) -__256: +__259: ; goto __4 __4: @@ -11193,7 +11245,7 @@ func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { +func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N I64) int32 { var zNew uintptr if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -11209,8 +11261,7 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { } else { zOld = uintptr(0) } - var szNew I64 = I64((*StrAccum)(unsafe.Pointer(p)).FnChar) - szNew = szNew + (Sqlite3_int64(N) + int64(1)) + var szNew I64 = I64((*StrAccum)(unsafe.Pointer(p)).FnChar) + N + int64(1) if szNew+I64((*StrAccum)(unsafe.Pointer(p)).FnChar) <= I64((*StrAccum)(unsafe.Pointer(p)).FmxAlloc) { szNew = szNew + I64((*StrAccum)(unsafe.Pointer(p)).FnChar) } @@ -11239,12 +11290,13 @@ func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { return 0 } } - return N + + return int32(N) } // Append N copies of character c to the given string buffer. func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { - if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { + if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, int64(N))) <= 0 { return } for libc.PostDecInt32(&N, 1) > 0 { @@ -11253,7 +11305,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { } func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { - N = Xsqlite3StrAccumEnlarge(tls, p, N) + N = Xsqlite3StrAccumEnlarge(tls, p, int64(N)) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) *(*U32)(unsafe.Pointer(p + 24)) += U32(N) @@ -12368,6 +12420,24 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin } } +// Check for interrupts and invoke progress callback. +func Xsqlite3ProgressCheck(tls *libc.TLS, p uintptr) { + var db uintptr = (*Parse)(unsafe.Pointer(p)).Fdb + if *(*int32)(unsafe.Pointer(db + 432)) != 0 { + (*Parse)(unsafe.Pointer(p)).FnErr++ + (*Parse)(unsafe.Pointer(p)).Frc = SQLITE_INTERRUPT + } + if (*Sqlite3)(unsafe.Pointer(db)).FxProgress != 0 && libc.PreIncUint32(&(*Parse)(unsafe.Pointer(p)).FnProgressSteps, 1) >= (*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 { + (*Parse)(unsafe.Pointer(p)).FnErr++ + (*Parse)(unsafe.Pointer(p)).Frc = SQLITE_INTERRUPT + } + (*Parse)(unsafe.Pointer(p)).FnProgressSteps = U32(0) + } +} + // Add an error message to pParse->zErrMsg and increment pParse->nErr. // // This function should be used to report any error that occurs while @@ -12973,10 +13043,13 @@ __57: return int32(0) } -// Render an signed 64-bit integer as text. Store the result in zOut[]. +// Render an signed 64-bit integer as text. Store the result in zOut[] and +// return the length of the string that was stored, in bytes. The value +// returned does not include the zero terminator at the end of the output +// string. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) int32 { bp := tls.Alloc(22) defer tls.Free(22) @@ -13002,6 +13075,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = int8('-') } libc.Xmemcpy(tls, zOut, bp+uintptr(i+1), uint64(unsafe.Sizeof([22]int8{}))-uint64(1)-uint64(i)) + return int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(2) - uint64(i)) } func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { @@ -14010,11 +14084,12 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) if pHash != 0 { *(*uint32)(unsafe.Pointer(pHash)) = h } - for libc.PostDecUint32(&count, 1) != 0 { + for count != 0 { if Xsqlite3StrICmp(tls, (*HashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 { return elem } elem = (*HashElem)(unsafe.Pointer(elem)).Fnext + count-- } return uintptr(unsafe.Pointer(&nullElement)) } @@ -14754,7 +14829,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, 37980) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 38271) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -14977,7 +15052,7 @@ __3: (*flock)(unsafe.Pointer(bp)).Fl_len = 1 (*flock)(unsafe.Pointer(bp)).Fl_whence = int16(SEEK_SET) if !(eFileLock == SHARED_LOCK || - eFileLock == EXCLUSIVE_LOCK && int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) < PENDING_LOCK) { + eFileLock == EXCLUSIVE_LOCK && int32((*UnixFile)(unsafe.Pointer(pFile)).FeFileLock) == RESERVED_LOCK) { goto __4 } (*flock)(unsafe.Pointer(bp)).Fl_type = func() int16 { @@ -14993,113 +15068,113 @@ __3: tErrno = *(*int32)(unsafe.Pointer(libc.X__errno(tls))) rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) if !(rc != SQLITE_BUSY) { - goto __6 + goto __7 } storeLastErrno(tls, pFile, tErrno) -__6: +__7: ; goto end_lock + goto __6 __5: + if !(eFileLock == EXCLUSIVE_LOCK) { + goto __8 + } + (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(PENDING_LOCK) + (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(PENDING_LOCK) +__8: + ; +__6: ; __4: ; if !(eFileLock == SHARED_LOCK) { - goto __7 + goto __9 } (*flock)(unsafe.Pointer(bp)).Fl_start = Off_t(Xsqlite3PendingByte + 2) (*flock)(unsafe.Pointer(bp)).Fl_len = int64(SHARED_SIZE) if !(unixFileLock(tls, pFile, bp) != 0) { - goto __9 + goto __11 } tErrno = *(*int32)(unsafe.Pointer(libc.X__errno(tls))) rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) -__9: +__11: ; (*flock)(unsafe.Pointer(bp)).Fl_start = Off_t(Xsqlite3PendingByte) (*flock)(unsafe.Pointer(bp)).Fl_len = 1 (*flock)(unsafe.Pointer(bp)).Fl_type = int16(F_UNLCK) if !(unixFileLock(tls, pFile, bp) != 0 && rc == SQLITE_OK) { - goto __10 + goto __12 } tErrno = *(*int32)(unsafe.Pointer(libc.X__errno(tls))) rc = SQLITE_IOERR | int32(8)<<8 -__10: +__12: ; if !(rc != 0) { - goto __11 + goto __13 } if !(rc != SQLITE_BUSY) { - goto __13 + goto __15 } storeLastErrno(tls, pFile, tErrno) -__13: +__15: ; goto end_lock - goto __12 -__11: + goto __14 +__13: (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(SHARED_LOCK) (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnLock++ (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared = 1 -__12: +__14: ; - goto __8 -__7: + goto __10 +__9: if !(eFileLock == EXCLUSIVE_LOCK && (*UnixInodeInfo)(unsafe.Pointer(pInode)).FnShared > 1) { - goto __14 + goto __16 } rc = SQLITE_BUSY - goto __15 -__14: + goto __17 +__16: ; (*flock)(unsafe.Pointer(bp)).Fl_type = int16(F_WRLCK) if !(eFileLock == RESERVED_LOCK) { - goto __16 + goto __18 } (*flock)(unsafe.Pointer(bp)).Fl_start = Off_t(Xsqlite3PendingByte + 1) (*flock)(unsafe.Pointer(bp)).Fl_len = 1 - goto __17 -__16: + goto __19 +__18: (*flock)(unsafe.Pointer(bp)).Fl_start = Off_t(Xsqlite3PendingByte + 2) (*flock)(unsafe.Pointer(bp)).Fl_len = int64(SHARED_SIZE) -__17: +__19: ; if !(unixFileLock(tls, pFile, bp) != 0) { - goto __18 + goto __20 } tErrno = *(*int32)(unsafe.Pointer(libc.X__errno(tls))) rc = sqliteErrorFromPosixError(tls, tErrno, SQLITE_IOERR|int32(15)<<8) if !(rc != SQLITE_BUSY) { - goto __19 + goto __21 } storeLastErrno(tls, pFile, tErrno) -__19: +__21: ; -__18: +__20: ; -__15: +__17: ; -__8: +__10: ; if !(rc == SQLITE_OK) { - goto __20 + goto __22 } (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(eFileLock) (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(eFileLock) - goto __21 -__20: - if !(eFileLock == EXCLUSIVE_LOCK) { - goto __22 - } - (*UnixFile)(unsafe.Pointer(pFile)).FeFileLock = uint8(PENDING_LOCK) - (*UnixInodeInfo)(unsafe.Pointer(pInode)).FeFileLock = uint8(PENDING_LOCK) __22: ; -__21: - ; end_lock: Xsqlite3_mutex_leave(tls, (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex) @@ -15230,7 +15305,7 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 39055) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15508,7 +15583,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3362, bp+8, 40385) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40676), ts+3362, bp+8, 40676) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15525,14 +15600,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3650, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3650, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40717) } 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)), 40440) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40731) } else { rc = SQLITE_OK } @@ -15552,7 +15627,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3281, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3281, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40762) } else { return SQLITE_OK } @@ -15807,7 +15882,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, 41151) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 41442) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -15835,7 +15910,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+3281, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3281, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41499) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -15934,7 +16009,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3245, zShm, 41333) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41624), ts+3245, zShm, 41624) goto shm_open_err __10: ; @@ -16064,7 +16139,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3316, zFile, 41477) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3316, zFile, 41768) goto shmpage_out __14: ; @@ -16110,7 +16185,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3403, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3403, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41795) goto shmpage_out __20: ; @@ -16382,7 +16457,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, 42381) + robust_close(tls, pNew, h, 42672) h = -1 } unixLeaveMutex(tls) @@ -16403,7 +16478,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, 42466) + robust_close(tls, pNew, h, 42757) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -16719,7 +16794,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3245, zName, 42907) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43198), ts+3245, zName, 43198) if !(rc == SQLITE_OK) { goto __20 } @@ -16810,7 +16885,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3355, zPath, 43046) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3355, zPath, 43337) } return rc } @@ -16818,9 +16893,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+3772, zPath, 43056) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3772, zPath, 43347) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43058) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), 43349) } else { rc = SQLITE_OK } @@ -16863,12 +16938,9 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int return } if int32(*(*int8)(unsafe.Pointer(zName + 1))) == '.' && nName == 2 { - if (*DbPath)(unsafe.Pointer(pPath)).FnUsed <= 1 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = SQLITE_ERROR - return - } - - for int32(*(*int8)(unsafe.Pointer((*DbPath)(unsafe.Pointer(pPath)).FzOut + uintptr(libc.PreDecInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnUsed, 1))))) != '/' { + if (*DbPath)(unsafe.Pointer(pPath)).FnUsed > 1 { + for int32(*(*int8)(unsafe.Pointer((*DbPath)(unsafe.Pointer(pPath)).FzOut + uintptr(libc.PreDecInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnUsed, 1))))) != '/' { + } } return } @@ -16887,18 +16959,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno(tls))) != ENOENT { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3443, zIn, 43154) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43443), ts+3443, zIn, 43443) } } else if (*stat)(unsafe.Pointer(bp)).Fst_mode&Mode_t(0170000) == Mode_t(0120000) { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43160) + (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 43449) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls, zIn, bp+128, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) if got <= int64(0) || got >= Ssize_t(unsafe.Sizeof([1026]int8{}))-int64(2) { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3434, zIn, 43165) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43454), ts+3434, zIn, 43454) return } *(*int8)(unsafe.Pointer(bp + 128 + uintptr(got))) = int8(0) @@ -16938,14 +17010,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1032)).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, bp, uint64(unsafe.Sizeof([1026]int8{}))-uint64(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3263, zPath, 43223) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43512), ts+3263, zPath, 43512) } appendAllPathElements(tls, bp+1032, bp) } appendAllPathElements(tls, bp+1032, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1032)).FnUsed))) = int8(0) if (*DbPath)(unsafe.Pointer(bp+1032)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1032)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 43229) + return Xsqlite3CantopenError(tls, 43518) } if (*DbPath)(unsafe.Pointer(bp+1032)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17020,7 +17092,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno(tls))) == EINTR { got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8)))(tls, fd, zBuf, uint64(nBuf))) } - robust_close(tls, uintptr(0), fd, 43330) + robust_close(tls, uintptr(0), fd, 43619) } } @@ -20940,7 +21012,7 @@ __26: goto __27 } - libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) + libc.Xmemset(tls, (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace, 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) __27: @@ -21954,7 +22026,6 @@ func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u var zUri uintptr var nUriByte int32 - var nUri int32 var z uintptr var iDc int32 @@ -21971,7 +22042,6 @@ func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u *(*U32)(unsafe.Pointer(bp + 12)) = U32(SQLITE_DEFAULT_PAGE_SIZE) zUri = uintptr(0) nUriByte = 1 - nUri = 0 journalFileSize = (Xsqlite3JournalSize(tls, pVfs) + 7) & libc.CplInt32(7) @@ -22037,7 +22107,6 @@ __10: } z += uintptr(libc.Xstrlen(tls, z) + uint64(1)) z += uintptr(libc.Xstrlen(tls, z) + uint64(1)) - nUri++ goto __10 __11: ; @@ -22047,7 +22116,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 59950) + rc = Xsqlite3CantopenError(tls, 60235) __12: ; if !(rc != SQLITE_OK) { @@ -22238,36 +22307,25 @@ __33: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FmemDb = U8(memDb) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FreadOnly = U8(readOnly) - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoSync = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtempFile - if !((*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoSync != 0) { - goto __34 - } + Xsqlite3PagerSetFlags(tls, *(*uintptr)(unsafe.Pointer(bp)), uint32(SQLITE_DEFAULT_SYNCHRONOUS+1|PAGER_CACHESPILL)) - goto __35 -__34: - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FfullSync = U8(1) - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FextraSync = U8(0) - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FsyncFlags = U8(SQLITE_SYNC_NORMAL) - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FwalSyncFlags = U8(SQLITE_SYNC_NORMAL | int32(SQLITE_SYNC_NORMAL)<<2) -__35: - ; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnExtra = U16(nExtra) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FjournalSizeLimit = int64(-1) setSectorSize(tls, *(*uintptr)(unsafe.Pointer(bp))) if !!(useJournal != 0) { - goto __36 + goto __34 } (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FjournalMode = U8(PAGER_JOURNALMODE_OFF) - goto __37 -__36: + goto __35 +__34: if !(memDb != 0 || memJM != 0) { - goto __38 + goto __36 } (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FjournalMode = U8(PAGER_JOURNALMODE_MEMORY) -__38: +__36: ; -__37: +__35: ; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FxReiniter = xReinit setGetterMethod(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -22439,7 +22497,7 @@ __7: if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 60480) + rc = Xsqlite3CantopenError(tls, 60754) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -22563,7 +22621,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 60693) + return Xsqlite3CorruptError(tls, 60967) __1: ; *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -22602,7 +22660,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 60725) + rc = Xsqlite3CorruptError(tls, 60999) goto pager_acquire_err __7: ; @@ -23543,10 +23601,12 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { - if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { + if nullIfMemDb != 0 && ((*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 || Xsqlite3IsMemdb(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs) != 0) { return uintptr(unsafe.Pointer(&zFake)) + 4 + } else { + return (*Pager)(unsafe.Pointer(pPager)).FzFilename } - return (*Pager)(unsafe.Pointer(pPager)).FzFilename + return uintptr(0) } var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} @@ -23632,7 +23692,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, 62345) + return Xsqlite3CorruptError(tls, 62623) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24389,7 +24449,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, 64109) + return Xsqlite3CorruptError(tls, 64387) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -24488,7 +24548,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 64241) + rc = Xsqlite3CantopenError(tls, 64519) goto finished __7: ; @@ -25074,7 +25134,7 @@ __10: goto __14 } - rc = Xsqlite3CorruptError(tls, 65055) + rc = Xsqlite3CorruptError(tls, 65333) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) @@ -25349,7 +25409,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, 65404) + rc = Xsqlite3CantopenError(tls, 65682) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -25822,7 +25882,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 66141) + return Xsqlite3CorruptError(tls, 66419) } iKey = walNextHash(tls, iKey) } @@ -26327,7 +26387,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, 66860) + rc = Xsqlite3CorruptError(tls, 67138) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -26562,8 +26622,8 @@ type CellInfo1 = struct { type CellInfo = CellInfo1 -// This structure is passed around through all the sanity checking routines -// in order to keep track of some global state information. +// This structure is passed around through all the PRAGMA integrity_check +// checking routines in order to keep track of some global state information. // // The aRef[] array is allocated so that there is 1 bit for each page in // the database. As the integrity-check proceeds, for each page used in @@ -26571,23 +26631,25 @@ type CellInfo = CellInfo1 // detect pages that are used twice and orphaned pages (both of which // indicate corruption). type IntegrityCk1 = struct { - FpBt uintptr - FpPager uintptr - FaPgRef uintptr - FnPage Pgno - FmxErr int32 - FnErr int32 - FbOomFault int32 - FzPfx uintptr - Fv1 Pgno - Fv2 int32 - FerrMsg StrAccum - Fheap uintptr - Fdb uintptr + FpBt uintptr + FpPager uintptr + FaPgRef uintptr + FnPage Pgno + FmxErr int32 + FnErr int32 + Frc int32 + FnStep U32 + F__ccgo_pad1 [4]byte + FzPfx uintptr + Fv1 Pgno + Fv2 int32 + FerrMsg StrAccum + Fheap uintptr + Fdb uintptr } -// This structure is passed around through all the sanity checking routines -// in order to keep track of some global state information. +// This structure is passed around through all the PRAGMA integrity_check +// checking routines in order to keep track of some global state information. // // The aRef[] array is allocated so that there is 1 bit for each page in // the database. As the integrity-check proceeds, for each page used in @@ -26983,7 +27045,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, 68970) + rc = Xsqlite3CorruptError(tls, 69249) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -27120,7 +27182,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69430) return __2: ; @@ -27137,7 +27199,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69443) goto ptrmap_exit __4: ; @@ -27145,7 +27207,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69169) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69448) goto ptrmap_exit __5: ; @@ -27188,7 +27250,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, 69214) + return Xsqlite3CorruptError(tls, 69493) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -27198,7 +27260,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, 69222) + return Xsqlite3CorruptError(tls, 69501) } return SQLITE_OK } @@ -27448,7 +27510,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, 69614) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69893) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -27495,7 +27557,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 69672) + return Xsqlite3CorruptError(tls, 69951) __2: ; if !(iFree != 0) { @@ -27505,7 +27567,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 69675) + return Xsqlite3CorruptError(tls, 69954) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -27518,7 +27580,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 69683) + return Xsqlite3CorruptError(tls, 69962) __6: ; if !(iFree2 != 0) { @@ -27527,14 +27589,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 69686) + return Xsqlite3CorruptError(tls, 69965) __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, 69688) + return Xsqlite3CorruptError(tls, 69967) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) @@ -27544,7 +27606,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 69692) + return Xsqlite3CorruptError(tls, 69971) __11: ; __8: @@ -27608,7 +27670,7 @@ __19: if !(pc < iCellStart || pc > iCellLast) { goto __22 } - return Xsqlite3CorruptError(tls, 69725) + return Xsqlite3CorruptError(tls, 70004) __22: ; size = int32((*struct { @@ -27618,7 +27680,7 @@ __22: if !(cbrk < iCellStart || pc+size > usableSize) { goto __23 } - return Xsqlite3CorruptError(tls, 69731) + return Xsqlite3CorruptError(tls, 70010) __23: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) @@ -27640,7 +27702,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __24 } - return Xsqlite3CorruptError(tls, 69745) + return Xsqlite3CorruptError(tls, 70024) __24: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) @@ -27675,7 +27737,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*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, 69802) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 70081) return uintptr(0) } else { *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) @@ -27688,13 +27750,13 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr pc = int32(*(*U8)(unsafe.Pointer(pTmp)))<<8 | int32(*(*U8)(unsafe.Pointer(pTmp + 1))) if pc <= iAddr { if pc != 0 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69817) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 70096) } return uintptr(0) } } if pc > maxPC+nByte-4 { - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 69824) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 70103) } return uintptr(0) } @@ -27719,7 +27781,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, 69873) + return Xsqlite3CorruptError(tls, 70152) } } @@ -27730,7 +27792,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, 69891) + return Xsqlite3CorruptError(tls, 70170) } else { return SQLITE_OK } @@ -27782,22 +27844,22 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { if int32(iFreeBlk) == 0 { break } - return Xsqlite3CorruptError(tls, 69970) + return Xsqlite3CorruptError(tls, 70249) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { - return Xsqlite3CorruptError(tls, 69975) + return Xsqlite3CorruptError(tls, 70254) } if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 69987) + return Xsqlite3CorruptError(tls, 70266) } 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, 69990) + return Xsqlite3CorruptError(tls, 70269) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -27807,7 +27869,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, 70003) + return Xsqlite3CorruptError(tls, 70282) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -27815,7 +27877,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, 70009) + return Xsqlite3CorruptError(tls, 70288) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -27823,10 +27885,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, 70018) + return Xsqlite3CorruptError(tls, 70297) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 70019) + return Xsqlite3CorruptError(tls, 70298) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -27850,13 +27912,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { var pBt uintptr - (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) - flagByte = flagByte & libc.CplInt32(PTF_LEAF) - (*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize = U8(4 - 4*int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt - if flagByte == PTF_LEAFDATA|PTF_INTKEY { - (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(1) - if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { + (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload + if flagByte >= PTF_ZERODATA|PTF_LEAF { + (*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(1) + if flagByte == PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF { (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(1) (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -27864,7 +27925,46 @@ 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) }{btreeParseCellPtr})) + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(1) + (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf + (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLeaf + } else if flagByte == PTF_ZERODATA|PTF_LEAF { + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) U16 + }{cellSizePtr})) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtrIndex})) + (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal + (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLocal } else { + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) U16 + }{cellSizePtr})) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtrIndex})) + return Xsqlite3CorruptError(tls, 70357) + } + } else { + (*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize = U8(4) + (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(0) + if flagByte == PTF_ZERODATA { + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) U16 + }{cellSizePtr})) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtrIndex})) + (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal + (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLocal + } else if flagByte == PTF_LEAFDATA|PTF_INTKEY { (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -27872,32 +27972,21 @@ 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) }{btreeParseCellPtrNoPayload})) + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(1) + (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf + (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLeaf + } else { + (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) + (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) U16 + }{cellSizePtr})) + (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr, uintptr) + }{btreeParseCellPtrIndex})) + return Xsqlite3CorruptError(tls, 70381) } - (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf - (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLeaf - } else if flagByte == PTF_ZERODATA { - (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) - (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) - (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) U16 - }{cellSizePtr})) - (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr) - }{btreeParseCellPtrIndex})) - (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal - (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLocal - } else { - (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) - (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) - (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr) U16 - }{cellSizePtr})) - (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { - f func(*libc.TLS, uintptr, uintptr, uintptr) - }{btreeParseCellPtrIndex})) - return Xsqlite3CorruptError(tls, 70097) } - (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK } @@ -27925,11 +28014,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { var next U32 var size U32 if pc < top { - return Xsqlite3CorruptError(tls, 70148) + return Xsqlite3CorruptError(tls, 70432) } for 1 != 0 { if pc > iCellLast { - return Xsqlite3CorruptError(tls, 70153) + return Xsqlite3CorruptError(tls, 70437) } 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)))) @@ -27940,15 +28029,15 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { pc = int32(next) } if next > U32(0) { - return Xsqlite3CorruptError(tls, 70163) + return Xsqlite3CorruptError(tls, 70447) } if U32(pc)+size > uint32(usableSize) { - return Xsqlite3CorruptError(tls, 70167) + return Xsqlite3CorruptError(tls, 70451) } } if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 70179) + return Xsqlite3CorruptError(tls, 70463) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -27976,14 +28065,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, 70210) + return Xsqlite3CorruptError(tls, 70494) } 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, 70215) + return Xsqlite3CorruptError(tls, 70499) } } return SQLITE_OK @@ -27997,7 +28086,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, 70247) + return Xsqlite3CorruptError(tls, 70531) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -28009,7 +28098,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, 70261) + return Xsqlite3CorruptError(tls, 70545) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 @@ -28112,7 +28201,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 70416) + rc = Xsqlite3CorruptError(tls, 70700) goto getAndInitPage_error1 __1: ; @@ -28140,7 +28229,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, 70437) + rc = Xsqlite3CorruptError(tls, 70721) goto getAndInitPage_error2 __5: ; @@ -28179,7 +28268,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, 70503) + return Xsqlite3CorruptError(tls, 70787) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -29051,7 +29140,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } - rc = Xsqlite3CorruptError(tls, 71438) + rc = Xsqlite3CorruptError(tls, 71722) goto page1_init_failed goto __19 __18: @@ -29466,7 +29555,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, 71859) + return Xsqlite3CorruptError(tls, 72143) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -29492,7 +29581,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, 71878) + return Xsqlite3CorruptError(tls, 72162) } 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) @@ -29501,7 +29590,7 @@ 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) + return Xsqlite3CorruptError(tls, 72171) } if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) @@ -29512,7 +29601,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, 71899) + return Xsqlite3CorruptError(tls, 72183) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -29528,7 +29617,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, 71934) + return Xsqlite3CorruptError(tls, 72218) } *(*int32)(unsafe.Pointer(bp)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -29589,7 +29678,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, 72032) + return Xsqlite3CorruptError(tls, 72316) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -29624,7 +29713,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, 72084) + return Xsqlite3CorruptError(tls, 72368) } } @@ -29684,7 +29773,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, 72152) + rc = Xsqlite3CorruptError(tls, 72436) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -29723,7 +29812,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, 72203) + return Xsqlite3CorruptError(tls, 72487) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -29754,7 +29843,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 72230) + return Xsqlite3CorruptError(tls, 72514) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -30095,7 +30184,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, 72694) + return Xsqlite3CorruptError(tls, 72978) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } @@ -30339,14 +30428,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, 73101) + return Xsqlite3CorruptError(tls, 73385) } 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, 73116) + return Xsqlite3CorruptError(tls, 73400) } if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -30391,7 +30480,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, 73178) + return Xsqlite3CorruptError(tls, 73462) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp)) @@ -30440,7 +30529,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt } if rc == SQLITE_OK && amt > U32(0) { - return Xsqlite3CorruptError(tls, 73263) + return Xsqlite3CorruptError(tls, 73547) } return rc } @@ -30520,7 +30609,7 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 73400) + return Xsqlite3CorruptError(tls, 73684) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -30611,7 +30700,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, 73539) + return Xsqlite3CorruptError(tls, 73823) __11: ; skip_init: @@ -30631,7 +30720,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 73551) + return Xsqlite3CorruptError(tls, 73835) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -30695,18 +30784,8 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { return rc } -// Move the cursor to the last entry in the table. Return SQLITE_OK -// on success. Set *pRes to 0 if the cursor actually points to something -// or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { - var rc int32 - - if CURSOR_VALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) && int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_AtLast != 0 { - *(*int32)(unsafe.Pointer(pRes)) = 0 - return SQLITE_OK - } - - rc = moveToRoot(tls, pCur) +func btreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { + var rc int32 = moveToRoot(tls, pCur) if rc == SQLITE_OK { *(*int32)(unsafe.Pointer(pRes)) = 0 rc = moveToRightmost(tls, pCur) @@ -30722,6 +30801,14 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { return rc } +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { + if CURSOR_VALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) && int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_AtLast != 0 { + *(*int32)(unsafe.Pointer(pRes)) = 0 + return SQLITE_OK + } + return btreeLast(tls, pCur, pRes) +} + // Move the cursor so that it points to an entry in a table (a.k.a INTKEY) // table near the key intKey. Return a success code. // @@ -30843,7 +30930,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 73793) + return Xsqlite3CorruptError(tls, 74077) __21: ; goto __19 @@ -31047,7 +31134,7 @@ __2: if !!(int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit) != 0) { goto __4 } - return Xsqlite3CorruptError(tls, 73989) + return Xsqlite3CorruptError(tls, 74273) __4: ; goto bypass_moveto_root @@ -31112,7 +31199,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, 74076) + rc = Xsqlite3CorruptError(tls, 74360) goto moveto_index_finish __17: ; @@ -31160,7 +31247,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 74108) + rc = Xsqlite3CorruptError(tls, 74392) __24: ; goto moveto_index_finish @@ -31279,7 +31366,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, 74224) + return Xsqlite3CorruptError(tls, 74508) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -31439,7 +31526,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 74404) + return Xsqlite3CorruptError(tls, 74688) __1: ; if !(n > U32(0)) { @@ -31504,7 +31591,7 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 74460) + rc = Xsqlite3CorruptError(tls, 74744) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) @@ -31540,7 +31627,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 74489) + rc = Xsqlite3CorruptError(tls, 74773) goto end_allocate_page goto __23 __22: @@ -31584,7 +31671,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 74523) + rc = Xsqlite3CorruptError(tls, 74807) goto end_allocate_page __32: ; @@ -31696,7 +31783,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 74588) + rc = Xsqlite3CorruptError(tls, 74872) goto end_allocate_page __51: ; @@ -31854,7 +31941,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, 74715) + return Xsqlite3CorruptError(tls, 74999) __1: ; if !(pMemPage != 0) { @@ -31911,7 +31998,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74762) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 75046) goto freepage_out __10: ; @@ -31927,7 +32014,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 74773) + *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3CorruptError(tls, 75057) goto freepage_out __12: ; @@ -32001,7 +32088,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, 74862) + return Xsqlite3CorruptError(tls, 75146) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -32013,7 +32100,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, 74879) + return Xsqlite3CorruptError(tls, 75163) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) @@ -32024,7 +32111,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, 74899) + rc = Xsqlite3CorruptError(tls, 75183) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp)), ovflPgno) } @@ -32189,7 +32276,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, 75152) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 75436) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -32213,9 +32300,9 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { } } -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { - bp := tls.Alloc(4) - defer tls.Free(4) +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) *(*int32)(unsafe.Pointer(bp)) = 0 var j int32 @@ -32238,16 +32325,14 @@ func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, } else { var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if rc != SQLITE_OK { - *(*int32)(unsafe.Pointer(pRC)) = rc - return + return rc } data = (*MemPage)(unsafe.Pointer(pPage)).FaData rc = allocateSpace(tls, pPage, sz, bp) if rc != 0 { - *(*int32)(unsafe.Pointer(pRC)) = rc - return + return rc } *(*int32)(unsafe.Pointer(pPage + 20)) -= int32(U16(2 + sz)) @@ -32268,9 +32353,15 @@ func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, } if (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FautoVacuum != 0 { - ptrmapPutOvflPtr(tls, pPage, pPage, pCell, pRC) + *(*int32)(unsafe.Pointer(bp + 4)) = SQLITE_OK + + ptrmapPutOvflPtr(tls, pPage, pPage, pCell, bp+4) + if *(*int32)(unsafe.Pointer(bp + 4)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 4)) + } } } + return SQLITE_OK } // A CellArray object contains a cache of pointers and sizes for a @@ -32404,11 +32495,14 @@ type CellArray1 = struct { type CellArray = CellArray1 func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { + var pRef uintptr = (*CellArray)(unsafe.Pointer(p)).FpRef + var szCell uintptr = (*CellArray)(unsafe.Pointer(p)).FszCell + for N > 0 { - if int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2))) == 0 { - *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2)) = (*struct { + if int32(*(*U16)(unsafe.Pointer(szCell + uintptr(idx)*2))) == 0 { + *(*U16)(unsafe.Pointer(szCell + uintptr(idx)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 - })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*8))) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pRef)).FxCellSize})).f(tls, pRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*8))) } else { } idx++ @@ -32461,12 +32555,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, 75453) + return Xsqlite3CorruptError(tls, 75737) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 75458) + return Xsqlite3CorruptError(tls, 75742) } pData -= uintptr(sz) @@ -32474,7 +32568,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, 75464) + return Xsqlite3CorruptError(tls, 75748) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) @@ -32534,7 +32628,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, 75549) + Xsqlite3CorruptError(tls, 75833) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) @@ -32623,7 +32717,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 75660) + return Xsqlite3CorruptError(tls, 75947) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) @@ -32739,7 +32833,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, 75773) + return Xsqlite3CorruptError(tls, 76060) } *(*int32)(unsafe.Pointer(bp + 136)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) @@ -32782,8 +32876,8 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr } if *(*int32)(unsafe.Pointer(bp + 136)) == SQLITE_OK { - insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, int32((int64(pOut)-int64(pSpace))/1), - uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+136) + *(*int32)(unsafe.Pointer(bp + 136)) = insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, int32((int64(pOut)-int64(pSpace))/1), + uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pParent)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset)+8), *(*Pgno)(unsafe.Pointer(bp + 8))) @@ -32865,6 +32959,8 @@ func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpac var piEnd uintptr var p uintptr var sz1 int32 + var szR int32 + var szD int32 var szRight int32 var szLeft int32 var r int32 @@ -33057,7 +33153,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, 76194) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76481) goto balance_cleanup __25: ; @@ -33068,7 +33164,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76218) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76505) goto balance_cleanup __27: ; @@ -33226,7 +33322,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76319) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76606) goto balance_cleanup __55: ; @@ -33300,7 +33396,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76352) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76639) goto balance_cleanup __67: ; @@ -33326,9 +33422,10 @@ __68: cachedCellSize(tls, bp+8, d) __71: ; - cachedCellSize(tls, bp+8, r) + szR = int32(cachedCellSize(tls, bp+8, r)) + szD = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2))) if !(szRight != 0 && - (bBulk != 0 || szRight+int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2)))+2 > szLeft-(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2)))+func() int32 { + (bBulk != 0 || szRight+szD+2 > szLeft-(szR+func() int32 { if i == k-1 { return 0 } @@ -33339,8 +33436,8 @@ __71: goto __73 __74: ; - szRight = szRight + (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2))) + 2) - szLeft = szLeft - (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2))) + 2) + szRight = szRight + (szD + 2) + szLeft = szLeft - (szR + 2) *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) = r r-- d-- @@ -33362,7 +33459,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76394) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76683) goto balance_cleanup __75: ; @@ -33390,7 +33487,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76427) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76716) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { @@ -33651,11 +33748,11 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76627) + *(*int32)(unsafe.Pointer(bp + 172)) = Xsqlite3CorruptError(tls, 76916) goto balance_cleanup __121: ; - insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+172) + *(*int32)(unsafe.Pointer(bp + 172)) = insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno) if !(*(*int32)(unsafe.Pointer(bp + 172)) != SQLITE_OK) { goto __122 } @@ -33843,7 +33940,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, 76857) + return Xsqlite3CorruptError(tls, 77146) } } return SQLITE_OK @@ -33881,7 +33978,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { break } } else if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) > 1 { - rc = Xsqlite3CorruptError(tls, 76917) + rc = Xsqlite3CorruptError(tls, 77206) } 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))) @@ -33958,7 +34055,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp return SQLITE_OK } -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { +func btreeOverwriteOverflowCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { bp := tls.Alloc(8) defer tls.Free(8) @@ -33970,19 +34067,11 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { var ovflPgno Pgno var ovflPageSize U32 - 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, 77062) - } - rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, 0, int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) if rc != 0 { return rc } - if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) == nTotal { - return SQLITE_OK - } iOffset = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -33995,7 +34084,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, 77081) + rc = Xsqlite3CorruptError(tls, 77370) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -34014,6 +34103,23 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { return SQLITE_OK } +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { + var nTotal int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData + (*BtreePayload)(unsafe.Pointer(pX)).FnZero + var pPage uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage + + if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd || + (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) { + return Xsqlite3CorruptError(tls, 77398) + } + if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) == nTotal { + return btreeOverwriteContent(tls, pPage, (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, + 0, int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) + } else { + return btreeOverwriteOverflowCell(tls, pCur, pX) + } + return int32(0) +} + // Insert a new record into the BTree. The content of the new record // is described by the pX object. The pCur cursor is used only to // define what table the record should be inserted into, and is left @@ -34049,7 +34155,6 @@ func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s var idx int32 var pPage uintptr var p uintptr - var pBt uintptr var oldCell uintptr var newCell uintptr @@ -34058,13 +34163,12 @@ func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s *(*int32)(unsafe.Pointer(bp)) = seekResult *(*int32)(unsafe.Pointer(bp + 124)) = 0 p = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree - pBt = (*Btree)(unsafe.Pointer(p)).FpBt newCell = uintptr(0) if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Multiple != 0) { goto __1 } - *(*int32)(unsafe.Pointer(bp + 120)) = saveAllCursors(tls, pBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) + *(*int32)(unsafe.Pointer(bp + 120)) = saveAllCursors(tls, (*Btree)(unsafe.Pointer(p)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) { goto __2 } @@ -34075,7 +34179,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 77168) + return Xsqlite3CorruptError(tls, 77479) __3: ; __1: @@ -34188,7 +34292,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77291) + *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3CorruptError(tls, 77602) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 120)) = btreeComputeFreeSpace(tls, pPage) @@ -34202,20 +34306,20 @@ __23: ; __20: ; - newCell = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace + newCell = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpTmpSpace if !(flags&BTREE_PREFORMAT != 0) { goto __24 } *(*int32)(unsafe.Pointer(bp + 120)) = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 124)) = (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize + *(*int32)(unsafe.Pointer(bp + 124)) = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPreformatSize if !(*(*int32)(unsafe.Pointer(bp + 124)) < 4) { goto __26 } *(*int32)(unsafe.Pointer(bp + 124)) = 4 __26: ; - if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 124)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { + if !((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 124)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { goto __27 } (*struct { @@ -34225,7 +34329,13 @@ __26: goto __28 } ovfl = Xsqlite3Get4byte(tls, newCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))-4)) - ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+120) + ptrmapPut(tls, (*Btree)(unsafe.Pointer(p)).FpBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+120) + if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) { + goto __29 + } + goto end_insert +__29: + ; __28: ; __27: @@ -34233,100 +34343,100 @@ __27: goto __25 __24: *(*int32)(unsafe.Pointer(bp + 120)) = fillInCell(tls, pPage, newCell, pX, bp+124) -__25: - ; if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) { - goto __29 + goto __30 } goto end_insert -__29: +__30: + ; +__25: ; idx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) if !(*(*int32)(unsafe.Pointer(bp)) == 0) { - goto __30 + goto __31 } if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { - goto __32 + goto __33 } - return Xsqlite3CorruptError(tls, 77327) -__32: + return Xsqlite3CorruptError(tls, 77640) +__33: ; *(*int32)(unsafe.Pointer(bp + 120)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) { - goto __33 + goto __34 } goto end_insert -__33: +__34: ; oldCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx))))<<8|int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + 1))))) if !!(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { - goto __34 + goto __35 } libc.Xmemcpy(tls, newCell, oldCell, uint64(4)) -__34: +__35: ; (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, oldCell, bp+128) if !(U32((*CellInfo)(unsafe.Pointer(bp+128)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+128)).FnPayload) { - goto __35 + goto __36 } *(*int32)(unsafe.Pointer(bp + 120)) = clearCellOverflow(tls, pPage, oldCell, bp+128) - goto __36 -__35: - *(*int32)(unsafe.Pointer(bp + 120)) = SQLITE_OK + goto __37 __36: + *(*int32)(unsafe.Pointer(bp + 120)) = SQLITE_OK +__37: ; *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) if !(int32((*CellInfo)(unsafe.Pointer(bp+128)).FnSize) == *(*int32)(unsafe.Pointer(bp + 124)) && U32((*CellInfo)(unsafe.Pointer(bp+128)).FnLocal) == (*CellInfo)(unsafe.Pointer(bp+128)).FnPayload && - (!(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) || *(*int32)(unsafe.Pointer(bp + 124)) < int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal))) { - goto __37 + (!(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FautoVacuum) != 0) || *(*int32)(unsafe.Pointer(bp + 124)) < int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal))) { + goto __38 } if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { - goto __38 + goto __39 } - return Xsqlite3CorruptError(tls, 77354) -__38: + return Xsqlite3CorruptError(tls, 77667) +__39: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 124))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { - goto __39 + goto __40 } - return Xsqlite3CorruptError(tls, 77357) -__39: + return Xsqlite3CorruptError(tls, 77670) +__40: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 124)))) return SQLITE_OK -__37: +__38: ; dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+128)).FnSize), bp+120) if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) { - goto __40 + goto __41 } goto end_insert -__40: +__41: ; - goto __31 -__30: + goto __32 +__31: if !(*(*int32)(unsafe.Pointer(bp)) < 0 && int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > 0) { - goto __41 + goto __42 } idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey)) - goto __42 -__41: - ; + goto __43 __42: ; -__31: +__43: ; - insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 124)), uintptr(0), uint32(0), bp+120) +__32: + ; + *(*int32)(unsafe.Pointer(bp + 120)) = insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 124)), uintptr(0), uint32(0)) (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) if !((*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0) { - goto __43 + goto __44 } *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey)) @@ -34335,30 +34445,30 @@ __31: (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnOverflow = U8(0) (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) if !(flags&BTREE_SAVEPOSITION != 0 && *(*int32)(unsafe.Pointer(bp + 120)) == SQLITE_OK) { - goto __44 + goto __45 } btreeReleaseAllCursorPages(tls, pCur) if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo != 0) { - goto __45 + goto __46 } (*BtCursor)(unsafe.Pointer(pCur)).FpKey = Xsqlite3Malloc(tls, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) if !((*BtCursor)(unsafe.Pointer(pCur)).FpKey == uintptr(0)) { - goto __46 + goto __47 } *(*int32)(unsafe.Pointer(bp + 120)) = SQLITE_NOMEM - goto __47 -__46: - libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) + goto __48 __47: + libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) +__48: ; -__45: +__46: ; (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) (*BtCursor)(unsafe.Pointer(pCur)).FnKey = (*BtreePayload)(unsafe.Pointer(pX)).FnKey -__44: +__45: ; -__43: +__44: ; end_insert: return *(*int32)(unsafe.Pointer(bp + 120)) @@ -34381,7 +34491,6 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I bp := tls.Alloc(24) defer tls.Free(24) - *(*int32)(unsafe.Pointer(bp + 20)) = SQLITE_OK var pBt uintptr = (*BtCursor)(unsafe.Pointer(pDest)).FpBt var aOut uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace var aIn uintptr @@ -34400,13 +34509,15 @@ 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, 77461) + return Xsqlite3CorruptError(tls, 77773) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { libc.Xmemcpy(tls, aOut, aIn, uint64(nIn)) (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(int64(nIn) + (int64(aOut)-int64((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace))/1) + return SQLITE_OK } else { + *(*int32)(unsafe.Pointer(bp + 20)) = SQLITE_OK var pSrcPager uintptr = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpBt)).FpPager var pPgnoOut uintptr = uintptr(0) var ovflIn Pgno = Pgno(0) @@ -34423,7 +34534,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, 77484) + return Xsqlite3CorruptError(tls, 77798) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -34482,9 +34593,9 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I releasePage(tls, pPageOut) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) + return *(*int32)(unsafe.Pointer(bp + 20)) } - - return *(*int32)(unsafe.Pointer(bp + 20)) + return int32(0) } // Delete the entry that the cursor is pointing to. @@ -34524,7 +34635,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { return *(*int32)(unsafe.Pointer(bp + 24)) } } else { - return Xsqlite3CorruptError(tls, 77581) + return Xsqlite3CorruptError(tls, 77894) } } @@ -34532,11 +34643,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, 77590) + return Xsqlite3CorruptError(tls, 77903) } 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, 77594) + return Xsqlite3CorruptError(tls, 77907) } bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) @@ -34611,7 +34722,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, 77685) + return Xsqlite3CorruptError(tls, 77998) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -34621,7 +34732,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pLeaf)).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { - insertCell(tls, pPage, iCellIdx, pCell-uintptr(4), nCell+4, pTmp, n, bp+24) + *(*int32)(unsafe.Pointer(bp + 24)) = insertCell(tls, pPage, iCellIdx, pCell-uintptr(4), nCell+4, pTmp, n) } dropCell(tls, pLeaf, int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1, nCell, bp+24) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { @@ -34680,7 +34791,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, 77801) + return Xsqlite3CorruptError(tls, 78114) } *(*Pgno)(unsafe.Pointer(bp))++ @@ -34709,7 +34820,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, 77849) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 78162) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -34785,7 +34896,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 77939) + return Xsqlite3CorruptError(tls, 78252) __1: ; *(*int32)(unsafe.Pointer(bp + 32)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) @@ -34799,7 +34910,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, 77946) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 78259) goto cleardatabasepage_out __3: ; @@ -34933,7 +35044,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, 78050) + return Xsqlite3CorruptError(tls, 78363) } *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35108,12 +35219,41 @@ func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } +func checkOom(tls *libc.TLS, pCheck uintptr) { + (*IntegrityCk)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM + (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr = 0 + if (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr == 0 { + (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ + } +} + +func checkProgress(tls *libc.TLS, pCheck uintptr) { + var db uintptr = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + if *(*int32)(unsafe.Pointer(db + 432)) != 0 { + (*IntegrityCk)(unsafe.Pointer(pCheck)).Frc = SQLITE_INTERRUPT + (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ + (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr = 0 + } + if (*Sqlite3)(unsafe.Pointer(db)).FxProgress != 0 { + (*IntegrityCk)(unsafe.Pointer(pCheck)).FnStep++ + if (*IntegrityCk)(unsafe.Pointer(pCheck)).FnStep%(*Sqlite3)(unsafe.Pointer(db)).FnProgressOps == U32(0) && + (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0 { + (*IntegrityCk)(unsafe.Pointer(pCheck)).Frc = SQLITE_INTERRUPT + (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ + (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr = 0 + } + } +} + func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { bp := tls.Alloc(16) defer tls.Free(16) var ap Va_list _ = ap + checkProgress(tls, pCheck) if !((*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { return } @@ -35121,15 +35261,15 @@ 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+4046, 1) + Xsqlite3_str_append(tls, pCheck+64, ts+4046, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { - Xsqlite3_str_appendf(tls, pCheck+56, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) + Xsqlite3_str_appendf(tls, pCheck+64, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) } - Xsqlite3_str_vappendf(tls, pCheck+56, zFormat, ap) + Xsqlite3_str_vappendf(tls, pCheck+64, zFormat, ap) _ = ap if int32((*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FaccError) == SQLITE_NOMEM { - (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 + checkOom(tls, pCheck) } } @@ -35153,9 +35293,6 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { checkAppendMsg(tls, pCheck, ts+4071, libc.VaList(bp+8, iPage)) return 1 } - if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 432)) != 0 { - return 1 - } setPageReferenced(tls, pCheck, iPage) return 0 } @@ -35169,7 +35306,7 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+48, bp+52) if rc != SQLITE_OK { if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { - (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 + checkOom(tls, pCheck) } checkAppendMsg(tls, pCheck, ts+4096, libc.VaList(bp, iChild)) return @@ -35243,7 +35380,9 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { var j U32 - var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) + var i U32 + + i = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x for libc.AssignUint32(&j, i/U32(2)) > U32(0) && *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) > *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) { x = *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) @@ -35328,48 +35467,55 @@ func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, saved_v2 = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 savedIsInit = U8(0) + checkProgress(tls, pCheck) + if !((*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr == 0) { + goto __1 + } + goto end_of_check +__1: + ; pBt = (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt usableSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize if !(iPage == Pgno(0)) { - goto __1 + goto __2 } return 0 -__1: +__2: ; if !(checkRef(tls, pCheck, iPage) != 0) { - goto __2 + goto __3 } return 0 -__2: +__3: ; (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4292 (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { - goto __3 + goto __4 } checkAppendMsg(tls, pCheck, ts+4302, libc.VaList(bp, rc)) goto end_of_check -__3: +__4: ; savedIsInit = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FisInit (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FisInit = U8(0) if !(libc.AssignInt32(&rc, btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != 0) { - goto __4 + goto __5 } checkAppendMsg(tls, pCheck, ts+4340, libc.VaList(bp+8, rc)) goto end_of_check -__4: +__5: ; if !(libc.AssignInt32(&rc, btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != 0) { - goto __5 + goto __6 } checkAppendMsg(tls, pCheck, ts+4378, libc.VaList(bp+16, rc)) goto end_of_check -__5: +__6: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FhdrOffset) @@ -35384,29 +35530,29 @@ __5: pCellIdx = data + uintptr(cellStart+2*(nCell-1)) if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { - goto __6 + goto __7 } pgno = int32(Xsqlite3Get4byte(tls, data+uintptr(hdr+8))) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { - goto __8 + goto __9 } (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4426 checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) -__8: +__9: ; depth = checkTreePage(tls, pCheck, uint32(pgno), bp+104, *(*I64)(unsafe.Pointer(bp + 104))) keyCanBeEqual = 0 - goto __7 -__6: + goto __8 +__7: heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap *(*U32)(unsafe.Pointer(heap)) = U32(0) -__7: +__8: ; i = nCell - 1 -__9: +__10: if !(i >= 0 && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { - goto __11 + goto __12 } (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 = i @@ -35414,28 +35560,28 @@ __9: pc = U32(int32(*(*U8)(unsafe.Pointer(pCellIdx)))<<8 | int32(*(*U8)(unsafe.Pointer(pCellIdx + 1)))) pCellIdx -= uintptr(2) if !(pc < contentOffset || pc > usableSize-U32(4)) { - goto __12 + goto __13 } checkAppendMsg(tls, pCheck, ts+4454, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 - goto __10 -__12: + goto __11 +__13: ; pCell = data + uintptr(pc) (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96)), pCell, bp+112) if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { - goto __13 + goto __14 } checkAppendMsg(tls, pCheck, ts+4484, 0) doCoverageCheck = 0 - goto __10 -__13: + goto __11 +__14: ; if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FintKey != 0) { - goto __14 + goto __15 } if !(func() int32 { if keyCanBeEqual != 0 { @@ -35443,97 +35589,97 @@ __13: } return libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112)).FnKey >= *(*I64)(unsafe.Pointer(bp + 104))) }() != 0) { - goto __15 + goto __16 } checkAppendMsg(tls, pCheck, ts+4508, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112)).FnKey)) -__15: +__16: ; *(*I64)(unsafe.Pointer(bp + 104)) = (*CellInfo)(unsafe.Pointer(bp + 112)).FnKey keyCanBeEqual = 0 -__14: +__15: ; if !((*CellInfo)(unsafe.Pointer(bp+112)).FnPayload > U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal)) { - goto __16 + goto __17 } nPage = ((*CellInfo)(unsafe.Pointer(bp+112)).FnPayload - U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) + usableSize - U32(5)) / (usableSize - U32(4)) pgnoOvfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-4)) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { - goto __17 + goto __18 } checkPtrmap(tls, pCheck, pgnoOvfl, uint8(PTRMAP_OVERFLOW1), iPage) -__17: +__18: ; checkList(tls, pCheck, 0, pgnoOvfl, nPage) -__16: +__17: ; if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { - goto __18 + goto __19 } pgno = int32(Xsqlite3Get4byte(tls, pCell)) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { - goto __20 + goto __21 } checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) -__20: +__21: ; d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+104, *(*I64)(unsafe.Pointer(bp + 104))) keyCanBeEqual = 0 if !(d2 != depth) { - goto __21 + goto __22 } checkAppendMsg(tls, pCheck, ts+4532, 0) depth = d2 -__21: +__22: ; - goto __19 -__18: - btreeHeapInsert(tls, heap, pc<<16|(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-U32(1))) + goto __20 __19: + btreeHeapInsert(tls, heap, pc<<16|(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-U32(1))) +__20: ; - goto __10 -__10: - i-- - goto __9 goto __11 __11: + i-- + goto __10 + goto __12 +__12: ; *(*I64)(unsafe.Pointer(piMinKey)) = *(*I64)(unsafe.Pointer(bp + 104)) (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = uintptr(0) if !(doCoverageCheck != 0 && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr > 0) { - goto __22 + goto __23 } if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { - goto __23 + goto __24 } heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap *(*U32)(unsafe.Pointer(heap)) = U32(0) i = nCell - 1 -__24: +__25: if !(i >= 0) { - goto __26 + goto __27 } pc = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(cellStart+i*2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(cellStart+i*2) + 1)))) size = U32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FxCellSize})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96)), data+uintptr(pc))) btreeHeapInsert(tls, heap, pc<<16|(pc+size-U32(1))) - goto __25 -__25: - i-- - goto __24 goto __26 __26: + i-- + goto __25 + goto __27 +__27: ; -__23: +__24: ; i = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+1))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+1) + 1))) -__27: +__28: if !(i > 0) { - goto __28 + goto __29 } size1 = int32(*(*U8)(unsafe.Pointer(data + uintptr(i+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(i+2) + 1))) @@ -35543,48 +35689,48 @@ __27: j = int32(*(*U8)(unsafe.Pointer(data + uintptr(i))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(i) + 1))) i = j - goto __27 -__28: + goto __28 +__29: ; nFrag = 0 prev = contentOffset - U32(1) -__29: +__30: if !(btreeHeapPull(tls, heap, bp+136) != 0) { - goto __30 + goto __31 } if !(prev&U32(0xffff) >= *(*U32)(unsafe.Pointer(bp + 136))>>16) { - goto __31 + goto __32 } checkAppendMsg(tls, pCheck, ts+4557, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) - goto __30 - goto __32 -__31: + goto __31 + goto __33 +__32: nFrag = int32(U32(nFrag) + (*(*U32)(unsafe.Pointer(bp + 136))>>16 - prev&U32(0xffff) - U32(1))) prev = *(*U32)(unsafe.Pointer(bp + 136)) -__32: +__33: ; - goto __29 -__30: + goto __30 +__31: ; nFrag = int32(U32(nFrag) + (usableSize - prev&U32(0xffff) - U32(1))) if !(*(*U32)(unsafe.Pointer(heap)) == U32(0) && nFrag != int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7))))) { - goto __33 + goto __34 } checkAppendMsg(tls, pCheck, ts+4594, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) -__33: +__34: ; -__22: +__23: ; end_of_check: if !!(doCoverageCheck != 0) { - goto __34 + goto __35 } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FisInit = savedIsInit -__34: +__35: ; releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 96))) (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = saved_zPfx @@ -35613,9 +35759,9 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { - bp := tls.Alloc(248) - defer tls.Free(248) +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr, pzOut uintptr) int32 { + bp := tls.Alloc(256) + defer tls.Free(256) var i Pgno @@ -35647,19 +35793,13 @@ __1: ; Xsqlite3BtreeEnter(tls, p) + libc.Xmemset(tls, bp+32, 0, uint64(unsafe.Sizeof(IntegrityCk{}))) (*IntegrityCk)(unsafe.Pointer(bp + 32)).Fdb = db (*IntegrityCk)(unsafe.Pointer(bp + 32)).FpBt = pBt (*IntegrityCk)(unsafe.Pointer(bp + 32)).FpPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager (*IntegrityCk)(unsafe.Pointer(bp + 32)).FnPage = btreePagecount(tls, (*IntegrityCk)(unsafe.Pointer(bp+32)).FpBt) (*IntegrityCk)(unsafe.Pointer(bp + 32)).FmxErr = mxErr - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FnErr = 0 - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FbOomFault = 0 - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FzPfx = uintptr(0) - (*IntegrityCk)(unsafe.Pointer(bp + 32)).Fv1 = Pgno(0) - (*IntegrityCk)(unsafe.Pointer(bp + 32)).Fv2 = 0 - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FaPgRef = uintptr(0) - (*IntegrityCk)(unsafe.Pointer(bp + 32)).Fheap = uintptr(0) - Xsqlite3StrAccumInit(tls, bp+32+56, uintptr(0), bp+136, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) + Xsqlite3StrAccumInit(tls, bp+32+64, uintptr(0), bp+144, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*IntegrityCk)(unsafe.Pointer(bp + 32)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage == Pgno(0)) { goto __3 @@ -35671,7 +35811,7 @@ __3: if !!(int32((*IntegrityCk)(unsafe.Pointer(bp+32)).FaPgRef) != 0) { goto __4 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FbOomFault = 1 + checkOom(tls, bp+32) goto integrity_ck_cleanup __4: ; @@ -35679,7 +35819,7 @@ __4: if !((*IntegrityCk)(unsafe.Pointer(bp+32)).Fheap == uintptr(0)) { goto __5 } - (*IntegrityCk)(unsafe.Pointer(bp + 32)).FbOomFault = 1 + checkOom(tls, bp+32) goto integrity_ck_cleanup __5: ; @@ -35764,7 +35904,7 @@ __20: checkPtrmap(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) __21: ; - checkTreePage(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+240, int64(0xffffffff)|int64(0x7fffffff)<<32) + checkTreePage(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+248, int64(0xffffffff)|int64(0x7fffffff)<<32) goto __18 __18: i++ @@ -35807,22 +35947,19 @@ __22: integrity_ck_cleanup: Xsqlite3PageFree(tls, (*IntegrityCk)(unsafe.Pointer(bp+32)).Fheap) Xsqlite3_free(tls, (*IntegrityCk)(unsafe.Pointer(bp+32)).FaPgRef) - if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FbOomFault != 0) { - goto __28 - } - Xsqlite3_str_reset(tls, bp+32+56) - (*IntegrityCk)(unsafe.Pointer(bp+32)).FnErr++ -__28: - ; *(*int32)(unsafe.Pointer(pnErr)) = (*IntegrityCk)(unsafe.Pointer(bp + 32)).FnErr if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnErr == 0) { - goto __29 + goto __28 } - Xsqlite3_str_reset(tls, bp+32+56) + Xsqlite3_str_reset(tls, bp+32+64) + *(*uintptr)(unsafe.Pointer(pzOut)) = uintptr(0) + goto __29 +__28: + *(*uintptr)(unsafe.Pointer(pzOut)) = Xsqlite3StrAccumFinish(tls, bp+32+64) __29: ; Xsqlite3BtreeLeave(tls, p) - return Xsqlite3StrAccumFinish(tls, bp+32+56) + return (*IntegrityCk)(unsafe.Pointer(bp + 32)).Frc } // Return the full pathname of the underlying database file. Return @@ -36049,8 +36186,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -36549,7 +36686,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { defer tls.Free(40) if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int != 0 { - Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) + (*Mem)(unsafe.Pointer(p)).Fn = Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(p)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+8, uintptr(0), zBuf, sz, 0) Xsqlite3_str_appendf(tls, bp+8, ts+4909, @@ -36561,6 +36698,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { }())) *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+8)).FnChar))) = int8(0) + (*Mem)(unsafe.Pointer(p)).Fn = int32((*StrAccum)(unsafe.Pointer(bp + 8)).FnChar) } } @@ -36748,7 +36886,6 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in vdbeMemRenderNum(tls, nByte, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem) - (*Mem)(unsafe.Pointer(pMem)).Fn = int32(libc.Xstrlen(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) & uint64(0x3fffffff)) (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) *(*U16)(unsafe.Pointer(pMem + 20)) |= U16(MEM_Str | MEM_Term) if bForce != 0 { @@ -36922,16 +37059,18 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { return libc.Bool32(Xsqlite3VdbeRealValue(tls, pMem) != 0.0) } -// The MEM structure is already a MEM_Real. Try to also make it a -// MEM_Int if we can. +// The MEM structure is already a MEM_Real or MEM_IntReal. Try to +// make it a MEM_Int if we can. func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { - var ix I64 - - ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) - - if *(*float64)(unsafe.Pointer(pMem)) == float64(ix) && ix > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) && ix < int64(0xffffffff)|int64(0x7fffffff)<<32 { - *(*I64)(unsafe.Pointer(pMem)) = ix + if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_IntReal != 0 { (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + } else { + var ix I64 = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) + + if *(*float64)(unsafe.Pointer(pMem)) == float64(ix) && ix > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32) && ix < int64(0xffffffff)|int64(0x7fffffff)<<32 { + *(*I64)(unsafe.Pointer(pMem)) = ix + (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) + } } } @@ -37374,7 +37513,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, 81276) + return Xsqlite3CorruptError(tls, 81630) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -37611,43 +37750,34 @@ __9: __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) - rc = Xsqlite3VdbeChangeEncoding(tls, pVal, int32(enc)) - if !(rc == SQLITE_OK && Xsqlite3VdbeMemTooBig(tls, pVal) != 0) { - goto __12 - } - rc = SQLITE_TOOBIG - (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).FnErr++ -__12: - ; __11: ; - (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).Frc = rc - value_from_function_out: if !(rc != SQLITE_OK) { - goto __13 + goto __12 } pVal = uintptr(0) -__13: + (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).Frc = rc +__12: ; if !(apVal != 0) { - goto __14 + goto __13 } i = 0 -__15: +__14: if !(i < nVal) { - goto __17 + goto __16 } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) + goto __15 +__15: + i++ + goto __14 goto __16 __16: - i++ - goto __15 - goto __17 -__17: ; Xsqlite3DbFreeNN(tls, db, apVal) -__14: +__13: ; *(*uintptr)(unsafe.Pointer(ppVal)) = pVal return rc @@ -38032,7 +38162,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, 81913) + return Xsqlite3CorruptError(tls, 82270) } iField = *(*int32)(unsafe.Pointer(bp)) for i = 0; i <= iCol; i++ { @@ -38047,14 +38177,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 81919) + return Xsqlite3CorruptError(tls, 82276) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 81925) + return Xsqlite3CorruptError(tls, 82282) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -38424,7 +38554,9 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) int32 { + var addr int32 = 0 + if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var zMsg uintptr var v uintptr @@ -38436,13 +38568,15 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, _ = ap v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe iThis = (*Vdbe)(unsafe.Pointer(v)).FnOp - Xsqlite3VdbeAddOp4(tls, v, OP_Explain, iThis, (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, + addr = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, iThis, (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) if bPush != 0 { (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = iThis } + } + return addr } // Pop the EXPLAIN QUERY PLAN stack one level. @@ -38519,6 +38653,9 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { if (*Parse)(unsafe.Pointer(p)).FaLabel == uintptr(0) { (*Parse)(unsafe.Pointer(p)).FnLabelAlloc = 0 } else { + if nNewSize >= 100 && nNewSize/100 > (*Parse)(unsafe.Pointer(p)).FnLabelAlloc/100 { + Xsqlite3ProgressCheck(tls, p) + } (*Parse)(unsafe.Pointer(p)).FnLabelAlloc = nNewSize *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } @@ -39407,7 +39544,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // allocated by the OP_Program opcode in sqlite3VdbeExec(). func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { var i int32 - var aMem uintptr = p + 120 + var aMem uintptr = p + 112 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 for i = 0; i < (*VdbeFrame)(unsafe.Pointer(p)).FnChildCsr; i++ { @@ -39416,7 +39553,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { } } releaseMemArray(tls, aMem, (*VdbeFrame)(unsafe.Pointer(p)).FnChildMem) - Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p+72, -1, 0) + Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p+64, -1, 0) Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p) } @@ -39450,7 +39587,6 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { var pOp uintptr releaseMemArray(tls, pMem, 8) - (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -39492,7 +39628,7 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(5)*56, zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(8) } - (*Vdbe)(unsafe.Pointer(p)).FpResultSet = pMem + (*Vdbe)(unsafe.Pointer(p)).FpResultRow = pMem if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM rc = SQLITE_ERROR @@ -40244,7 +40380,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = uintptr(0) } - (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) + (*Vdbe)(unsafe.Pointer(p)).FpResultRow = uintptr(0) return (*Vdbe)(unsafe.Pointer(p)).Frc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } @@ -40352,7 +40488,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 85647) + return Xsqlite3CorruptError(tls, 86058) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -40903,7 +41039,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86574)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86985)) return 0 } @@ -40968,7 +41104,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, 86651)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 87062)) return 0 } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41002,7 +41138,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, 86681)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 87092)) return 0 } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -41052,7 +41188,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } 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)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 87136)) return 0 } } @@ -41198,7 +41334,7 @@ __5: if !(szHdr+nStr > nKey1) { goto __7 } - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86888)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 87299)) return 0 __7: ; @@ -41369,7 +41505,7 @@ __6: idx_rowid_corruption: ; Xsqlite3VdbeMemReleaseMalloc(tls, bp) - return Xsqlite3CorruptError(tls, 87046) + return Xsqlite3CorruptError(tls, 87457) } // Compare the key of the index entry that cursor pC is pointing to against @@ -41395,7 +41531,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, 87079) + return Xsqlite3CorruptError(tls, 87490) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) @@ -41669,7 +41805,7 @@ 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, 87442) + return Xsqlite3MisuseError(tls, 87854) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -42021,8 +42157,11 @@ func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel } func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { - if int32(enc) == SQLITE_UTF16 { - enc = uint8(SQLITE_UTF16LE) + if int32(enc) != SQLITE_UTF8 { + if int32(enc) == SQLITE_UTF16 { + enc = uint8(SQLITE_UTF16LE) + } + n = n & libc.CplUint64(uint64(1)) } if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -42032,15 +42171,15 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { - setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) + setResultStrOrError(tls, pCtx, z, int32(U64(n)&libc.CplUint64(uint64(1))), uint8(SQLITE_UTF16LE), xDel) } func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { - setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) + setResultStrOrError(tls, pCtx, z, int32(U64(n)&libc.CplUint64(uint64(1))), uint8(SQLITE_UTF16BE), xDel) } func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { - setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) + setResultStrOrError(tls, pCtx, z, int32(U64(n)&libc.CplUint64(uint64(1))), uint8(SQLITE_UTF16LE), xDel) } func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { @@ -42228,6 +42367,7 @@ __14: invokeProfileCallback(tls, db, p) __16: ; + (*Vdbe)(unsafe.Pointer(p)).FpResultRow = uintptr(0) if !(rc == SQLITE_DONE && (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { goto __17 } @@ -42280,7 +42420,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { var db uintptr if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 88129) + return Xsqlite3MisuseError(tls, 88544) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -42344,6 +42484,15 @@ func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } +// The destructor function for a ValueList object. This needs to be +// a separate function, unknowable to the application, to ensure that +// calls to sqlite3_vtab_in_first()/sqlite3_vtab_in_next() that are not +// preceeded by activation of IN processing via sqlite3_vtab_int() do not +// try to access a fake ValueList object inserted by a hostile extension. +func Xsqlite3VdbeValueListFree(tls *libc.TLS, pToDelete uintptr) { + Xsqlite3_free(tls, pToDelete) +} + func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { bp := tls.Alloc(68) defer tls.Free(68) @@ -42355,9 +42504,10 @@ 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+5341) - if pRhs == uintptr(0) { - return SQLITE_MISUSE + if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_Dyn == 0 || (*Sqlite3_value)(unsafe.Pointer(pVal)).FxDel != *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3VdbeValueListFree})) { + return SQLITE_ERROR + } else { + pRhs = (*Sqlite3_value)(unsafe.Pointer(pVal)).Fz } if bNext != 0 { rc = Xsqlite3BtreeNext(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, 0) @@ -42591,7 +42741,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { // currently executing statement pStmt. func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { var pVm uintptr = pStmt - if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { + if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultRow == uintptr(0) { return 0 } return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -42615,8 +42765,8 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pVm)).Fdb)).Fmutex) - if (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet != uintptr(0) && i < int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) && i >= 0 { - pOut = (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet + uintptr(i)*56 + if (*Vdbe)(unsafe.Pointer(pVm)).FpResultRow != uintptr(0) && i < int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) && i >= 0 { + pOut = (*Vdbe)(unsafe.Pointer(pVm)).FpResultRow + uintptr(i)*56 } else { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(pVm)).Fdb, SQLITE_RANGE) pOut = columnNullValue(tls) @@ -42790,15 +42940,15 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) int32 { var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 88775) + return Xsqlite3MisuseError(tls, 89208) } 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+5351, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 88783) + ts+5341, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 89216) } if i >= uint32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -42909,14 +43059,17 @@ func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nD } func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { - if int32(enc) == SQLITE_UTF16 { - enc = uint8(SQLITE_UTF16LE) + if int32(enc) != SQLITE_UTF8 { + if int32(enc) == SQLITE_UTF16 { + enc = uint8(SQLITE_UTF16LE) + } + nData = nData & libc.Uint64FromInt32(libc.CplInt32(int32(U16(1)))) } return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { - return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, n int32, xDel uintptr) int32 { + return bindText(tls, pStmt, i, zData, int64(U64(n)&libc.CplUint64(uint64(1))), xDel, uint8(SQLITE_UTF16LE)) } func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { @@ -43200,7 +43353,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, 89271) + rc = Xsqlite3MisuseError(tls, 89707) goto preupdate_old_out __1: ; @@ -43344,7 +43497,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, 89373) + rc = Xsqlite3MisuseError(tls, 89809) goto preupdate_new_out __1: ; @@ -43516,7 +43669,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5391, 3) + Xsqlite3_str_append(tls, bp+48, ts+5381, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } @@ -43571,21 +43724,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+5395, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5385, 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+5402, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5392, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5415, 2) + Xsqlite3_str_append(tls, bp+48, ts+5405, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5418, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5408, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5423, 1) + Xsqlite3_str_append(tls, bp+48, ts+5413, 1) } } } @@ -43677,11 +43830,11 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { - if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real == 0 { + if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Real|MEM_IntReal) == 0 { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0 { applyNumericAffinity(tls, pRec, 1) } - } else { + } else if int32(affinity) <= SQLITE_AFF_REAL { Xsqlite3VdbeIntegerAffinity(tls, pRec) } } @@ -43812,8 +43965,8 @@ var azTypes = [5]uintptr{ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { - bp := tls.Alloc(1040) - defer tls.Free(1040) + bp := tls.Alloc(1048) + defer tls.Free(1048) var aOp uintptr var pOp uintptr @@ -44048,7 +44201,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nRoot int32 var aRoot uintptr - var z uintptr var pnErr uintptr var iSet int32 @@ -44149,594 +44301,598 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { pIn3 = uintptr(0) pOut = uintptr(0) + if !((*Vdbe)(unsafe.Pointer(p)).FlockMask != YDbMask(0)) { + goto __1 + } Xsqlite3VdbeEnter(tls, p) +__1: + ; if !((*Sqlite3)(unsafe.Pointer(db)).FxProgress != 0) { - goto __1 + goto __2 } iPrior = *(*U32)(unsafe.Pointer(p + 212 + 4*4)) nProgressLimit = U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps - iPrior%(*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) - goto __2 -__1: - nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 + goto __3 __2: + nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 +__3: ; if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_NOMEM) { - goto __3 + goto __4 } goto no_mem -__3: +__4: ; (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK (*Vdbe)(unsafe.Pointer(p)).FiCurrentTime = int64(0) - (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 if !(*(*int32)(unsafe.Pointer(db + 432)) != 0) { - goto __4 + goto __5 } goto abort_due_to_interrupt -__4: +__5: ; pOp = aOp + uintptr((*Vdbe)(unsafe.Pointer(p)).Fpc)*24 -__5: +__6: if !(1 != 0) { - goto __7 + goto __8 } nVmStep++ switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Goto: - goto __9 + goto __10 case OP_Gosub: - goto __10 + goto __11 case OP_Return: - goto __11 + goto __12 case OP_InitCoroutine: - goto __12 + goto __13 case OP_EndCoroutine: - goto __13 + goto __14 case OP_Yield: - goto __14 + goto __15 case OP_HaltIfNull: - goto __15 + goto __16 case OP_Halt: - goto __16 + goto __17 case OP_Integer: - goto __17 + goto __18 case OP_Int64: - goto __18 + goto __19 case OP_Real: - goto __19 + goto __20 case OP_String8: - goto __20 + goto __21 case OP_String: - goto __21 + goto __22 case OP_BeginSubrtn: - goto __22 - case OP_Null: goto __23 + case OP_Null: + goto __24 case OP_SoftNull: - goto __24 + goto __25 case OP_Blob: - goto __25 + goto __26 case OP_Variable: - goto __26 + goto __27 case OP_Move: - goto __27 + goto __28 case OP_Copy: - goto __28 + goto __29 case OP_SCopy: - goto __29 + goto __30 case OP_IntCopy: - goto __30 + goto __31 case OP_FkCheck: - goto __31 + goto __32 case OP_ResultRow: - goto __32 + goto __33 case OP_Concat: - goto __33 + goto __34 case OP_Add: - goto __34 - case OP_Subtract: goto __35 - case OP_Multiply: + case OP_Subtract: goto __36 - case OP_Divide: + case OP_Multiply: goto __37 - case OP_Remainder: + case OP_Divide: goto __38 + case OP_Remainder: + goto __39 case OP_CollSeq: - goto __39 + goto __40 case OP_BitAnd: - goto __40 - case OP_BitOr: goto __41 - case OP_ShiftLeft: + case OP_BitOr: goto __42 - case OP_ShiftRight: + case OP_ShiftLeft: goto __43 + case OP_ShiftRight: + goto __44 case OP_AddImm: - goto __44 + goto __45 case OP_MustBeInt: - goto __45 + goto __46 case OP_RealAffinity: - goto __46 + goto __47 case OP_Cast: - goto __47 + goto __48 case OP_Eq: - goto __48 - case OP_Ne: goto __49 - case OP_Lt: + case OP_Ne: goto __50 - case OP_Le: + case OP_Lt: goto __51 - case OP_Gt: + case OP_Le: goto __52 - case OP_Ge: + case OP_Gt: goto __53 + case OP_Ge: + goto __54 case OP_ElseEq: - goto __54 + goto __55 case OP_Permutation: - goto __55 + goto __56 case OP_Compare: - goto __56 + goto __57 case OP_Jump: - goto __57 + goto __58 case OP_And: - goto __58 - case OP_Or: goto __59 + case OP_Or: + goto __60 case OP_IsTrue: - goto __60 + goto __61 case OP_Not: - goto __61 + goto __62 case OP_BitNot: - goto __62 + goto __63 case OP_Once: - goto __63 + goto __64 case OP_If: - goto __64 + goto __65 case OP_IfNot: - goto __65 + goto __66 case OP_IsNull: - goto __66 + goto __67 case OP_IsType: - goto __67 + goto __68 case OP_ZeroOrNull: - goto __68 + goto __69 case OP_NotNull: - goto __69 + goto __70 case OP_IfNullRow: - goto __70 + goto __71 case OP_Offset: - goto __71 + goto __72 case OP_Column: - goto __72 + goto __73 case OP_TypeCheck: - goto __73 + goto __74 case OP_Affinity: - goto __74 + goto __75 case OP_MakeRecord: - goto __75 + goto __76 case OP_Count: - goto __76 + goto __77 case OP_Savepoint: - goto __77 + goto __78 case OP_AutoCommit: - goto __78 + goto __79 case OP_Transaction: - goto __79 + goto __80 case OP_ReadCookie: - goto __80 + goto __81 case OP_SetCookie: - goto __81 + goto __82 case OP_ReopenIdx: - goto __82 + goto __83 case OP_OpenRead: - goto __83 - case OP_OpenWrite: goto __84 + case OP_OpenWrite: + goto __85 case OP_OpenDup: - goto __85 + goto __86 case OP_OpenAutoindex: - goto __86 - case OP_OpenEphemeral: goto __87 + case OP_OpenEphemeral: + goto __88 case OP_SorterOpen: - goto __88 + goto __89 case OP_SequenceTest: - goto __89 + goto __90 case OP_OpenPseudo: - goto __90 + goto __91 case OP_Close: - goto __91 + goto __92 case OP_SeekLT: - goto __92 - case OP_SeekLE: goto __93 - case OP_SeekGE: + case OP_SeekLE: goto __94 - case OP_SeekGT: + case OP_SeekGE: goto __95 + case OP_SeekGT: + goto __96 case OP_SeekScan: - goto __96 + goto __97 case OP_SeekHit: - goto __97 + goto __98 case OP_IfNotOpen: - goto __98 + goto __99 case OP_IfNoHope: - goto __99 - case OP_NoConflict: goto __100 - case OP_NotFound: + case OP_NoConflict: goto __101 - case OP_Found: + case OP_NotFound: goto __102 + case OP_Found: + goto __103 case OP_SeekRowid: - goto __103 + goto __104 case OP_NotExists: - goto __104 + goto __105 case OP_Sequence: - goto __105 + goto __106 case OP_NewRowid: - goto __106 + goto __107 case OP_Insert: - goto __107 + goto __108 case OP_RowCell: - goto __108 + goto __109 case OP_Delete: - goto __109 + goto __110 case OP_ResetCount: - goto __110 + goto __111 case OP_SorterCompare: - goto __111 + goto __112 case OP_SorterData: - goto __112 + goto __113 case OP_RowData: - goto __113 + goto __114 case OP_Rowid: - goto __114 + goto __115 case OP_NullRow: - goto __115 + goto __116 case OP_SeekEnd: - goto __116 - case OP_Last: goto __117 + case OP_Last: + goto __118 case OP_IfSmaller: - goto __118 + goto __119 case OP_SorterSort: - goto __119 - case OP_Sort: goto __120 + case OP_Sort: + goto __121 case OP_Rewind: - goto __121 + goto __122 case OP_SorterNext: - goto __122 + goto __123 case OP_Prev: - goto __123 + goto __124 case OP_Next: - goto __124 + goto __125 case OP_IdxInsert: - goto __125 + goto __126 case OP_SorterInsert: - goto __126 + goto __127 case OP_IdxDelete: - goto __127 + goto __128 case OP_DeferredSeek: - goto __128 - case OP_IdxRowid: goto __129 + case OP_IdxRowid: + goto __130 case OP_FinishSeek: - goto __130 + goto __131 case OP_IdxLE: - goto __131 - case OP_IdxGT: goto __132 - case OP_IdxLT: + case OP_IdxGT: goto __133 - case OP_IdxGE: + case OP_IdxLT: goto __134 + case OP_IdxGE: + goto __135 case OP_Destroy: - goto __135 + goto __136 case OP_Clear: - goto __136 + goto __137 case OP_ResetSorter: - goto __137 + goto __138 case OP_CreateBtree: - goto __138 + goto __139 case OP_SqlExec: - goto __139 + goto __140 case OP_ParseSchema: - goto __140 + goto __141 case OP_LoadAnalysis: - goto __141 + goto __142 case OP_DropTable: - goto __142 + goto __143 case OP_DropIndex: - goto __143 + goto __144 case OP_DropTrigger: - goto __144 + goto __145 case OP_IntegrityCk: - goto __145 + goto __146 case OP_RowSetAdd: - goto __146 + goto __147 case OP_RowSetRead: - goto __147 + goto __148 case OP_RowSetTest: - goto __148 + goto __149 case OP_Program: - goto __149 + goto __150 case OP_Param: - goto __150 + goto __151 case OP_FkCounter: - goto __151 + goto __152 case OP_FkIfZero: - goto __152 + goto __153 case OP_MemMax: - goto __153 + goto __154 case OP_IfPos: - goto __154 + goto __155 case OP_OffsetLimit: - goto __155 + goto __156 case OP_IfNotZero: - goto __156 + goto __157 case OP_DecrJumpZero: - goto __157 + goto __158 case OP_AggInverse: - goto __158 - case OP_AggStep: goto __159 - case OP_AggStep1: + case OP_AggStep: goto __160 + case OP_AggStep1: + goto __161 case OP_AggValue: - goto __161 - case OP_AggFinal: goto __162 + case OP_AggFinal: + goto __163 case OP_Checkpoint: - goto __163 + goto __164 case OP_JournalMode: - goto __164 + goto __165 case OP_Vacuum: - goto __165 + goto __166 case OP_IncrVacuum: - goto __166 + goto __167 case OP_Expire: - goto __167 + goto __168 case OP_CursorLock: - goto __168 + goto __169 case OP_CursorUnlock: - goto __169 + goto __170 case OP_TableLock: - goto __170 + goto __171 case OP_VBegin: - goto __171 + goto __172 case OP_VCreate: - goto __172 + goto __173 case OP_VDestroy: - goto __173 + goto __174 case OP_VOpen: - goto __174 + goto __175 case OP_VInitIn: - goto __175 + goto __176 case OP_VFilter: - goto __176 + goto __177 case OP_VColumn: - goto __177 + goto __178 case OP_VNext: - goto __178 + goto __179 case OP_VRename: - goto __179 + goto __180 case OP_VUpdate: - goto __180 + goto __181 case OP_Pagecount: - goto __181 + goto __182 case OP_MaxPgcnt: - goto __182 + goto __183 case OP_PureFunc: - goto __183 - case OP_Function: goto __184 + case OP_Function: + goto __185 case OP_ClrSubtype: - goto __185 + goto __186 case OP_FilterAdd: - goto __186 + goto __187 case OP_Filter: - goto __187 + goto __188 case OP_Trace: - goto __188 - case OP_Init: goto __189 + case OP_Init: + goto __190 default: - goto __190 + goto __191 } - goto __8 + goto __9 -__9: +__10: jump_to_p2_and_check_for_interrupt: pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 check_for_interrupt: if !(*(*int32)(unsafe.Pointer(db + 432)) != 0) { - goto __191 + goto __192 } goto abort_due_to_interrupt -__191: - ; __192: + ; +__193: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __193 + goto __194 } 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 __194 + goto __195 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__194: +__195: ; - goto __192 -__193: + goto __193 +__194: ; - goto __8 + goto __9 -__10: +__11: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 @@ -44745,56 +44901,56 @@ __10: goto jump_to_p2_and_check_for_interrupt -__11: +__12: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __195 + goto __196 } if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __197 + goto __198 } -__197: +__198: ; pOp = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*24 - goto __196 -__195: + goto __197 +__196: if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __198 + goto __199 } -__198: +__199: ; -__196: +__197: ; - goto __8 + goto __9 -__12: +__13: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 *(*I64)(unsafe.Pointer(pOut)) = I64((*Op)(unsafe.Pointer(pOp)).Fp3 - 1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __199 + goto __200 } - goto __8 -__199: + goto __9 +__200: ; jump_to_p2: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __8 + goto __9 -__13: +__14: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pCaller = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*24 pOp = aOp + uintptr((*VdbeOp)(unsafe.Pointer(pCaller)).Fp2-1)*24 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Undefined) - goto __8 + goto __9 -__14: +__15: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Int) @@ -44802,19 +44958,20 @@ __14: *(*I64)(unsafe.Pointer(pIn1)) = I64(int32((int64(pOp) - int64(aOp)) / 24)) pOp = aOp + uintptr(pcDest)*24 - goto __8 + goto __9 -__15: +__16: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Null == 0) { - goto __200 + goto __201 } - goto __8 -__200: + goto __9 +__201: + ; +__17: ; -__16: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 && (*Op)(unsafe.Pointer(pOp)).Fp1 == SQLITE_OK) { - goto __201 + goto __202 } pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -44823,124 +44980,124 @@ __16: Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) pcx = Xsqlite3VdbeFrameRestore(tls, pFrame) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == OE_Ignore) { - goto __202 + goto __203 } pcx = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(pcx)*24)).Fp2 - 1 -__202: +__203: ; aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem pOp = aOp + uintptr(pcx)*24 - goto __8 -__201: + goto __9 +__202: ; (*Vdbe)(unsafe.Pointer(p)).Frc = (*Op)(unsafe.Pointer(pOp)).Fp1 (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8((*Op)(unsafe.Pointer(pOp)).Fp2) if !((*Vdbe)(unsafe.Pointer(p)).Frc != 0) { - goto __203 + goto __204 } if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __204 + goto __205 } - Xsqlite3VdbeError(tls, p, ts+5425, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5415, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { - goto __206 + goto __207 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5446, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) -__206: + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5436, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) +__207: ; - goto __205 -__204: - Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + goto __206 __205: + Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) +__206: ; pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5453, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) -__203: + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5443, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) +__204: ; rc = Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_BUSY) { - goto __207 + goto __208 } (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - goto __208 -__207: + goto __209 +__208: ; if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 { rc = SQLITE_ERROR } else { rc = SQLITE_DONE } -__208: +__209: ; goto vdbe_return -__17: +__18: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64((*Op)(unsafe.Pointer(pOp)).Fp1) - goto __8 + goto __9 -__18: +__19: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))) - goto __8 + goto __9 -__19: +__20: pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Real) *(*float64)(unsafe.Pointer(pOut)) = *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))) - goto __8 + goto __9 -__20: +__21: ; pOut = out2Prerelease(tls, p, pOp) (*Op)(unsafe.Pointer(pOp)).Fp1 = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pOp + 16))) if !(int32(encoding) != SQLITE_UTF8) { - goto __209 + goto __210 } rc = Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64(-1), uint8(SQLITE_UTF8), uintptr(0)) if !(rc != 0) { - goto __210 + goto __211 } goto too_big -__210: +__211: ; if !(SQLITE_OK != Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding))) { - goto __211 + goto __212 } goto no_mem -__211: +__212: ; (*Mem)(unsafe.Pointer(pOut)).FszMalloc = 0 *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Static) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6) { - goto __212 + goto __213 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__212: +__213: ; (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-6) *(*uintptr)(unsafe.Pointer(pOp + 16)) = (*Mem)(unsafe.Pointer(pOut)).Fz (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Mem)(unsafe.Pointer(pOut)).Fn -__209: +__210: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 > *(*int32)(unsafe.Pointer(db + 136))) { - goto __213 + goto __214 } goto too_big -__213: +__214: ; (*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_String) -__21: +__22: ; pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Str | MEM_Static | MEM_Term) @@ -44948,10 +45105,10 @@ __21: (*Mem)(unsafe.Pointer(pOut)).Fn = (*Op)(unsafe.Pointer(pOp)).Fp1 (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding - goto __8 + goto __9 -__22: __23: +__24: pOut = out2Prerelease(tls, p, pOp) cnt = (*Op)(unsafe.Pointer(pOp)).Fp3 - (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -44962,9 +45119,9 @@ __23: return uint16(MEM_Null) }()) (*Mem)(unsafe.Pointer(pOut)).Fn = 0 -__214: +__215: if !(cnt > 0) { - goto __215 + goto __216 } pOut += 56 @@ -44972,171 +45129,171 @@ __214: (*Mem)(unsafe.Pointer(pOut)).Fflags = nullFlag (*Mem)(unsafe.Pointer(pOut)).Fn = 0 cnt-- - goto __214 -__215: + goto __215 +__216: ; - goto __8 + goto __9 -__24: +__25: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_Undefined|MEM_AffMask) | MEM_Null) - goto __8 + goto __9 -__25: +__26: ; pOut = out2Prerelease(tls, p, pOp) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __216 + goto __217 } Xsqlite3VdbeMemSetZeroBlob(tls, pOut, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(Xsqlite3VdbeMemExpandBlob(tls, pOut) != 0) { - goto __218 + goto __219 } goto no_mem -__218: +__219: ; - goto __217 -__216: - Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64((*Op)(unsafe.Pointer(pOp)).Fp1), uint8(0), uintptr(0)) + goto __218 __217: + Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64((*Op)(unsafe.Pointer(pOp)).Fp1), uint8(0), uintptr(0)) +__218: ; (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding - goto __8 + goto __9 -__26: +__27: ; pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*56 if !(Xsqlite3VdbeMemTooBig(tls, pVar) != 0) { - goto __219 + goto __220 } goto too_big -__219: +__220: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __220 + goto __221 } Xsqlite3VdbeMemSetNull(tls, pOut) -__220: +__221: ; libc.Xmemcpy(tls, pOut, pVar, uint64(uintptr(0)+24)) *(*U16)(unsafe.Pointer(pOut + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Ephem)) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Static | MEM_FromBind) - goto __8 + goto __9 -__27: +__28: n = (*Op)(unsafe.Pointer(pOp)).Fp3 p1 = (*Op)(unsafe.Pointer(pOp)).Fp1 p2 = (*Op)(unsafe.Pointer(pOp)).Fp2 pIn1 = aMem + uintptr(p1)*56 pOut = aMem + uintptr(p2)*56 -__221: +__222: ; Xsqlite3VdbeMemMove(tls, pOut, pIn1) if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __224 + goto __225 } goto no_mem -__224: +__225: ; pIn1 += 56 pOut += 56 - goto __222 -__222: - if libc.PreDecInt32(&n, 1) != 0 { - goto __221 - } goto __223 __223: + if libc.PreDecInt32(&n, 1) != 0 { + goto __222 + } + goto __224 +__224: ; - goto __8 + goto __9 -__28: +__29: n1 = (*Op)(unsafe.Pointer(pOp)).Fp3 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 -__225: +__226: if !(1 != 0) { - goto __226 + goto __227 } Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __227 + goto __228 } goto no_mem -__227: +__228: ; if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Subtype != 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5)&0x0002 != 0) { - goto __228 + goto __229 } *(*U16)(unsafe.Pointer(pOut + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Subtype)) -__228: +__229: ; if !(libc.PostDecInt32(&n1, 1) == 0) { - goto __229 + goto __230 } - goto __226 -__229: + goto __227 +__230: ; pOut += 56 pIn1 += 56 - goto __225 -__226: + goto __226 +__227: ; - goto __8 + goto __9 -__29: +__30: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) - goto __8 + goto __9 -__30: +__31: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetInt64(tls, pOut, *(*I64)(unsafe.Pointer(pIn1))) - goto __8 + goto __9 -__31: +__32: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 0)) != SQLITE_OK) { - goto __230 + goto __231 } goto abort_due_to_error -__230: +__231: ; - goto __8 + goto __9 -__32: +__33: ; (*Vdbe)(unsafe.Pointer(p)).FcacheCtr = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + U32(2) | U32(1) - (*Vdbe)(unsafe.Pointer(p)).FpResultSet = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 + (*Vdbe)(unsafe.Pointer(p)).FpResultRow = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __231 + goto __232 } goto no_mem -__231: +__232: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_ROW != 0) { - goto __232 + goto __233 } (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_ROW), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, uintptr(0)) -__232: +__233: ; (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp)-int64(aOp))/24) + 1 rc = SQLITE_ROW goto vdbe_return -__33: +__34: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -45144,95 +45301,95 @@ __33: flags1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags if !((int32(flags1)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __233 + goto __234 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __8 -__233: + goto __9 +__234: ; if !(int32(flags1)&(MEM_Str|MEM_Blob) == 0) { - goto __234 + goto __235 } if !(Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(0)) != 0) { - goto __236 + goto __237 } goto no_mem -__236: +__237: ; flags1 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)) - goto __235 -__234: + goto __236 +__235: if !(int32(flags1)&MEM_Zero != 0) { - goto __237 + goto __238 } if !(Xsqlite3VdbeMemExpandBlob(tls, pIn1) != 0) { - goto __238 + goto __239 } goto no_mem -__238: +__239: ; flags1 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)) -__237: +__238: ; -__235: +__236: ; flags2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags if !(int32(flags2)&(MEM_Str|MEM_Blob) == 0) { - goto __239 + goto __240 } if !(Xsqlite3VdbeMemStringify(tls, pIn2, encoding, uint8(0)) != 0) { - goto __241 + goto __242 } goto no_mem -__241: +__242: ; flags2 = U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)) - goto __240 -__239: + goto __241 +__240: if !(int32(flags2)&MEM_Zero != 0) { - goto __242 + goto __243 } if !(Xsqlite3VdbeMemExpandBlob(tls, pIn2) != 0) { - goto __243 + goto __244 } goto no_mem -__243: +__244: ; flags2 = U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)) -__242: +__243: ; -__240: +__241: ; nByte = I64((*Mem)(unsafe.Pointer(pIn1)).Fn + (*Mem)(unsafe.Pointer(pIn2)).Fn) if !(nByte > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __244 + goto __245 } goto too_big -__244: +__245: ; if !(Xsqlite3VdbeMemGrow(tls, pOut, int32(nByte)+2, libc.Bool32(pOut == pIn2)) != 0) { - goto __245 + goto __246 } goto no_mem -__245: +__246: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Str) if !(pOut != pIn2) { - goto __246 + goto __247 } libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz, (*Mem)(unsafe.Pointer(pIn2)).Fz, uint64((*Mem)(unsafe.Pointer(pIn2)).Fn)) (*Mem)(unsafe.Pointer(pIn2)).Fflags = flags2 -__246: +__247: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz+uintptr((*Mem)(unsafe.Pointer(pIn2)).Fn), (*Mem)(unsafe.Pointer(pIn1)).Fz, uint64((*Mem)(unsafe.Pointer(pIn1)).Fn)) (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags1 if !(int32(encoding) > SQLITE_UTF8) { - goto __247 + goto __248 } nByte = nByte & int64(libc.CplInt32(1)) -__247: +__248: ; *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte+int64(1)))) = int8(0) @@ -45240,231 +45397,231 @@ __247: (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte) (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding - goto __8 + goto __9 -__34: __35: __36: __37: __38: +__39: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32(type1)&int32(type2)&MEM_Int != 0) { - goto __248 + goto __249 } int_math: iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __251 - case OP_Subtract: goto __252 - case OP_Multiply: + case OP_Subtract: goto __253 - case OP_Divide: + case OP_Multiply: goto __254 - default: + case OP_Divide: goto __255 - } - goto __250 -__251: - if !(Xsqlite3AddInt64(tls, bp+208, iA) != 0) { + default: goto __256 } - goto fp_math -__256: - ; - goto __250 + goto __251 __252: - if !(Xsqlite3SubInt64(tls, bp+208, iA) != 0) { + if !(Xsqlite3AddInt64(tls, bp+208, iA) != 0) { goto __257 } goto fp_math __257: ; - goto __250 + goto __251 __253: - if !(Xsqlite3MulInt64(tls, bp+208, iA) != 0) { + if !(Xsqlite3SubInt64(tls, bp+208, iA) != 0) { goto __258 } goto fp_math __258: ; - goto __250 + goto __251 __254: - if !(iA == int64(0)) { + if !(Xsqlite3MulInt64(tls, bp+208, iA) != 0) { goto __259 } - goto arithmetic_result_is_null + goto fp_math __259: ; - if !(iA == int64(-1) && *(*I64)(unsafe.Pointer(bp + 208)) == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + goto __251 +__255: + if !(iA == int64(0)) { goto __260 } - goto fp_math + goto arithmetic_result_is_null __260: ; + if !(iA == int64(-1) && *(*I64)(unsafe.Pointer(bp + 208)) == int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { + goto __261 + } + goto fp_math +__261: + ; *(*I64)(unsafe.Pointer(bp + 208)) /= iA - goto __250 + goto __251 -__255: +__256: if !(iA == int64(0)) { - goto __261 + goto __262 } goto arithmetic_result_is_null -__261: +__262: ; if !(iA == int64(-1)) { - goto __262 + goto __263 } iA = int64(1) -__262: +__263: ; *(*I64)(unsafe.Pointer(bp + 208)) %= iA - goto __250 + goto __251 -__250: +__251: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 208)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) - goto __249 -__248: + goto __250 +__249: if !((int32(type1)|int32(type2))&MEM_Null != 0) { - goto __263 + goto __264 } goto arithmetic_result_is_null - goto __264 -__263: + goto __265 +__264: type1 = numericType(tls, pIn1) type2 = numericType(tls, pIn2) if !(int32(type1)&int32(type2)&MEM_Int != 0) { - goto __265 + goto __266 } goto int_math -__265: +__266: ; fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: - goto __267 - case OP_Subtract: goto __268 - case OP_Multiply: + case OP_Subtract: goto __269 - case OP_Divide: + case OP_Multiply: goto __270 - default: + case OP_Divide: goto __271 + default: + goto __272 } - goto __266 -__267: - rB = rB + rA - goto __266 + goto __267 __268: - rB = rB - rA - goto __266 + rB = rB + rA + goto __267 __269: - rB = rB * rA - goto __266 + rB = rB - rA + goto __267 __270: + rB = rB * rA + goto __267 +__271: if !(rA == float64(0)) { - goto __272 + goto __273 } goto arithmetic_result_is_null -__272: +__273: ; rB = rB / rA - goto __266 + goto __267 -__271: +__272: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { - goto __273 + goto __274 } goto arithmetic_result_is_null -__273: +__274: ; if !(iA == int64(-1)) { - goto __274 + goto __275 } iA = int64(1) -__274: +__275: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) - goto __266 + goto __267 -__266: +__267: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { - goto __275 + goto __276 } goto arithmetic_result_is_null -__275: +__276: ; *(*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) -__264: +__265: ; -__249: +__250: ; - goto __8 + goto __9 arithmetic_result_is_null: Xsqlite3VdbeMemSetNull(tls, pOut) - goto __8 + goto __9 -__39: +__40: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __276 + goto __277 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) -__276: +__277: ; - goto __8 + goto __9 -__40: __41: __42: __43: +__44: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __277 + goto __278 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __8 -__277: + goto __9 +__278: ; *(*I64)(unsafe.Pointer(bp + 224)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { - goto __278 + goto __279 } *(*I64)(unsafe.Pointer(bp + 224)) &= iB1 - goto __279 -__278: + goto __280 +__279: if !(int32(op) == OP_BitOr) { - goto __280 + goto __281 } *(*I64)(unsafe.Pointer(bp + 224)) |= iB1 - goto __281 -__280: + goto __282 +__281: if !(iB1 != int64(0)) { - goto __282 + goto __283 } if !(iB1 < int64(0)) { - goto __283 + goto __284 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) @@ -45473,95 +45630,95 @@ __280: } else { iB1 = int64(64) } -__283: +__284: ; if !(iB1 >= int64(64)) { - goto __284 + goto __285 } 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 __285 -__284: + goto __286 +__285: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { - goto __286 + goto __287 } *(*U64)(unsafe.Pointer(bp + 216)) <<= iB1 - goto __287 -__286: + goto __288 +__287: *(*U64)(unsafe.Pointer(bp + 216)) >>= iB1 if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { - goto __288 + goto __289 } *(*U64)(unsafe.Pointer(bp + 216)) |= (uint64(0xffffffff)<<32 | uint64(0xffffffff)) << (int64(64) - iB1) -__288: +__289: ; -__287: +__288: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) -__285: +__286: ; -__282: +__283: ; -__281: +__282: ; -__279: +__280: ; *(*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) - goto __8 + goto __9 -__44: +__45: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 Xsqlite3VdbeMemIntegerify(tls, pIn1) *(*I64)(unsafe.Pointer(pIn1)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __8 + goto __9 -__45: +__46: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __290 + goto __291 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __291 + goto __292 } rc = SQLITE_MISMATCH goto abort_due_to_error - goto __292 -__291: - goto jump_to_p2 + goto __293 __292: + goto jump_to_p2 +__293: ; -__290: +__291: ; -__289: +__290: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) - goto __8 + goto __9 -__46: +__47: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __293 + goto __294 } Xsqlite3VdbeMemRealify(tls, pIn1) -__293: +__294: ; - goto __8 + goto __9 -__47: +__48: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 @@ -45572,188 +45729,192 @@ __47: return 0 }() if !(rc != 0) { - goto __294 + goto __295 } goto abort_due_to_error -__294: +__295: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { - goto __295 + goto __296 } goto abort_due_to_error -__295: +__296: ; - goto __8 + goto __9 -__48: __49: __50: __51: __52: __53: +__54: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { - goto __296 + goto __297 } if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { - goto __297 + goto __298 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __299 + goto __300 } goto jump_to_p2 -__299: +__300: ; iCompare = +1 - goto __298 -__297: + + goto __299 +__298: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { - goto __300 + goto __301 } if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __302 + goto __303 } goto jump_to_p2 -__302: +__303: ; iCompare = -1 - goto __301 -__300: + + goto __302 +__301: if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { - goto __303 + goto __304 } goto jump_to_p2 -__303: +__304: ; iCompare = 0 -__301: + +__302: ; -__298: +__299: ; - goto __8 -__296: + goto __9 +__297: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { - goto __304 + goto __305 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { - goto __306 + goto __307 } if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { - goto __308 + goto __309 } res = 0 - goto __309 -__308: + goto __310 +__309: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() -__309: +__310: ; - goto __307 -__306: + goto __308 +__307: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { - goto __310 + goto __311 } goto jump_to_p2 -__310: +__311: ; iCompare = 1 - goto __8 -__307: + + goto __9 +__308: ; - goto __305 -__304: + goto __306 +__305: affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { - goto __311 + goto __312 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { - goto __313 + goto __314 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __314 + goto __315 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags -__314: +__315: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { - goto __315 + goto __316 } applyNumericAffinity(tls, pIn3, 0) -__315: +__316: ; -__313: +__314: ; - goto __312 -__311: - if !(int32(affinity) == SQLITE_AFF_TEXT) { - goto __316 + goto __313 +__312: + if !(int32(affinity) == SQLITE_AFF_TEXT && (int32(flags11)|int32(flags3))&MEM_Str != 0) { + goto __317 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __317 + goto __318 } 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 __318 + goto __319 } flags3 = U16(int32(flags11) | MEM_Str) -__318: +__319: ; -__317: +__318: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { - goto __319 + goto __320 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) -__319: +__320: ; -__316: +__317: ; -__312: +__313: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__305: +__306: ; if !(res < 0) { - goto __320 + goto __321 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __321 -__320: + goto __322 +__321: if !(res == 0) { - goto __322 + goto __323 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) - goto __323 -__322: - res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) + goto __324 __323: + res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) +__324: ; -__321: +__322: ; iCompare = res @@ -45762,38 +45923,38 @@ __321: (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { - goto __324 + goto __325 } goto jump_to_p2 -__324: +__325: ; - goto __8 + goto __9 -__54: +__55: ; if !(iCompare == 0) { - goto __325 + goto __326 } goto jump_to_p2 -__325: +__326: ; - goto __8 + goto __9 -__55: +__56: ; - goto __8 + goto __9 -__56: +__57: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { - goto __326 + goto __327 } aPermute = uintptr(0) - goto __327 -__326: + goto __328 +__327: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 -__327: +__328: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -45801,9 +45962,9 @@ __327: p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i = 0 -__328: +__329: if !(i < n2) { - goto __330 + goto __331 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) @@ -45814,298 +45975,299 @@ __328: pColl = *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) 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 __331 + goto __332 } 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 __332 + goto __333 } iCompare = -iCompare -__332: +__333: ; if !(bRev != 0) { - goto __333 + goto __334 } iCompare = -iCompare -__333: +__334: ; - goto __330 -__331: + goto __331 +__332: ; - goto __329 -__329: - i++ - goto __328 goto __330 __330: + i++ + goto __329 + goto __331 +__331: ; - goto __8 + goto __9 -__57: +__58: ; if !(iCompare < 0) { - goto __334 + goto __335 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 - goto __335 -__334: + goto __336 +__335: if !(iCompare == 0) { - goto __336 + goto __337 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 - goto __337 -__336: + goto __338 +__337: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 -__337: +__338: ; -__335: +__336: ; - goto __8 + goto __9 -__58: __59: +__60: 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 __338 + goto __339 } v1 = int32(and_logic[v1*3+v2]) - goto __339 -__338: - v1 = int32(or_logic[v1*3+v2]) + goto __340 __339: + v1 = int32(or_logic[v1*3+v2]) +__340: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { - goto __340 + goto __341 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) - goto __341 -__340: + goto __342 +__341: *(*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) -__341: +__342: ; - goto __8 + goto __9 -__60: +__61: ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3)^*(*int32)(unsafe.Pointer(pOp + 16)))) - goto __8 + goto __9 -__61: +__62: 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 __342 + goto __343 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) - goto __343 -__342: - Xsqlite3VdbeMemSetNull(tls, pOut) + goto __344 __343: + Xsqlite3VdbeMemSetNull(tls, pOut) +__344: ; - goto __8 + goto __9 -__62: +__63: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __344 + goto __345 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) -__344: +__345: ; - goto __8 + goto __9 -__63: +__64: ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __345 + goto __346 } 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 __347 + goto __348 } goto jump_to_p2 -__347: +__348: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) - goto __346 -__345: + goto __347 +__346: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { - goto __348 + goto __349 } goto jump_to_p2 -__348: +__349: ; -__346: +__347: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 - goto __8 + goto __9 -__64: +__65: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { - goto __349 + goto __350 } goto jump_to_p2 -__349: +__350: ; - goto __8 + goto __9 -__65: +__66: 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 __350 + goto __351 } goto jump_to_p2 -__350: +__351: ; - goto __8 + goto __9 -__66: +__67: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { - goto __351 + goto __352 } goto jump_to_p2 -__351: +__352: ; - goto __8 + goto __9 -__67: +__68: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= 0) { - goto __352 + goto __353 } pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { - goto __354 + goto __355 } serialType = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*4)) if !(serialType >= U32(12)) { - goto __356 + goto __357 } if !(serialType&U32(1) != 0) { - goto __358 + goto __359 } typeMask = U16(0x04) - goto __359 -__358: - typeMask = U16(0x08) + goto __360 __359: + typeMask = U16(0x08) +__360: ; - goto __357 -__356: + goto __358 +__357: ; typeMask = U16(aMask[serialType]) -__357: +__358: ; - goto __355 -__354: + goto __356 +__355: typeMask = U16(int32(1) << (*(*int32)(unsafe.Pointer(pOp + 16)) - 1)) -__355: +__356: ; - goto __353 -__352: + goto __354 +__353: ; typeMask = U16(int32(1) << (Xsqlite3_value_type(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - 1)) -__353: +__354: ; if !(int32(typeMask)&int32((*Op)(unsafe.Pointer(pOp)).Fp5) != 0) { - goto __360 + goto __361 } goto jump_to_p2 -__360: +__361: ; - goto __8 + goto __9 -__68: +__69: 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 __361 + goto __362 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - goto __362 -__361: - Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) + goto __363 __362: + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) +__363: ; - goto __8 + goto __9 -__69: +__70: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __363 + goto __364 } goto jump_to_p2 -__363: +__364: ; - goto __8 + goto __9 -__70: +__71: ; 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 + goto __365 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 -__364: +__365: ; - goto __8 + goto __9 -__71: +__72: ; 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 !(pC2 == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC2)).FeCurType) != CURTYPE_BTREE) { - goto __365 + goto __366 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __366 -__365: + goto __367 +__366: if !((*VdbeCursor)(unsafe.Pointer(pC2)).FdeferredMoveto != 0) { - goto __367 + goto __368 } rc = Xsqlite3VdbeFinishMoveto(tls, pC2) if !(rc != 0) { - goto __368 + goto __369 } goto abort_due_to_error -__368: +__369: ; -__367: +__368: ; if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48))) != 0) { - goto __369 + goto __370 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __370 -__369: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) + goto __371 __370: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 48)))) +__371: ; -__366: +__367: ; - goto __8 + goto __9 -__72: +__73: ; pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) @@ -46115,144 +46277,144 @@ op_column_restart: aOffset = (*VdbeCursor)(unsafe.Pointer(pC3)).FaOffset if !((*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { - goto __371 + goto __372 } if !((*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow != 0) { - goto __373 + goto __374 } if !(int32((*VdbeCursor)(unsafe.Pointer(pC3)).FeCurType) == CURTYPE_PSEUDO && (*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult > 0) { - goto __375 + goto __376 } pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FseekResult)*56 (*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: + goto __377 +__376: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__376: +__377: ; - goto __374 -__373: + goto __375 +__374: pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 48)) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { - goto __377 + goto __378 } 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 + goto __380 } pC3 = (*VdbeCursor)(unsafe.Pointer(pC3)).FpAltCursor p22 = iMap - U32(1) goto op_column_restart -__379: +__380: ; rc = Xsqlite3VdbeFinishMoveto(tls, pC3) if !(rc != 0) { - goto __380 + goto __381 } goto abort_due_to_error -__380: +__381: ; - goto __378 -__377: + goto __379 +__378: if !(Xsqlite3BtreeCursorHasMoved(tls, pCrsr) != 0) { - goto __381 + goto __382 } rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __382 + goto __383 } goto abort_due_to_error -__382: +__383: ; goto op_column_restart -__381: +__382: ; -__378: +__379: ; (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, pC3+108) -__374: +__375: ; (*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 + goto __384 } (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(1) - goto __384 -__383: - (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) + goto __385 __384: + (*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset = U32(Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow, aOffset)) +__385: ; (*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { - goto __385 + goto __386 } (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = uintptr(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FszRow = U32(0) if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize) { - goto __387 + goto __388 } goto op_column_corrupt -__387: +__388: ; - goto __386 -__385: + goto __387 +__386: zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow goto op_column_read_header -__386: +__387: ; - goto __372 -__371: + goto __373 +__372: if !(Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) != 0) { - goto __388 + goto __389 } rc = Xsqlite3VdbeHandleMovedCursor(tls, pC3) if !(rc != 0) { - goto __389 + goto __390 } goto abort_due_to_error -__389: +__390: ; goto op_column_restart -__388: +__389: ; -__372: +__373: ; if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { - goto __390 + goto __391 } if !((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { - goto __392 + goto __393 } if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { - goto __394 + goto __395 } libc.Xmemset(tls, bp+232, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __396 + goto __397 } goto abort_due_to_error -__396: +__397: ; zData = (*Mem)(unsafe.Pointer(bp + 232)).Fz - goto __395 -__394: - zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + goto __396 __395: + zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow +__396: ; op_column_read_header: i1 = int32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) @@ -46260,353 +46422,353 @@ op_column_read_header: zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(pC3)).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) -__397: +__398: if !(libc.AssignPtrUint32(pC3+112+uintptr(i1)*4, libc.AssignPtrUint32(bp+288, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __400 + goto __401 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 288))))) - goto __401 -__400: + goto __402 +__401: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, 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)))) -__401: +__402: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i1, 1))*4)) = U32(offset64 & uint64(0xffffffff)) - goto __398 -__398: - if U32(i1) <= p22 && zHdr < zEndHdr { - goto __397 - } goto __399 __399: + if U32(i1) <= p22 && zHdr < zEndHdr { + goto __398 + } + goto __400 +__400: ; if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize)) { - goto __402 + goto __403 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { - goto __403 + goto __404 } i1 = 0 zHdr = zEndHdr - goto __404 -__403: + goto __405 +__404: if !((*VdbeCursor)(unsafe.Pointer(pC3)).FaRow == uintptr(0)) { - goto __405 + goto __406 } Xsqlite3VdbeMemRelease(tls, bp+232) -__405: +__406: ; goto op_column_corrupt -__404: +__405: ; -__402: +__403: ; (*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 + goto __407 } Xsqlite3VdbeMemRelease(tls, bp+232) -__406: +__407: ; - goto __393 -__392: - *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) + goto __394 __393: + *(*U32)(unsafe.Pointer(bp + 288)) = U32(0) +__394: ; if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { - goto __407 + goto __408 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -10) { - goto __408 + goto __409 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) - goto __409 -__408: - Xsqlite3VdbeMemSetNull(tls, pDest) + goto __410 __409: + Xsqlite3VdbeMemSetNull(tls, pDest) +__410: ; goto op_column_out -__407: +__408: ; - goto __391 -__390: - *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) + goto __392 __391: + *(*U32)(unsafe.Pointer(bp + 288)) = *(*U32)(unsafe.Pointer(pC3 + 112 + uintptr(p22)*4)) +__392: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { - goto __410 + goto __411 } Xsqlite3VdbeMemSetNull(tls, pDest) -__410: +__411: ; if !((*VdbeCursor)(unsafe.Pointer(pC3)).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(p22+U32(1))*4))) { - goto __411 + goto __412 } zData = (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4))) if !(*(*U32)(unsafe.Pointer(bp + 288)) < U32(12)) { - goto __413 + goto __414 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __414 -__413: + goto __415 +__414: (*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 __415 + goto __416 } if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __417 + goto __418 } goto too_big -__417: +__418: ; (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { - goto __418 + goto __419 } goto no_mem -__418: +__419: ; - goto __416 -__415: - (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc + goto __417 __416: + (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc +__417: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 288))&U32(1)] -__414: +__415: ; - goto __412 -__411: + goto __413 +__412: (*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 __419 + goto __420 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 288)), pDest) - goto __420 -__419: + goto __421 +__420: if !(len > *(*int32)(unsafe.Pointer(db + 136))) { - goto __421 + goto __422 } goto too_big -__421: +__422: ; rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(p22)*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { - goto __422 + goto __423 } goto abort_due_to_error -__422: +__423: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 288)), pDest) *(*U16)(unsafe.Pointer(pDest + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) -__420: +__421: ; -__412: +__413: ; op_column_out: ; - goto __8 + goto __9 op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { - goto __423 + goto __424 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 - goto __8 - goto __424 -__423: - rc = Xsqlite3CorruptError(tls, 92777) - goto abort_due_to_error + goto __9 + goto __425 __424: + rc = Xsqlite3CorruptError(tls, 93317) + goto abort_due_to_error +__425: ; -__73: +__74: ; pTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i2 = 0 -__425: +__426: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __427 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __428 + goto __429 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __429 + goto __430 } - goto __426 -__429: + goto __427 +__430: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __430 + goto __431 } pIn1 += 56 - goto __426 -__430: + goto __427 +__431: ; -__428: +__429: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __431 + goto __432 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: - goto __433 - case COLTYPE_INTEGER: goto __434 - case COLTYPE_INT: + case COLTYPE_INTEGER: goto __435 - case COLTYPE_TEXT: + case COLTYPE_INT: goto __436 - case COLTYPE_REAL: + case COLTYPE_TEXT: goto __437 - default: + case COLTYPE_REAL: goto __438 - } - goto __432 -__433: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { + default: goto __439 } - goto vdbe_type_error -__439: - ; - goto __432 - + goto __433 __434: -__435: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { goto __440 } goto vdbe_type_error __440: ; - goto __432 + goto __433 +__435: __436: - if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { goto __441 } goto vdbe_type_error __441: ; - goto __432 + goto __433 __437: + if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { + goto __442 + } + goto vdbe_type_error +__442: + ; + goto __433 + +__438: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __442 + goto __443 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __444 + goto __445 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __445 -__444: + goto __446 +__445: *(*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)) -__445: +__446: ; - goto __443 -__442: + goto __444 +__443: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { - goto __446 + goto __447 } goto vdbe_type_error -__446: +__447: ; -__443: +__444: ; - goto __432 + goto __433 -__438: - goto __432 +__439: + goto __433 -__432: +__433: ; -__431: +__432: ; pIn1 += 56 - goto __426 -__426: - i2++ - goto __425 goto __427 __427: + i2++ + goto __426 + goto __428 +__428: ; - goto __8 + goto __9 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5477, + Xsqlite3VdbeError(tls, p, ts+5467, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 goto abort_due_to_error -__74: +__75: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__447: +__448: if !(1 != 0) { - goto __448 + goto __449 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __449 + goto __450 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __450 + goto __451 } *(*U16)(unsafe.Pointer(pIn1 + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) - goto __451 -__450: + goto __452 +__451: *(*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)) -__451: +__452: ; -__449: +__450: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { - goto __452 + goto __453 } - goto __448 -__452: + goto __449 +__453: ; pIn1 += 56 - goto __447 -__448: + goto __448 +__449: ; - goto __8 + goto __9 -__75: +__76: nData = uint64(0) nHdr = 0 nZero = int64(0) @@ -46620,787 +46782,787 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(zAffinity1 != 0) { - goto __453 + goto __454 } pRec = pData0 -__454: +__455: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __457 + goto __458 } *(*U16)(unsafe.Pointer(pRec + 20)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__457: +__458: ; zAffinity1++ pRec += 56 - goto __455 -__455: - if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __454 - } goto __456 __456: + if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { + goto __455 + } + goto __457 +__457: ; -__453: +__454: ; pRec = pLast -__458: +__459: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { - goto __461 + goto __462 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __463 + goto __464 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) - goto __464 -__463: - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) + goto __465 __464: + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) +__465: ; nHdr++ - goto __462 -__461: + goto __463 +__462: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { - goto __465 + goto __466 } i3 = *(*I64)(unsafe.Pointer(pRec)) if !(i3 < int64(0)) { - goto __467 + goto __468 } uu = U64(^i3) - goto __468 -__467: - uu = U64(i3) + goto __469 __468: + uu = U64(i3) +__469: ; nHdr++ if !(uu <= uint64(127)) { - goto __469 + goto __470 } if !(i3&int64(1) == i3 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) >= 4) { - goto __471 + goto __472 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) - goto __472 -__471: + goto __473 +__472: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) -__472: +__473: ; - goto __470 -__469: + goto __471 +__470: if !(uu <= uint64(32767)) { - goto __473 + goto __474 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) - goto __474 -__473: + goto __475 +__474: if !(uu <= uint64(8388607)) { - goto __475 + goto __476 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) - goto __476 -__475: + goto __477 +__476: if !(uu <= uint64(2147483647)) { - goto __477 + goto __478 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) - goto __478 -__477: + goto __479 +__478: if !(uu <= uint64(140737488355327)) { - goto __479 + goto __480 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) - goto __480 -__479: + goto __481 +__480: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { - goto __481 + goto __482 } *(*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 __482 -__481: - (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) + goto __483 __482: + (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) +__483: ; -__480: +__481: ; -__478: +__479: ; -__476: +__477: ; -__474: +__475: ; -__470: +__471: ; - goto __466 -__465: + goto __467 +__466: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { - goto __483 + goto __484 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) - goto __484 -__483: + goto __485 +__484: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { - goto __485 + goto __486 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { - goto __486 + goto __487 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { - goto __488 + goto __489 } goto no_mem -__488: +__489: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) - goto __487 -__486: - nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) + goto __488 __487: + nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) +__488: ; -__485: +__486: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type -__484: +__485: ; -__466: +__467: ; -__462: +__463: ; if !(pRec == pData0) { - goto __489 + goto __490 } - goto __460 -__489: + goto __461 +__490: ; pRec -= 56 - goto __459 -__459: - if 1 != 0 { - goto __458 - } goto __460 __460: + if 1 != 0 { + goto __459 + } + goto __461 +__461: ; if !(nHdr <= 126) { - goto __490 + goto __491 } nHdr = nHdr + 1 - goto __491 -__490: + goto __492 +__491: nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { - goto __492 + goto __493 } nHdr++ -__492: +__493: ; -__491: +__492: ; nByte1 = I64(U64(nHdr) + nData) if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { - goto __493 + goto __494 } (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc - goto __494 -__493: + goto __495 +__494: if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __495 + goto __496 } goto too_big -__495: +__496: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { - goto __496 + goto __497 } goto no_mem -__496: +__497: ; -__494: +__495: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { - goto __497 + goto __498 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 20)) |= U16(MEM_Zero) -__497: +__498: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) if !(nHdr < 0x80) { - goto __498 + goto __499 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(nHdr) - goto __499 -__498: - zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) + goto __500 __499: + zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) +__500: ; pRec = pData0 -__500: +__501: if !(1 != 0) { - goto __501 + goto __502 } serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp if !(serial_type <= U32(7)) { - goto __502 + goto __503 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type == U32(0)) { - goto __504 + goto __505 } - goto __505 -__504: + goto __506 +__505: if !(serial_type == U32(7)) { - goto __506 + goto __507 } libc.Xmemcpy(tls, bp+296, pRec, uint64(unsafe.Sizeof(U64(0)))) - goto __507 -__506: - *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) + goto __508 __507: + *(*U64)(unsafe.Pointer(bp + 296)) = U64(*(*I64)(unsafe.Pointer(pRec))) +__508: ; len1 = libc.AssignUint32(&i4, U32(Xsqlite3SmallTypeSizes[serial_type])) -__508: +__509: if !(1 != 0) { - goto __509 + goto __510 } *(*U8)(unsafe.Pointer(zPayload + uintptr(libc.PreDecUint32(&i4, 1)))) = U8(*(*U64)(unsafe.Pointer(bp + 296)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __510 + goto __511 } - goto __509 -__510: + goto __510 +__511: ; *(*U64)(unsafe.Pointer(bp + 296)) >>= 8 - goto __508 -__509: + goto __509 +__510: ; zPayload += uintptr(len1) -__505: +__506: ; - goto __503 -__502: + goto __504 +__503: if !(serial_type < U32(0x80)) { - goto __511 + goto __512 } *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&zHdr1, 1))) = U8(serial_type) if !(serial_type >= U32(14) && (*Mem)(unsafe.Pointer(pRec)).Fn > 0) { - goto __513 + goto __514 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__513: +__514: ; - goto __512 -__511: + goto __513 +__512: zHdr1 += uintptr(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) if !((*Mem)(unsafe.Pointer(pRec)).Fn != 0) { - goto __514 + goto __515 } libc.Xmemcpy(tls, zPayload, (*Mem)(unsafe.Pointer(pRec)).Fz, uint64((*Mem)(unsafe.Pointer(pRec)).Fn)) zPayload += uintptr((*Mem)(unsafe.Pointer(pRec)).Fn) -__514: +__515: ; -__512: +__513: ; -__503: +__504: ; if !(pRec == pLast) { - goto __515 + goto __516 } - goto __501 -__515: + goto __502 +__516: ; pRec += 56 - goto __500 -__501: + goto __501 +__502: ; - goto __8 + goto __9 -__76: +__77: ; 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 __516 + goto __517 } *(*I64)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __517 -__516: + goto __518 +__517: *(*I64)(unsafe.Pointer(bp + 304)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+304) if !(rc != 0) { - goto __518 + goto __519 } goto abort_due_to_error -__518: +__519: ; -__517: +__518: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 304)) goto check_for_interrupt -__77: +__78: p12 = (*Op)(unsafe.Pointer(pOp)).Fp1 zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(p12 == SAVEPOINT_BEGIN) { - goto __519 + goto __520 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __521 + goto __522 } - Xsqlite3VdbeError(tls, p, ts+5518, 0) + Xsqlite3VdbeError(tls, p, ts+5508, 0) rc = SQLITE_BUSY - goto __522 -__521: + goto __523 +__522: 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 __523 + goto __524 } goto abort_due_to_error -__523: +__524: ; pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { - goto __524 + goto __525 } (*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 __525 + goto __526 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) - goto __526 -__525: - (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ + goto __527 __526: + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ +__527: ; (*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 -__524: +__525: ; -__522: +__523: ; - goto __520 -__519: + goto __521 +__520: ; iSavepoint = 0 pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint -__527: +__528: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { - goto __529 + goto __530 } iSavepoint++ - goto __528 -__528: - pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext - goto __527 goto __529 __529: + pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext + goto __528 + goto __530 +__530: ; if !!(pSavepoint != 0) { - goto __530 + goto __531 } - Xsqlite3VdbeError(tls, p, ts+5569, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5559, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR - goto __531 -__530: + goto __532 +__531: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { - goto __532 + goto __533 } Xsqlite3VdbeError(tls, p, - ts+5591, 0) + ts+5581, 0) rc = SQLITE_BUSY - goto __533 -__532: + goto __534 +__533: isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { - goto __534 + goto __535 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __536 + goto __537 } goto vdbe_return -__536: +__537: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __537 + goto __538 } (*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 -__537: +__538: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { - goto __538 + goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) - goto __539 -__538: - (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) + goto __540 __539: + (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) +__540: ; - goto __535 -__534: + goto __536 +__535: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { - goto __540 + goto __541 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 -__542: +__543: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __544 + goto __545 } 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 __545 + goto __546 } goto abort_due_to_error -__545: +__546: ; - goto __543 -__543: - ii++ - goto __542 goto __544 __544: + ii++ + goto __543 + goto __545 +__545: ; - goto __541 -__540: + goto __542 +__541: ; isSchemaChange = 0 -__541: +__542: ; ii = 0 -__546: +__547: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __548 + goto __549 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __549 + goto __550 } goto abort_due_to_error -__549: +__550: ; - goto __547 -__547: - ii++ - goto __546 goto __548 __548: + ii++ + goto __547 + goto __549 +__549: ; if !(isSchemaChange != 0) { - goto __550 + goto __551 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) -__550: +__551: ; -__535: +__536: ; if !(rc != 0) { - goto __551 + goto __552 } goto abort_due_to_error -__551: - ; __552: + ; +__553: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { - goto __553 + goto __554 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- - goto __552 -__553: + goto __553 +__554: ; if !(p12 == SAVEPOINT_RELEASE) { - goto __554 + goto __555 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { - goto __556 + goto __557 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- -__556: +__557: ; - goto __555 -__554: + goto __556 +__555: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons -__555: +__556: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { - goto __557 + goto __558 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { - goto __558 + goto __559 } goto abort_due_to_error -__558: +__559: ; -__557: +__558: ; -__533: +__534: ; -__531: +__532: ; -__520: +__521: ; if !(rc != 0) { - goto __559 + goto __560 } goto abort_due_to_error -__559: +__560: ; if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_HALT_STATE) { - goto __560 + goto __561 } rc = SQLITE_DONE goto vdbe_return -__560: +__561: ; - goto __8 + goto __9 -__78: +__79: desiredAutoCommit = (*Op)(unsafe.Pointer(pOp)).Fp1 iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { - goto __561 + goto __562 } if !(iRollback != 0) { - goto __563 + goto __564 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) - goto __564 -__563: + goto __565 +__564: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { - goto __565 + goto __566 } Xsqlite3VdbeError(tls, p, - ts+5645, 0) + ts+5635, 0) rc = SQLITE_BUSY goto abort_due_to_error - goto __566 -__565: + goto __567 +__566: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { - goto __567 + goto __568 } goto vdbe_return - goto __568 -__567: - (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) + goto __569 __568: + (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) +__569: ; -__566: +__567: ; -__564: +__565: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { - goto __569 + goto __570 } (*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 -__569: +__570: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { - goto __570 + goto __571 } rc = SQLITE_DONE - goto __571 -__570: - rc = SQLITE_ERROR + goto __572 __571: + rc = SQLITE_ERROR +__572: ; goto vdbe_return - goto __562 -__561: + goto __563 +__562: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5700 + return ts + 5690 } return func() uintptr { if iRollback != 0 { - return ts + 5748 + return ts + 5738 } - return ts + 5791 + return ts + 5781 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__562: +__563: ; -__79: +__80: *(*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 __572 + goto __573 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { - goto __573 + goto __574 } rc = SQLITE_READONLY - goto __574 -__573: - rc = SQLITE_CORRUPT + goto __575 __574: + rc = SQLITE_CORRUPT +__575: ; goto abort_due_to_error -__572: +__573: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __575 + goto __576 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+312) if !(rc != SQLITE_OK) { - goto __576 + goto __577 } if !(rc&0xff == SQLITE_BUSY) { - goto __577 + goto __578 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return -__577: +__578: ; goto abort_due_to_error -__576: +__577: ; if !(Bft(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x20>>5)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { - goto __578 + goto __579 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { - goto __579 + goto __580 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement -__579: +__580: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { - goto __580 + goto __581 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) -__580: +__581: ; (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons -__578: +__579: ; -__575: +__576: ; 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 __581 + goto __582 } Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5832) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5822) 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 __582 + goto __583 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__582: +__583: ; libc.SetBitFieldPtr8Uint32(p+200, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 4, 0x10) -__581: +__582: ; if !(rc != 0) { - goto __583 + goto __584 } goto abort_due_to_error -__583: +__584: ; - goto __8 + goto __9 -__80: +__81: ; iDb = (*Op)(unsafe.Pointer(pOp)).Fp1 iCookie = (*Op)(unsafe.Pointer(pOp)).Fp3 @@ -47408,67 +47570,67 @@ __80: Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt, iCookie, bp+316) pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 316))) - goto __8 + goto __9 -__81: +__82: ; pDb1 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 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 __584 + goto __585 } *(*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 __585 -__584: + goto __586 +__585: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { - goto __586 + goto __587 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) -__586: +__587: ; -__585: +__586: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { - goto __587 + goto __588 } Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) -__587: +__588: ; if !(rc != 0) { - goto __588 + goto __589 } goto abort_due_to_error -__588: +__589: ; - goto __8 + goto __9 -__82: +__83: ; 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 __589 + goto __590 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints -__589: +__590: ; -__83: __84: +__85: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 200))&0x3>>0) == 1) { - goto __590 + goto __591 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error -__590: +__591: ; nField1 = 0 pKeyInfo1 = uintptr(0) @@ -47479,24 +47641,24 @@ __590: pX = (*Db)(unsafe.Pointer(pDb2)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { - goto __591 + goto __592 } 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 __593 + goto __594 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb2)).FpSchema)).Ffile_format -__593: +__594: ; - goto __592 -__591: - wrFlag = 0 + goto __593 __592: + wrFlag = 0 +__593: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { - goto __594 + goto __595 } pIn2 = aMem + uintptr(p23)*56 @@ -47504,30 +47666,30 @@ __592: Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) -__594: +__595: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -8) { - goto __595 + goto __596 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) - goto __596 -__595: + goto __597 +__596: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { - goto __597 + goto __598 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) -__597: +__598: ; -__596: +__597: ; pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { - goto __598 + goto __599 } goto no_mem -__598: +__599: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) @@ -47543,22 +47705,22 @@ 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 __599 + goto __600 } goto abort_due_to_error -__599: +__600: ; - goto __8 + goto __9 -__85: +__86: pOrig = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8)) pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { - goto __600 + goto __601 } goto no_mem -__600: +__601: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) @@ -47572,133 +47734,133 @@ __600: rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx + 16)), (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot, BTREE_WRCSR, (*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo, *(*uintptr)(unsafe.Pointer(pCx + 48))) - goto __8 + goto __9 -__86: __87: +__88: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __601 + goto __602 } (*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 + 1538 -__601: +__602: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __602 + goto __603 } (*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 __603 -__602: + goto __604 +__603: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { - goto __604 + goto __605 } goto no_mem -__604: +__605: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { - goto __605 + goto __606 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __606 + goto __607 } if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __607 + goto __608 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __609 + goto __610 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) -__609: +__610: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) - goto __608 -__607: + goto __609 +__608: (*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) -__608: +__609: ; -__606: +__607: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { - goto __610 + goto __611 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) -__610: +__611: ; -__605: +__606: ; -__603: +__604: ; if !(rc != 0) { - goto __611 + goto __612 } goto abort_due_to_error -__611: +__612: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) - goto __8 + goto __9 -__88: +__89: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { - goto __612 + goto __613 } goto no_mem -__612: +__613: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { - goto __613 + goto __614 } goto abort_due_to_error -__613: +__614: ; - goto __8 + goto __9 -__89: +__90: ; pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC4)).FseqCount, 1) == int64(0)) { - goto __614 + goto __615 } goto jump_to_p2 -__614: +__615: ; - goto __8 + goto __9 -__90: +__91: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { - goto __615 + goto __616 } goto no_mem -__615: +__616: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 @@ -47706,18 +47868,18 @@ __615: *(*uintptr)(unsafe.Pointer(pCx3 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) - goto __8 + goto __9 -__91: +__92: ; Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) = uintptr(0) - goto __8 + goto __9 -__92: __93: __94: __95: +__96: ; pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -47728,92 +47890,92 @@ __95: (*VdbeCursor)(unsafe.Pointer(pC5)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC5)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC5)).FisTable != 0) { - goto __616 + goto __617 } 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 __618 + goto __619 } applyNumericAffinity(tls, pIn3, 0) -__618: +__619: ; 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 __619 + goto __620 } if !(int32(newType)&MEM_Real == 0) { - goto __620 + goto __621 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { - goto __621 + goto __622 } goto jump_to_p2 - goto __622 -__621: + goto __623 +__622: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+320) if !(rc != SQLITE_OK) { - goto __623 + goto __624 } goto abort_due_to_error -__623: +__624: ; goto seek_not_found -__622: +__623: ; -__620: +__621: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) if !(c2 > 0) { - goto __624 + goto __625 } if !(oc&0x0001 == OP_SeekGT&0x0001) { - goto __626 + goto __627 } oc-- -__626: +__627: ; - goto __625 -__624: + goto __626 +__625: if !(c2 < 0) { - goto __627 + goto __628 } if !(oc&0x0001 == OP_SeekLT&0x0001) { - goto __628 + goto __629 } oc++ -__628: +__629: ; -__627: +__628: ; -__625: +__626: ; -__619: +__620: ; 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 __629 + goto __630 } goto abort_due_to_error -__629: +__630: ; - goto __617 -__616: + goto __618 +__617: if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __630 + goto __631 } eqOnly = 1 -__630: +__631: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -47831,106 +47993,106 @@ __630: (*UnpackedRecord)(unsafe.Pointer(bp + 328)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), bp+328, bp+320) if !(rc != SQLITE_OK) { - goto __631 + goto __632 } goto abort_due_to_error -__631: +__632: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+328)).FeqSeen) == 0) { - goto __632 + goto __633 } goto seek_not_found -__632: +__633: ; -__617: +__618: ; if !(oc >= OP_SeekGE) { - goto __633 + goto __634 } if !(*(*int32)(unsafe.Pointer(bp + 320)) < 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekGT) { - goto __635 + goto __636 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __637 + goto __638 } if !(rc == SQLITE_DONE) { - goto __638 + goto __639 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __639 -__638: - goto abort_due_to_error + goto __640 __639: + goto abort_due_to_error +__640: ; -__637: +__638: ; - goto __636 -__635: - *(*int32)(unsafe.Pointer(bp + 320)) = 0 + goto __637 __636: + *(*int32)(unsafe.Pointer(bp + 320)) = 0 +__637: ; - goto __634 -__633: + goto __635 +__634: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) > 0 || *(*int32)(unsafe.Pointer(bp + 320)) == 0 && oc == OP_SeekLT) { - goto __640 + goto __641 } *(*int32)(unsafe.Pointer(bp + 320)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48)), 0) if !(rc != SQLITE_OK) { - goto __642 + goto __643 } if !(rc == SQLITE_DONE) { - goto __643 + goto __644 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 320)) = 1 - goto __644 -__643: - goto abort_due_to_error + goto __645 __644: + goto abort_due_to_error +__645: ; -__642: +__643: ; - goto __641 -__640: - *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) + goto __642 __641: + *(*int32)(unsafe.Pointer(bp + 320)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 48))) +__642: ; -__634: +__635: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 320)) != 0) { - goto __645 + goto __646 } goto jump_to_p2 - goto __646 -__645: + goto __647 +__646: if !(eqOnly != 0) { - goto __647 + goto __648 } pOp += 24 -__647: +__648: ; -__646: +__647: ; - goto __8 + goto __9 -__96: +__97: ; pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48))) != 0) { - goto __648 + goto __649 } - goto __8 -__648: + goto __9 +__649: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -47939,108 +48101,108 @@ __648: (*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 -__649: +__650: if !(1 != 0) { - goto __650 + goto __651 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+368, bp+408) if !(rc != 0) { - goto __651 + goto __652 } goto abort_due_to_error -__651: +__652: ; if !(*(*int32)(unsafe.Pointer(bp + 408)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { - goto __652 + goto __653 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 -__652: +__653: ; if !(*(*int32)(unsafe.Pointer(bp + 408)) >= 0) { - goto __653 + goto __654 } goto jump_to_p2 - goto __650 -__653: + goto __651 +__654: ; if !(nStep <= 0) { - goto __654 + goto __655 } - goto __650 -__654: + goto __651 +__655: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC6 + 48)), 0) if !(rc != 0) { - goto __655 + goto __656 } if !(rc == SQLITE_DONE) { - goto __656 + goto __657 } rc = SQLITE_OK goto seekscan_search_fail - goto __657 -__656: - goto abort_due_to_error + goto __658 __657: + goto abort_due_to_error +__658: ; -__655: +__656: ; - goto __649 -__650: + goto __650 +__651: ; - goto __8 + goto __9 -__97: +__98: ; pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { - goto __658 + goto __659 } (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __659 -__658: + goto __660 +__659: if !(int32((*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __660 + goto __661 } (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) -__660: +__661: ; -__659: +__660: ; - goto __8 + goto __9 -__98: +__99: ; 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 __662 } goto jump_to_p2_and_check_for_interrupt -__661: +__662: ; - goto __8 + goto __9 -__99: +__100: ; pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC8)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { - goto __662 + goto __663 } - goto __8 -__662: + goto __9 +__663: ; -__100: __101: __102: +__103: ; pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48048,14 +48210,14 @@ __102: (*UnpackedRecord)(unsafe.Pointer(bp + 416)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField) > 0) { - goto __663 + goto __664 } (*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(pC9 + 48)), bp+416, pC9+36) - goto __664 -__663: + goto __665 +__664: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48065,108 +48227,108 @@ __663: }() if !(rc != 0) { - goto __665 + goto __666 } goto no_mem -__665: +__666: ; pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo) if !(pIdxKey == uintptr(0)) { - goto __666 + goto __667 } goto no_mem -__666: +__667: ; 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(pC9 + 48)), pIdxKey, pC9+36) Xsqlite3DbFreeNN(tls, db, pIdxKey) -__664: +__665: ; if !(rc != SQLITE_OK) { - goto __667 + goto __668 } goto abort_due_to_error -__667: +__668: ; 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 __668 + goto __669 } if !(alreadyExists != 0) { - goto __670 + goto __671 } goto jump_to_p2 -__670: +__671: ; - goto __669 -__668: + goto __670 +__669: if !!(alreadyExists != 0) { - goto __671 + goto __672 } goto jump_to_p2 -__671: +__672: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { - goto __672 + goto __673 } ii1 = 0 -__673: +__674: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(bp+416)).FnField)) { - goto __675 + goto __676 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+416)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { - goto __676 + goto __677 } goto jump_to_p2 -__676: +__677: ; - goto __674 -__674: - ii1++ - goto __673 goto __675 __675: + ii1++ + goto __674 + goto __676 +__676: ; -__672: +__673: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { - goto __677 + goto __678 } (*VdbeCursor)(unsafe.Pointer(pC9)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) -__677: +__678: ; -__669: +__670: ; - goto __8 + goto __9 -__103: +__104: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __678 + goto __679 } *(*Mem)(unsafe.Pointer(bp + 456)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+456, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+456)).Fflags)&MEM_Int == 0) { - goto __679 + goto __680 } goto jump_to_p2 -__679: +__680: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 456))) goto notExistsWithKey -__678: +__679: ; -__104: +__105: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) @@ -48185,35 +48347,35 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 512)) if !(*(*int32)(unsafe.Pointer(bp + 512)) != 0) { - goto __680 + goto __681 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { - goto __681 + goto __682 } - rc = Xsqlite3CorruptError(tls, 95020) - goto __682 -__681: - goto jump_to_p2 + rc = Xsqlite3CorruptError(tls, 95560) + goto __683 __682: + goto jump_to_p2 +__683: ; -__680: +__681: ; if !(rc != 0) { - goto __683 + goto __684 } goto abort_due_to_error -__683: +__684: ; - goto __8 + goto __9 -__105: +__106: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FseqCount, 1) - goto __8 + goto __9 -__106: +__107: *(*I64)(unsafe.Pointer(bp + 520)) = int64(0) *(*int32)(unsafe.Pointer(bp + 516)) = 0 pOut = out2Prerelease(tls, p, pOp) @@ -48221,123 +48383,123 @@ __106: pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { - goto __684 + goto __685 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), bp+516) if !(rc != SQLITE_OK) { - goto __685 + goto __686 } goto abort_due_to_error -__685: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) != 0) { - goto __686 + goto __687 } *(*I64)(unsafe.Pointer(bp + 520)) = int64(1) - goto __687 -__686: + goto __688 +__687: ; *(*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 __688 + goto __689 } libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) - goto __689 -__688: - *(*I64)(unsafe.Pointer(bp + 520))++ + goto __690 __689: + *(*I64)(unsafe.Pointer(bp + 520))++ +__690: ; -__687: +__688: ; -__684: +__685: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __690 + goto __691 } if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __691 + goto __692 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__693: +__694: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { - goto __695 + goto __696 } - goto __694 -__694: - pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent - goto __693 goto __695 __695: + pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent + goto __694 + goto __696 +__696: ; pMem = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 - goto __692 -__691: + goto __693 +__692: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__692: +__693: ; Xsqlite3VdbeMemIntegerify(tls, pMem) if !(*(*I64)(unsafe.Pointer(pMem)) == int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { - goto __696 + goto __697 } rc = SQLITE_FULL goto abort_due_to_error -__696: +__697: ; if !(*(*I64)(unsafe.Pointer(bp + 520)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __697 + goto __698 } *(*I64)(unsafe.Pointer(bp + 520)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__697: +__698: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 520)) -__690: +__691: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1)) != 0) { - goto __698 + goto __699 } cnt1 = 0 -__699: +__700: 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 __700 -__700: + goto __701 +__701: 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 __699 + goto __700 } - goto __701 -__701: + goto __702 +__702: ; if !(rc != 0) { - goto __702 + goto __703 } goto abort_due_to_error -__702: +__703: ; if !(*(*int32)(unsafe.Pointer(bp + 516)) == 0) { - goto __703 + goto __704 } rc = SQLITE_FULL goto abort_due_to_error -__703: +__704: ; -__698: +__699: ; (*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 + goto __9 -__107: +__108: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48347,52 +48509,52 @@ __107: (*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 __704 + goto __705 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - goto __705 -__704: + goto __706 +__705: pTab1 = uintptr(0) zDb = uintptr(0) -__705: +__706: ; if !(pTab1 != 0) { - goto __706 + goto __707 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { - goto __707 + goto __708 } Xsqlite3VdbePreUpdateHook(tls, p, pC12, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) -__707: +__708: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { - goto __708 + goto __709 } pTab1 = uintptr(0) -__708: +__709: ; -__706: +__707: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { - goto __709 + goto __710 } - goto __8 -__709: + goto __9 +__710: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __710 + goto __711 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__710: - ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { - goto __711 + goto __712 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 528)).FnKey +__712: + ; __711: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -48404,15 +48566,16 @@ __711: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __712 + goto __713 } (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __713 -__712: - (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 + goto __714 __713: + (*BtreePayload)(unsafe.Pointer(bp + 528)).FnZero = 0 +__714: ; (*BtreePayload)(unsafe.Pointer(bp + 528)).FpKey = uintptr(0) + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 48)), bp+528, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), seekResult) @@ -48420,13 +48583,13 @@ __713: (*VdbeCursor)(unsafe.Pointer(pC12)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __714 + goto __715 } goto abort_due_to_error -__714: +__715: ; if !(pTab1 != 0) { - goto __715 + goto __716 } (*struct { @@ -48439,11 +48602,11 @@ __714: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+528)).FnKey) -__715: +__716: ; - goto __8 + goto __9 -__108: +__109: ; pDest1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pSrc = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8)) @@ -48454,38 +48617,38 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { - goto __716 + goto __717 } goto abort_due_to_error -__716: +__717: ; - goto __8 + goto __9 -__109: +__110: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 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 __717 + goto __718 } 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(pC13)).FisTable != 0) { - goto __719 + goto __720 } (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC13 + 48))) -__719: +__720: ; - goto __718 -__717: + goto __719 +__718: zDb1 = uintptr(0) pTab2 = uintptr(0) -__718: +__719: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { - goto __720 + goto __721 } Xsqlite3VdbePreUpdateHook(tls, p, pC13, @@ -48497,47 +48660,47 @@ __718: }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC13)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) -__720: +__721: ; if !(opflags&OPFLAG_ISNOOP != 0) { - goto __721 + goto __722 } - goto __8 -__721: + goto __9 +__722: ; 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 __722 + goto __723 } goto abort_due_to_error -__722: +__723: ; if !(opflags&OPFLAG_NCHANGE != 0) { - goto __723 + goto __724 } (*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 __724 + goto __725 } (*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(pC13)).FmovetoTarget) -__724: +__725: ; -__723: +__724: ; - goto __8 + goto __9 -__110: +__111: Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) - goto __8 + goto __9 -__111: +__112: 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 @@ -48546,35 +48709,35 @@ __111: rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+576) if !(rc != 0) { - goto __725 + goto __726 } goto abort_due_to_error -__725: +__726: ; if !(*(*int32)(unsafe.Pointer(bp + 576)) != 0) { - goto __726 + goto __727 } goto jump_to_p2 -__726: +__727: ; - goto __8 + goto __9 -__112: +__113: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) rc = Xsqlite3VdbeSorterRowkey(tls, pC15, pOut) if !(rc != 0) { - goto __727 + goto __728 } goto abort_due_to_error -__727: +__728: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) - goto __8 + goto __9 -__113: +__114: pOut = out2Prerelease(tls, p, pOp) pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48583,51 +48746,51 @@ __113: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { - goto __728 + goto __729 } goto too_big -__728: +__729: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { - goto __729 + goto __730 } goto abort_due_to_error -__729: +__730: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __730 + goto __731 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { - goto __731 + goto __732 } goto no_mem -__731: +__732: ; -__730: +__731: ; - goto __8 + goto __9 -__114: +__115: pOut = out2Prerelease(tls, p, pOp) pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { - goto __732 + goto __733 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 - goto __733 -__732: + goto __9 + goto __734 +__733: if !((*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto != 0) { - goto __734 + goto __735 } *(*I64)(unsafe.Pointer(bp + 584)) = (*VdbeCursor)(unsafe.Pointer(pC17)).FmovetoTarget - goto __735 -__734: + goto __736 +__735: if !(int32((*VdbeCursor)(unsafe.Pointer(pC17)).FeCurType) == CURTYPE_VTAB) { - goto __736 + goto __737 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC17 + 48)))).FpVtab @@ -48638,71 +48801,71 @@ __734: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48)), bp+584) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __738 + goto __739 } goto abort_due_to_error -__738: +__739: ; - goto __737 -__736: + goto __738 +__737: ; rc = Xsqlite3VdbeCursorRestore(tls, pC17) if !(rc != 0) { - goto __739 + goto __740 } goto abort_due_to_error -__739: +__740: ; if !((*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow != 0) { - goto __740 + goto __741 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - goto __8 -__740: + goto __9 +__741: ; *(*I64)(unsafe.Pointer(bp + 584)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 48))) -__737: +__738: ; -__735: +__736: ; -__733: +__734: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 584)) - goto __8 + goto __9 -__115: +__116: ; pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pC18 == uintptr(0)) { - goto __741 + goto __742 } pC18 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 1, uint8(CURTYPE_PSEUDO)) if !(pC18 == uintptr(0)) { - goto __742 + goto __743 } goto no_mem -__742: +__743: ; (*VdbeCursor)(unsafe.Pointer(pC18)).FseekResult = 0 (*VdbeCursor)(unsafe.Pointer(pC18)).FisTable = U8(1) libc.SetBitFieldPtr8Uint32(pC18+8, Bool(1), 3, 0x8) *(*uintptr)(unsafe.Pointer(pC18 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) -__741: +__742: ; (*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 + goto __744 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC18 + 48))) -__743: +__744: ; - goto __8 + goto __9 -__116: __117: +__118: ; pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48710,43 +48873,43 @@ __117: *(*int32)(unsafe.Pointer(bp + 592)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { - goto __744 + goto __745 } (*VdbeCursor)(unsafe.Pointer(pC19)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { - goto __745 + goto __746 } - goto __8 -__745: + goto __9 +__746: ; -__744: +__745: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+592) (*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 __746 + goto __747 } goto abort_due_to_error -__746: +__747: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { - goto __747 + goto __748 } if !(*(*int32)(unsafe.Pointer(bp + 592)) != 0) { - goto __748 + goto __749 } goto jump_to_p2 -__748: +__749: ; -__747: +__748: ; - goto __8 + goto __9 -__118: +__119: ; pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48754,84 +48917,89 @@ __118: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+596) if !(rc != 0) { - goto __749 + goto __750 } goto abort_due_to_error -__749: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) == 0) { - goto __750 + goto __751 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { - goto __751 + goto __752 } *(*int32)(unsafe.Pointer(bp + 596)) = 1 -__751: +__752: ; -__750: +__751: ; if !(*(*int32)(unsafe.Pointer(bp + 596)) != 0) { - goto __752 + goto __753 } goto jump_to_p2 -__752: +__753: ; - goto __8 + goto __9 -__119: __120: +__121: *(*U32)(unsafe.Pointer(p + 212 + 2*4))++ -__121: +__122: ; 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(pC21)).FeCurType) == CURTYPE_SORTER) { - goto __753 + goto __754 } rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+600) - goto __754 -__753: + goto __755 +__754: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+600) (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) -__754: +__755: ; if !(rc != 0) { - goto __755 + goto __756 } goto abort_due_to_error -__755: +__756: ; (*VdbeCursor)(unsafe.Pointer(pC21)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 600))) + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { + goto __757 + } if !(*(*int32)(unsafe.Pointer(bp + 600)) != 0) { - goto __756 + goto __758 } goto jump_to_p2 -__756: +__758: ; - goto __8 +__757: + ; + goto __9 -__122: +__123: pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) rc = Xsqlite3VdbeSorterNext(tls, db, pC22) goto next_tail -__123: +__124: ; pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 48)), (*Op)(unsafe.Pointer(pOp)).Fp3) goto next_tail -__124: +__125: ; pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48841,34 +49009,34 @@ next_tail: (*VdbeCursor)(unsafe.Pointer(pC22)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { - goto __757 + goto __759 } (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 212 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt -__757: +__759: ; if !(rc != SQLITE_DONE) { - goto __758 + goto __760 } goto abort_due_to_error -__758: +__760: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC22)).FnullRow = U8(1) goto check_for_interrupt -__125: +__126: ; pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { - goto __759 + goto __761 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__759: +__761: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { @@ -48877,10 +49045,10 @@ __759: return 0 }() if !(rc != 0) { - goto __760 + goto __762 } goto abort_due_to_error -__760: +__762: ; (*BtreePayload)(unsafe.Pointer(bp + 608)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 608)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -48897,14 +49065,14 @@ __760: (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __761 + goto __763 } goto abort_due_to_error -__761: +__763: ; - goto __8 + goto __9 -__126: +__127: ; pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48917,21 +49085,21 @@ __126: return 0 }() if !(rc != 0) { - goto __762 + goto __764 } goto abort_due_to_error -__762: +__764: ; rc = Xsqlite3VdbeSorterWrite(tls, pC24, pIn2) if !(rc != 0) { - goto __763 + goto __765 } goto abort_due_to_error -__763: +__765: ; - goto __8 + goto __9 -__127: +__128: ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -48943,62 +49111,62 @@ __127: (*UnpackedRecord)(unsafe.Pointer(bp + 656)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+656, bp+696) if !(rc != 0) { - goto __764 + goto __766 } goto abort_due_to_error -__764: +__766: ; if !(*(*int32)(unsafe.Pointer(bp + 696)) == 0) { - goto __765 + goto __767 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { - goto __767 + goto __769 } goto abort_due_to_error -__767: +__769: ; - goto __766 -__765: + goto __768 +__767: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { - goto __768 + goto __770 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96085, ts+5860) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96635, ts+5850) goto abort_due_to_error -__768: +__770: ; -__766: +__768: ; (*VdbeCursor)(unsafe.Pointer(pC25)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC25)).FseekResult = 0 - goto __8 + goto __9 -__128: __129: +__130: ; pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) rc = Xsqlite3VdbeCursorRestore(tls, pC26) if !(rc != SQLITE_OK) { - goto __769 + goto __771 } goto abort_due_to_error -__769: +__771: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC26)).FnullRow) != 0) { - goto __770 + goto __772 } *(*I64)(unsafe.Pointer(bp + 704)) = int64(0) rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 48)), bp+704) if !(rc != SQLITE_OK) { - goto __772 + goto __774 } goto abort_due_to_error -__772: +__774: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { - goto __773 + goto __775 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) @@ -49011,56 +49179,56 @@ __772: *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC26 - goto __774 -__773: + goto __776 +__775: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 704)) -__774: +__776: ; - goto __771 -__770: + goto __773 +__772: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) -__771: +__773: ; - goto __8 + goto __9 -__130: +__131: ; 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 + goto __777 } rc = Xsqlite3VdbeFinishMoveto(tls, pC27) if !(rc != 0) { - goto __776 + goto __778 } goto abort_due_to_error -__776: +__778: ; -__775: +__777: ; - goto __8 + goto __9 -__131: __132: __133: __134: +__135: ; 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(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __777 + goto __779 } (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(-1) - goto __778 -__777: + goto __780 +__779: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).Fdefault_rc = int8(0) -__778: +__780: ; (*UnpackedRecord)(unsafe.Pointer(bp + 768)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 @@ -49071,54 +49239,54 @@ __778: nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur2)) if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { - goto __779 + goto __781 } - rc = Xsqlite3CorruptError(tls, 96290) + rc = Xsqlite3CorruptError(tls, 96840) goto abort_due_to_error -__779: +__781: ; Xsqlite3VdbeMemInit(tls, bp+712, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+712) if !(rc != 0) { - goto __780 + goto __782 } goto abort_due_to_error -__780: +__782: ; 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 __781 + goto __783 } res11 = -res11 - goto __782 -__781: + goto __784 +__783: ; res11++ -__782: +__784: ; if !(res11 > 0) { - goto __783 + goto __785 } goto jump_to_p2 -__783: +__785: ; - goto __8 + goto __9 -__135: +__136: ; 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 __784 + goto __786 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error - goto __785 -__784: + goto __787 +__786: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 808)) = 0 @@ -49126,72 +49294,72 @@ __784: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 808))) if !(rc != 0) { - goto __786 + goto __788 } goto abort_due_to_error -__786: +__788: ; if !(*(*int32)(unsafe.Pointer(bp + 808)) != 0) { - goto __787 + goto __789 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 808))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__787: +__789: ; -__785: +__787: ; - goto __8 + goto __9 -__136: +__137: ; *(*I64)(unsafe.Pointer(bp + 816)) = int64(0) rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+816) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __788 + goto __790 } *(*I64)(unsafe.Pointer(p + 56)) += *(*I64)(unsafe.Pointer(bp + 816)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __789 + goto __791 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 816)) -__789: +__791: ; -__788: +__790: ; if !(rc != 0) { - goto __790 + goto __792 } goto abort_due_to_error -__790: +__792: ; - goto __8 + goto __9 -__137: +__138: ; pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { - goto __791 + goto __793 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 48))) - goto __792 -__791: + goto __794 +__793: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) if !(rc != 0) { - goto __793 + goto __795 } goto abort_due_to_error -__793: +__795: ; -__792: +__794: ; - goto __8 + goto __9 -__138: +__139: ; pOut = out2Prerelease(tls, p, pOp) *(*Pgno)(unsafe.Pointer(bp + 824)) = Pgno(0) @@ -49200,55 +49368,55 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+824, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { - goto __794 + goto __796 } goto abort_due_to_error -__794: +__796: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 824))) - goto __8 + goto __9 -__139: +__140: ; (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec++ rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { - goto __795 + goto __797 } goto abort_due_to_error -__795: +__797: ; - goto __8 + goto __9 -__140: +__141: iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { - goto __796 + goto __798 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+168, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) - goto __797 -__796: - zSchema = ts + 5877 + goto __799 +__798: + zSchema = ts + 5867 (*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+5891, + ts+5881, 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 __798 + goto __800 } rc = SQLITE_NOMEM - goto __799 -__798: + goto __801 +__800: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 832)).Frc = SQLITE_OK @@ -49258,66 +49426,66 @@ __798: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+832, uintptr(0)) if !(rc == SQLITE_OK) { - goto __800 + goto __802 } rc = (*InitData)(unsafe.Pointer(bp + 832)).Frc -__800: +__802: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+832)).FnInitRow == U32(0)) { - goto __801 + goto __803 } - rc = Xsqlite3CorruptError(tls, 96542) -__801: + rc = Xsqlite3CorruptError(tls, 97092) +__803: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) -__799: +__801: ; -__797: +__799: ; if !(rc != 0) { - goto __802 + goto __804 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { - goto __803 + goto __805 } goto no_mem -__803: +__805: ; goto abort_due_to_error -__802: +__804: ; - goto __8 + goto __9 -__141: +__142: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { - goto __804 + goto __806 } goto abort_due_to_error -__804: +__806: ; - goto __8 + goto __9 -__142: +__143: ; Xsqlite3UnlinkAndDeleteTable(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) - goto __8 + goto __9 -__143: +__144: ; Xsqlite3UnlinkAndDeleteIndex(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) - goto __8 + goto __9 -__144: +__145: ; Xsqlite3UnlinkAndDeleteTrigger(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) - goto __8 + goto __9 -__145: +__146: ; nRoot = (*Op)(unsafe.Pointer(pOp)).Fp2 aRoot = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -49326,151 +49494,152 @@ __145: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - z = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*32)).FpBt, aRoot+1*4, nRoot, - int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872) + rc = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*32)).FpBt, aRoot+1*4, nRoot, + int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+872, bp+880) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 872)) == 0) { - goto __805 - } - - goto __806 -__805: - if !(z == uintptr(0)) { goto __807 } - goto no_mem + goto __808 __807: + if !(rc != 0) { + goto __809 + } + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 880))) + goto abort_due_to_error + goto __810 +__809: *(*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}))) -__808: + Xsqlite3VdbeMemSetStr(tls, pIn1, *(*uintptr)(unsafe.Pointer(bp + 880)), int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) +__810: ; -__806: +__808: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt -__146: +__147: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __809 + goto __811 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __810 + goto __812 } goto no_mem -__810: +__812: ; -__809: +__811: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) - goto __8 + goto __9 -__147: +__148: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || - Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+880) == 0) { - goto __811 + Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+888) == 0) { + goto __813 } Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt - goto __812 -__811: + goto __814 +__813: ; - Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 880))) -__812: + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 888))) +__814: ; goto check_for_interrupt -__148: +__149: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 iSet = *(*int32)(unsafe.Pointer(pOp + 16)) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { - goto __813 + goto __815 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { - goto __814 + goto __816 } goto no_mem -__814: +__816: ; -__813: +__815: ; if !(iSet != 0) { - goto __815 + goto __817 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { - goto __816 + goto __818 } goto jump_to_p2 -__816: +__818: ; -__815: +__817: ; if !(iSet >= 0) { - goto __817 + goto __819 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) -__817: +__819: ; - goto __8 + goto __9 -__149: +__150: pProgram = *(*uintptr)(unsafe.Pointer(pOp + 16)) pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { - goto __818 + goto __820 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__819: +__821: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { - goto __821 + goto __823 } - goto __820 -__820: + goto __822 +__822: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent - goto __819 goto __821 -__821: + goto __823 +__823: ; if !(pFrame2 != 0) { - goto __822 + goto __824 } - goto __8 -__822: + goto __9 +__824: ; -__818: +__820: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { - goto __823 + goto __825 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5934, 0) + Xsqlite3VdbeError(tls, p, ts+5924, 0) goto abort_due_to_error -__823: +__825: ; if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { - goto __824 + goto __826 } nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { - goto __826 + goto __828 } nMem++ -__826: +__828: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + @@ -49478,10 +49647,10 @@ __826: uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { - goto __827 + goto __829 } goto no_mem -__827: +__829: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) @@ -49501,26 +49670,26 @@ __827: (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnOp = (*Vdbe)(unsafe.Pointer(p)).FnOp (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken - pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 - pMem1 = pFrame2 + 120 -__828: + pEnd = pFrame2 + 112 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 + pMem1 = pFrame2 + 112 +__830: if !(pMem1 != pEnd) { - goto __830 + goto __832 } (*Mem)(unsafe.Pointer(pMem1)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem1)).Fdb = db - goto __829 -__829: + goto __831 +__831: pMem1 += 56 - goto __828 goto __830 -__830: + goto __832 +__832: ; - goto __825 -__824: + goto __827 +__826: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz -__825: +__827: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame @@ -49532,7 +49701,7 @@ __825: (*Vdbe)(unsafe.Pointer(p)).FpAuxData = uintptr(0) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) (*Vdbe)(unsafe.Pointer(p)).FpFrame = pFrame2 - (*Vdbe)(unsafe.Pointer(p)).FaMem = libc.AssignUintptr(&aMem, pFrame2+120) + (*Vdbe)(unsafe.Pointer(p)).FaMem = libc.AssignUintptr(&aMem, pFrame2+112) (*Vdbe)(unsafe.Pointer(p)).FnMem = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem (*Vdbe)(unsafe.Pointer(p)).FnCursor = int32(U16((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildCsr)) (*Vdbe)(unsafe.Pointer(p)).FapCsr = aMem + uintptr((*Vdbe)(unsafe.Pointer(p)).FnMem)*56 @@ -49543,170 +49712,170 @@ __825: pOp = aOp + libc.UintptrFromInt32(-1)*24 goto check_for_interrupt -__150: +__151: pOut = out2Prerelease(tls, p, pOp) pFrame3 = (*Vdbe)(unsafe.Pointer(p)).FpFrame pIn = (*VdbeFrame)(unsafe.Pointer(pFrame3)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1+(*Op)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame3)).FaOp+uintptr((*VdbeFrame)(unsafe.Pointer(pFrame3)).Fpc)*24)).Fp1)*56 Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn, MEM_Ephem) - goto __8 + goto __9 -__151: +__152: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { - goto __831 + goto __833 } *(*I64)(unsafe.Pointer(db + 792)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __832 -__831: + goto __834 +__833: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __833 + goto __835 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __834 -__833: + goto __836 +__835: *(*I64)(unsafe.Pointer(p + 80)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) -__834: +__836: ; -__832: +__834: ; - goto __8 + goto __9 -__152: +__153: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __835 + goto __837 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __837 + goto __839 } goto jump_to_p2 -__837: +__839: ; - goto __836 -__835: + goto __838 +__837: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { - goto __838 + goto __840 } goto jump_to_p2 -__838: +__840: ; -__836: +__838: ; - goto __8 + goto __9 -__153: +__154: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { - goto __839 + goto __841 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame -__841: +__843: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { - goto __843 + goto __845 } - goto __842 -__842: + goto __844 +__844: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent - goto __841 goto __843 -__843: + goto __845 +__845: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 - goto __840 -__839: + goto __842 +__841: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 -__840: +__842: ; 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 __844 + goto __846 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) -__844: +__846: ; - goto __8 + goto __9 -__154: +__155: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __845 + goto __847 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 -__845: +__847: ; - goto __8 + goto __9 -__155: +__156: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pOut = out2Prerelease(tls, p, pOp) - *(*I64)(unsafe.Pointer(bp + 888)) = *(*I64)(unsafe.Pointer(pIn1)) - if !(*(*I64)(unsafe.Pointer(bp + 888)) <= int64(0) || Xsqlite3AddInt64(tls, bp+888, func() int64 { + *(*I64)(unsafe.Pointer(bp + 896)) = *(*I64)(unsafe.Pointer(pIn1)) + if !(*(*I64)(unsafe.Pointer(bp + 896)) <= int64(0) || Xsqlite3AddInt64(tls, bp+896, func() int64 { if *(*I64)(unsafe.Pointer(pIn3)) > int64(0) { return *(*I64)(unsafe.Pointer(pIn3)) } return int64(0) }()) != 0) { - goto __846 + goto __848 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __847 -__846: - *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 888)) -__847: + goto __849 +__848: + *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 896)) +__849: ; - goto __8 + goto __9 -__156: +__157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { - goto __848 + goto __850 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { - goto __849 + goto __851 } *(*I64)(unsafe.Pointer(pIn1))-- -__849: +__851: ; goto jump_to_p2 -__848: +__850: ; - goto __8 + goto __9 -__157: +__158: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|int64(0x7fffffff)<<32)) { - goto __850 + goto __852 } *(*I64)(unsafe.Pointer(pIn1))-- -__850: +__852: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { - goto __851 + goto __853 } goto jump_to_p2 -__851: +__853: ; - goto __8 + goto __9 -__158: __159: +__160: ; n4 = int32((*Op)(unsafe.Pointer(pOp)).Fp5) 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 __852 + goto __854 } goto no_mem -__852: +__854: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 @@ -49723,146 +49892,146 @@ __852: (*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_AggStep1) -__160: +__161: ; pCtx1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) pMem2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem2) { - goto __853 + goto __855 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem2 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 -__854: +__856: if !(i5 >= 0) { - goto __856 + goto __858 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 - goto __855 -__855: + goto __857 +__857: i5-- - goto __854 goto __856 -__856: + goto __858 +__858: ; -__853: +__855: ; (*Mem)(unsafe.Pointer(pMem2)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __857 + goto __859 } (*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 __858 -__857: + goto __860 +__859: (*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) -__858: +__860: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { - goto __859 + goto __861 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { - goto __860 + goto __862 } Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError -__860: +__862: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { - goto __861 + goto __863 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { - goto __862 + goto __864 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) -__862: +__864: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) -__861: +__863: ; 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 __863 + goto __865 } goto abort_due_to_error -__863: +__865: ; -__859: +__861: ; - goto __8 + goto __9 -__161: __162: +__163: ; pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __864 + goto __866 } 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 __865 -__864: + goto __867 +__866: rc = Xsqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) -__865: +__867: ; if !(rc != 0) { - goto __866 + goto __868 } Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error -__866: +__868: ; Xsqlite3VdbeChangeEncoding(tls, pMem3, int32(encoding)) - goto __8 + goto __9 -__163: +__164: ; - *(*int32)(unsafe.Pointer(bp + 896)) = 0 - *(*int32)(unsafe.Pointer(bp + 896 + 1*4)) = libc.AssignPtrInt32(bp+896+2*4, -1) + *(*int32)(unsafe.Pointer(bp + 904)) = 0 + *(*int32)(unsafe.Pointer(bp + 904 + 1*4)) = libc.AssignPtrInt32(bp+904+2*4, -1) - rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+896+1*4, bp+896+2*4) + rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+904+1*4, bp+904+2*4) if !(rc != 0) { - goto __867 + goto __869 } if !(rc != SQLITE_BUSY) { - goto __868 + goto __870 } goto abort_due_to_error -__868: +__870: ; rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 896)) = 1 -__867: + *(*int32)(unsafe.Pointer(bp + 904)) = 1 +__869: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 -__869: +__871: if !(i6 < 3) { - goto __871 + goto __873 } - Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 896 + uintptr(i6)*4)))) - goto __870 -__870: + Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 904 + uintptr(i6)*4)))) + goto __872 +__872: i6++ pMem4 += 56 - goto __869 goto __871 -__871: + goto __873 +__873: ; - goto __8 + goto __9 -__164: +__165: pOut = out2Prerelease(tls, p, pOp) eNew = (*Op)(unsafe.Pointer(pOp)).Fp3 @@ -49870,70 +50039,70 @@ __164: pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { - goto __872 + goto __874 } eNew = eOld -__872: +__874: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { - goto __873 + goto __875 } eNew = eOld -__873: +__875: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { - goto __874 + goto __876 } eNew = eOld -__874: +__876: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { - goto __875 + goto __877 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { - goto __876 + goto __878 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5971, + ts+5961, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6023 + return ts + 6013 } - return ts + 6028 + return ts + 6018 }())) goto abort_due_to_error - goto __877 -__876: + goto __879 +__878: if !(eOld == PAGER_JOURNALMODE_WAL) { - goto __878 + goto __880 } rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { - goto __880 + goto __882 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) -__880: +__882: ; - goto __879 -__878: + goto __881 +__880: if !(eOld == PAGER_JOURNALMODE_MEMORY) { - goto __881 + goto __883 } Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) -__881: +__883: ; -__879: +__881: ; if !(rc == SQLITE_OK) { - goto __882 + goto __884 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { @@ -49941,17 +50110,17 @@ __879: } return 1 }()) -__882: +__884: ; -__877: +__879: ; -__875: +__877: ; if !(rc != 0) { - goto __883 + goto __885 } eNew = eOld -__883: +__885: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) @@ -49961,14 +50130,14 @@ __883: (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { - goto __884 + goto __886 } goto abort_due_to_error -__884: +__886: ; - goto __8 + goto __9 -__165: +__166: ; rc = Xsqlite3RunVacuum(tls, p+168, db, (*Op)(unsafe.Pointer(pOp)).Fp1, func() uintptr { @@ -49978,197 +50147,197 @@ __165: return uintptr(0) }()) if !(rc != 0) { - goto __885 + goto __887 } goto abort_due_to_error -__885: +__887: ; - goto __8 + goto __9 -__166: +__167: ; pBt2 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { - goto __886 + goto __888 } if !(rc != SQLITE_DONE) { - goto __887 + goto __889 } goto abort_due_to_error -__887: +__889: ; rc = SQLITE_OK goto jump_to_p2 -__886: +__888: ; - goto __8 + goto __9 -__167: +__168: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __888 + goto __890 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) - goto __889 -__888: + goto __891 +__890: libc.SetBitFieldPtr8Uint32(p+200, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) -__889: +__891: ; - goto __8 + goto __9 -__168: +__169: ; pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 48))) - goto __8 + goto __9 -__169: +__170: ; pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 48))) - goto __8 + goto __9 -__170: +__171: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { - goto __890 + goto __892 } 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 __891 + goto __893 } if !(rc&0xFF == SQLITE_LOCKED) { - goto __892 + goto __894 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+6035, libc.VaList(bp+144, z1)) -__892: + Xsqlite3VdbeError(tls, p, ts+6025, libc.VaList(bp+144, z1)) +__894: ; goto abort_due_to_error -__891: +__893: ; -__890: +__892: ; - goto __8 + goto __9 -__171: +__172: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { - goto __893 + goto __895 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) -__893: +__895: ; if !(rc != 0) { - goto __894 + goto __896 } goto abort_due_to_error -__894: +__896: ; - goto __8 + goto __9 -__172: - libc.Xmemset(tls, bp+912, 0, uint64(unsafe.Sizeof(Mem{}))) - (*Mem)(unsafe.Pointer(bp + 912)).Fdb = db +__173: + libc.Xmemset(tls, bp+920, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp + 920)).Fdb = db - rc = Xsqlite3VdbeMemCopy(tls, bp+912, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) + rc = Xsqlite3VdbeMemCopy(tls, bp+920, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - zTab = Xsqlite3_value_text(tls, bp+912) + zTab = Xsqlite3_value_text(tls, bp+920) if !(zTab != 0) { - goto __895 + goto __897 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+168) -__895: +__897: ; - Xsqlite3VdbeMemRelease(tls, bp+912) + Xsqlite3VdbeMemRelease(tls, bp+920) if !(rc != 0) { - goto __896 + goto __898 } goto abort_due_to_error -__896: +__898: ; - goto __8 + goto __9 -__173: +__174: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy++ rc = Xsqlite3VtabCallDestroy(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { - goto __897 + goto __899 } goto abort_due_to_error -__897: +__899: ; - goto __8 + goto __9 -__174: +__175: ; pCur3 = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 968)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 976)) = 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 __898 + goto __900 } rc = SQLITE_LOCKED goto abort_due_to_error -__898: +__900: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+968) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+976) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { - goto __899 + goto __901 } goto abort_due_to_error -__899: +__901: ; - (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 968)))).FpVtab = pVtab1 + (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 976)))).FpVtab = pVtab1 pCur3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur3 != 0) { - goto __900 + goto __902 } - *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 968)) + *(*uintptr)(unsafe.Pointer(pCur3 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 976)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ - goto __901 -__900: + goto __903 +__902: ; (*struct { f func(*libc.TLS, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 968))) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 976))) goto no_mem -__901: +__903: ; - goto __8 + goto __9 -__175: +__176: 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 __902 + goto __904 } goto no_mem -__902: +__904: ; (*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+5341, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) - goto __8 + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+6054, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3VdbeValueListFree}))) + goto __9 -__176: +__177: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pArgc = pQuery + 1*56 pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -50182,27 +50351,27 @@ __176: apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 -__903: +__905: if !(i7 < nArg) { - goto __905 + goto __907 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 - goto __904 -__904: + goto __906 +__906: i7++ - goto __903 goto __905 -__905: + goto __907 +__907: ; 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 __906 + goto __908 } goto abort_due_to_error -__906: +__908: ; res12 = (*struct { f func(*libc.TLS, uintptr) int32 @@ -50210,72 +50379,72 @@ __906: (*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow = U8(0) if !(res12 != 0) { - goto __907 + goto __909 } goto jump_to_p2 -__907: +__909: ; - goto __8 + goto __9 -__177: +__178: 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(pCur5)).FnullRow != 0) { - goto __908 + goto __910 } Xsqlite3VdbeMemSetNull(tls, pDest2) - goto __8 -__908: + goto __9 +__910: ; 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{}))) - (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FpOut = pDest2 - (*Sqlite3_context)(unsafe.Pointer(bp + 976)).Fenc = encoding + libc.Xmemset(tls, bp+984, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + (*Sqlite3_context)(unsafe.Pointer(bp + 984)).FpOut = pDest2 + (*Sqlite3_context)(unsafe.Pointer(bp + 984)).Fenc = encoding if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { - goto __909 + goto __911 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 - goto __910 -__909: + goto __912 +__911: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) -__910: +__912: ; 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(pCur5 + 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+984, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) - if !((*Sqlite3_context)(unsafe.Pointer(bp+976)).FisError > 0) { - goto __911 + if !((*Sqlite3_context)(unsafe.Pointer(bp+984)).FisError > 0) { + goto __913 } Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) - rc = (*Sqlite3_context)(unsafe.Pointer(bp + 976)).FisError -__911: + rc = (*Sqlite3_context)(unsafe.Pointer(bp + 984)).FisError +__913: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(rc != 0) { - goto __912 + goto __914 } goto abort_due_to_error -__912: +__914: ; - goto __8 + goto __9 -__178: +__179: pCur6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur6)).FnullRow != 0) { - goto __913 + goto __915 } - goto __8 -__913: + goto __9 +__915: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur6 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -50285,25 +50454,25 @@ __913: })(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 __914 + goto __916 } goto abort_due_to_error -__914: +__916: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 48))) if !!(res13 != 0) { - goto __915 + goto __917 } goto jump_to_p2_and_check_for_interrupt -__915: +__917: ; goto check_for_interrupt -__179: +__180: isLegacy = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LegacyAlter) pVtab5 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab @@ -50311,166 +50480,166 @@ __179: rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { - goto __916 + goto __918 } goto abort_due_to_error -__916: +__918: ; 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 __917 + goto __919 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__917: +__919: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+200, Bft(0), 0, 0x3) if !(rc != 0) { - goto __918 + goto __920 } goto abort_due_to_error -__918: +__920: ; - goto __8 + goto __9 -__180: - *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) = int64(0) +__181: + *(*Sqlite_int64)(unsafe.Pointer(bp + 1040)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __919 + goto __921 } goto no_mem -__919: +__921: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { - goto __920 + goto __922 } rc = SQLITE_LOCKED goto abort_due_to_error -__920: +__922: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { - goto __921 + goto __923 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 -__922: +__924: if !(i8 < nArg1) { - goto __924 + goto __926 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 - goto __923 -__923: + goto __925 +__925: i8++ - goto __922 goto __924 -__924: + goto __926 +__926: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate})).f(tls, pVtab6, nArg1, apArg1, bp+1032) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate})).f(tls, pVtab6, nArg1, apArg1, bp+1040) (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { - goto __925 + goto __927 } - (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1032)) -__925: + (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1040)) +__927: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { - goto __926 + goto __928 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { - goto __928 + goto __930 } rc = SQLITE_OK - goto __929 -__928: + goto __931 +__930: (*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) }() -__929: +__931: ; - goto __927 -__926: + goto __929 +__928: (*Vdbe)(unsafe.Pointer(p)).FnChange++ -__927: +__929: ; if !(rc != 0) { - goto __930 + goto __932 } goto abort_due_to_error -__930: +__932: ; -__921: +__923: ; - goto __8 + goto __9 -__181: +__182: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt)) - goto __8 + goto __9 -__182: +__183: pOut = out2Prerelease(tls, p, pOp) pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __931 + goto __933 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { - goto __932 + goto __934 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) -__932: +__934: ; -__931: +__933: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) - goto __8 + goto __9 -__183: __184: +__185: ; pCtx2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { - goto __933 + goto __935 } (*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 -__934: +__936: if !(i9 >= 0) { - goto __936 + goto __938 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 - goto __935 -__935: + goto __937 +__937: i9-- - goto __934 goto __936 -__936: + goto __938 +__938: ; -__933: +__935: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) @@ -50479,63 +50648,63 @@ __933: })(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 __937 + goto __939 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { - goto __938 + goto __940 } Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__938: +__940: ; 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 __939 + goto __941 } goto abort_due_to_error -__939: +__941: ; -__937: +__939: ; - goto __8 + goto __9 -__185: +__186: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 *(*U16)(unsafe.Pointer(pIn1 + 20)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Subtype)) - goto __8 + goto __9 -__186: +__187: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 h = filterHash(tls, aMem, pOp) h = h % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h/uint64(8)))) |= int8(int32(1) << (h & uint64(7))) - goto __8 + goto __9 -__187: +__188: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __940 + goto __942 } *(*U32)(unsafe.Pointer(p + 212 + 8*4))++ goto jump_to_p2 - goto __941 -__940: + goto __943 +__942: *(*U32)(unsafe.Pointer(p + 212 + 7*4))++ -__941: +__943: ; - goto __8 + goto __9 -__188: __189: +__190: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&(SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY) != 0 && int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) != 254 && @@ -50545,104 +50714,104 @@ __189: } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { - goto __942 + goto __944 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { - goto __943 + goto __945 } 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 __944 -__943: + goto __946 +__945: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { - goto __945 + goto __947 } z3 = Xsqlite3MPrintf(tls, db, ts+6064, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __946 -__945: + goto __948 +__947: (*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) +__948: + ; __946: ; __944: ; -__942: - ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { - goto __947 + goto __949 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { - goto __948 + goto __950 } - goto __8 -__948: + goto __9 +__950: ; i10 = 1 -__949: +__951: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { - goto __951 + goto __953 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { - goto __952 + goto __954 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 -__952: +__954: ; - goto __950 -__950: + goto __952 +__952: i10++ - goto __949 goto __951 -__951: + goto __953 +__953: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 -__947: +__949: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 212 + 6*4))++ goto jump_to_p2 -__190: +__191: ; - goto __8 + goto __9 -__8: +__9: ; - goto __6 -__6: - pOp += 24 - goto __5 goto __7 __7: + pOp += 24 + goto __6 + goto __8 +__8: ; abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __953 + goto __955 } rc = SQLITE_NOMEM - goto __954 -__953: + goto __956 +__955: if !(rc == SQLITE_IOERR|int32(33)<<8) { - goto __955 + goto __957 } - rc = Xsqlite3CorruptError(tls, 98486) -__955: + rc = Xsqlite3CorruptError(tls, 99031) +__957: ; -__954: +__956: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { - goto __956 + goto __958 } Xsqlite3VdbeError(tls, p, ts+3647, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__956: +__958: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -50650,52 +50819,56 @@ __956: Xsqlite3_log(tls, rc, ts+6070, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __957 + goto __959 } Xsqlite3VdbeHalt(tls, p) -__957: +__959: ; if !(rc == SQLITE_IOERR|int32(12)<<8) { - goto __958 + goto __960 } Xsqlite3OomFault(tls, db) -__958: +__960: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { - goto __959 + goto __961 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(0x00002) << 32 -__959: +__961: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { - goto __960 + goto __962 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) -__960: +__962: ; vdbe_return: -__961: +__963: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { - goto __962 + goto __964 } 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 __963 + goto __965 } nProgressLimit = uint64(0xffffffff) | uint64(0xffffffff)<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error -__963: +__965: ; - goto __961 -__962: + goto __963 +__964: ; *(*U32)(unsafe.Pointer(p + 212 + 4*4)) += U32(int32(nVmStep)) + if !((*Vdbe)(unsafe.Pointer(p)).FlockMask != YDbMask(0)) { + goto __966 + } Xsqlite3VdbeLeave(tls, p) - +__966: + ; return rc too_big: @@ -50814,8 +50987,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(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var nAttempt int32 var iCol int32 @@ -50835,7 +51008,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 + 464)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 472)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -50855,8 +51028,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) - *(*uintptr)(unsafe.Pointer(bp + 464)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472))) + *(*uintptr)(unsafe.Pointer(bp + 472)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -50887,8 +51060,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) - *(*uintptr)(unsafe.Pointer(bp + 464)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472))) + *(*uintptr)(unsafe.Pointer(bp + 472)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -50921,8 +51094,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) - *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6290, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472))) + *(*uintptr)(unsafe.Pointer(bp + 472)) = Xsqlite3MPrintf(tls, db, ts+6290, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51002,8 +51175,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) - *(*uintptr)(unsafe.Pointer(bp + 464)) = Xsqlite3MPrintf(tls, db, ts+6331, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472))) + *(*uintptr)(unsafe.Pointer(bp + 472)) = Xsqlite3MPrintf(tls, db, ts+6331, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51072,7 +51245,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+464) + rc = blobSeekToRow(tls, pBlob, iRow, bp+472) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51100,12 +51273,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 464)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 472)) != 0 { return ts + 3647 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 464)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 464))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 472)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51149,7 +51322,7 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 98957) + return Xsqlite3MisuseError(tls, 99516) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51232,7 +51405,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 99057) + return Xsqlite3MisuseError(tls, 99616) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -53752,6 +53925,34 @@ func extendFJMatch(tls *libc.TLS, pParse uintptr, ppList uintptr, pMatch uintptr } } +func isValidSchemaTableName(tls *libc.TLS, zTab uintptr, pTab uintptr, pSchema uintptr) int32 { + var zLegacy uintptr + + if Xsqlite3_strnicmp(tls, zTab, ts+6365, 7) != 0 { + return 0 + } + zLegacy = (*Table)(unsafe.Pointer(pTab)).FzName + if libc.Xstrcmp(tls, zLegacy+uintptr(7), ts+6373+7) == 0 { + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+6392+7) == 0 { + return 1 + } + if pSchema == uintptr(0) { + return 0 + } + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+5867+7) == 0 { + return 1 + } + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+6411+7) == 0 { + return 1 + } + } else { + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+6411+7) == 0 { + return 1 + } + } + return 0 +} + func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { bp := tls.Alloc(104) defer tls.Free(104) @@ -53771,7 +53972,6 @@ func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol u var pCol uintptr var hit int32 - var zTabName uintptr var hCol U8 var op int32 var pUpsert uintptr @@ -53826,7 +54026,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6365, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6425, zDb) == 0) { goto __8 } @@ -53947,7 +54147,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6370) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6430) != 0) { goto __33 } goto __14 @@ -53955,73 +54155,91 @@ __33: ; __31: ; - if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { - zTabName = (*SrcItem)(unsafe.Pointer(pItem)).FzAlias - } else { - zTabName = (*Table)(unsafe.Pointer(pTab)).FzName - } - - if !(Xsqlite3StrICmp(tls, zTabName, zTab) != 0) { + if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != uintptr(0)) { goto __34 } + if !(Xsqlite3StrICmp(tls, zTab, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) != 0) { + goto __36 + } goto __14 +__36: + ; + goto __35 __34: + if !(Xsqlite3StrICmp(tls, zTab, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + goto __37 + } + if !((*Table)(unsafe.Pointer(pTab)).Ftnum != Pgno(1)) { + goto __38 + } + goto __14 +__38: + ; + if !!(isValidSchemaTableName(tls, zTab, pTab, pSchema) != 0) { + goto __39 + } + goto __14 +__39: + ; +__37: + ; +__35: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) { - goto __35 + goto __40 } Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+64) -__35: +__40: ; __30: ; hCol = Xsqlite3StrIHash(tls, zCol) j = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol -__36: +__41: if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __38 + goto __43 } if !(int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(hCol) && Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0) { - goto __39 + goto __44 } if !(cnt > 0) { - goto __40 + goto __45 } if !(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pItem + 72)), zCol) < 0) { - goto __41 + goto __46 } Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 96))) *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0) - goto __42 -__41: + goto __47 +__46: if !(int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_RIGHT == 0) { - goto __43 + goto __48 } - goto __37 - goto __44 -__43: + goto __42 + goto __49 +__48: if !(int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT == 0) { - goto __45 + goto __50 } cnt = 0 Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 96))) *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0) - goto __46 -__45: + goto __51 +__50: extendFJMatch(tls, pParse, bp+96, pMatch, (*Expr)(unsafe.Pointer(pExpr)).FiColumn) -__46: +__51: ; -__44: +__49: ; -__42: +__47: ; -__40: +__45: ; cnt++ pMatch = pItem @@ -54033,28 +54251,28 @@ __40: return I16(j) }() if !(uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x2000>>13)) != 0) { - goto __47 + goto __52 } Xsqlite3SrcItemColumnUsed(tls, pItem, j) -__47: +__52: ; - goto __38 -__39: + goto __43 +__44: ; - goto __37 -__37: + goto __42 +__42: j++ pCol += 24 - goto __36 - goto __38 -__38: + goto __41 + goto __43 +__43: ; if !(0 == cnt && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { - goto __48 + goto __53 } cntTab++ pMatch = pItem -__48: +__53: ; goto __14 __14: @@ -54065,160 +54283,161 @@ __14: __15: ; if !(pMatch != 0) { - goto __49 + goto __54 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pMatch)).FiCursor *(*uintptr)(unsafe.Pointer(pExpr + 64)) = (*SrcItem)(unsafe.Pointer(pMatch)).FpTab if !(int32((*SrcItem)(unsafe.Pointer(pMatch)).Ffg.Fjointype)&(JT_LEFT|JT_LTORJ) != 0) { - goto __50 + goto __55 } *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_CanBeNull) -__50: +__55: ; pSchema = (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpSchema -__49: +__54: ; __12: ; if !(cnt == 0 && zDb == uintptr(0)) { - goto __51 + goto __56 } pTab = uintptr(0) if !((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != uintptr(0)) { - goto __52 + goto __57 } op = int32((*Parse)(unsafe.Pointer(pParse)).FeTriggerOp) if !((*Parse)(unsafe.Pointer(pParse)).FbReturning != 0) { - goto __53 + goto __58 } if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UBaseReg != 0 && (zTab == uintptr(0) || Xsqlite3StrICmp(tls, zTab, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab)).FzName) == 0)) { - goto __55 + goto __60 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.Bool32(op != TK_DELETE) pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab -__55: +__60: ; - goto __54 -__53: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6372, zTab) == 0) { - goto __56 + goto __59 +__58: + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6432, zTab) == 0) { + goto __61 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab - goto __57 -__56: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6376, zTab) == 0) { - goto __58 + goto __62 +__61: + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6436, zTab) == 0) { + goto __63 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab -__58: +__63: ; -__57: +__62: ; -__54: +__59: ; -__52: +__57: ; if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UUpsert != 0 && zTab != uintptr(0)) { - goto __59 + goto __64 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6380, zTab) == 0) { - goto __60 + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6440, zTab) == 0) { + goto __65 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab (*Expr)(unsafe.Pointer(pExpr)).FiTable = EXCLUDED_TABLE_NUMBER -__60: +__65: ; -__59: +__64: ; if !(pTab != 0) { - goto __61 + goto __66 } hCol1 = Xsqlite3StrIHash(tls, zCol) pSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema cntTab++ iCol = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol -__62: +__67: if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __64 + goto __69 } if !(int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(hCol1) && Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0) { - goto __65 + goto __70 } if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { - goto __66 + goto __71 } iCol = -1 -__66: +__71: ; - goto __64 -__65: + goto __69 +__70: ; - goto __63 -__63: + goto __68 +__68: iCol++ pCol += 24 - goto __62 - goto __64 -__64: + goto __67 + goto __69 +__69: ; if !(iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) && Xsqlite3IsRowid(tls, zCol) != 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { - goto __67 + goto __72 } iCol = -1 -__67: +__72: ; if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __68 + goto __73 } cnt++ pMatch = uintptr(0) if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == EXCLUDED_TABLE_NUMBER) { - goto __69 + goto __74 } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { - goto __71 + goto __76 } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar(iCol) *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab eNewExprOp = TK_COLUMN - goto __72 -__71: + goto __77 +__76: (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*Upsert)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNC + 16)))).FregData + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) eNewExprOp = TK_REGISTER -__72: +__77: ; - goto __70 -__69: + goto __75 +__74: ; *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab if !((*Parse)(unsafe.Pointer(pParse)).FbReturning != 0) { - goto __73 + goto __78 } eNewExprOp = TK_REGISTER (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar(iCol) (*Expr)(unsafe.Pointer(pExpr)).FiTable = *(*int32)(unsafe.Pointer(pNC + 16)) + (int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)*(*Expr)(unsafe.Pointer(pExpr)).FiTable + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) + 1 - goto __74 -__73: + goto __79 +__78: (*Expr)(unsafe.Pointer(pExpr)).FiColumn = I16(iCol) eNewExprOp = TK_TRIGGER if !(iCol < 0) { - goto __75 + goto __80 } (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER) - goto __76 -__75: + goto __81 +__80: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == 0) { - goto __77 + goto __82 } *(*U32)(unsafe.Pointer(pParse + 212)) |= func() uint32 { @@ -54227,8 +54446,8 @@ __75: } return U32(1) << iCol }() - goto __78 -__77: + goto __83 +__82: ; *(*U32)(unsafe.Pointer(pParse + 216)) |= func() uint32 { if iCol >= 32 { @@ -54236,19 +54455,19 @@ __77: } return U32(1) << iCol }() -__78: +__83: ; -__76: +__81: ; -__74: +__79: ; -__70: +__75: ; -__68: +__73: ; -__61: +__66: ; -__51: +__56: ; if !(cnt == 0 && cntTab == 1 && @@ -54256,81 +54475,81 @@ __51: (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) == 0 && Xsqlite3IsRowid(tls, zCol) != 0 && (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pMatch)).FpTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { - goto __79 + goto __84 } cnt = 1 (*Expr)(unsafe.Pointer(pExpr)).FiColumn = int16(-1) (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER) -__79: +__84: ; if !(cnt == 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UEList != 0 && zTab == uintptr(0)) { - goto __80 + goto __85 } pEList = *(*uintptr)(unsafe.Pointer(pNC + 16)) j = 0 -__81: +__86: if !(j < (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { - goto __83 + goto __88 } zAs = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32)).FzEName if !(int32(*(*uint16)(unsafe.Pointer(pEList + 8 + uintptr(j)*32 + 16 + 4))&0x3>>0) == ENAME_NAME && Xsqlite3_stricmp(tls, zAs, zCol) == 0) { - goto __84 + goto __89 } pOrig = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32)).FpExpr if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { - goto __85 + goto __90 } - Xsqlite3ErrorMsg(tls, pParse, ts+6389, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6449, libc.VaList(bp, zAs)) return WRC_Abort -__85: +__90: ; if !((*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Win) != U32(0) && ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { - goto __86 + goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+6420, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6480, libc.VaList(bp+8, zAs)) return WRC_Abort -__86: +__91: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { - goto __87 + goto __92 } - Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6517, 0) return WRC_Abort -__87: +__92: ; resolveAlias(tls, pParse, pEList, j, pExpr, nSubquery) cnt = 1 pMatch = uintptr(0) if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { - goto __88 + goto __93 } Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) -__88: +__93: ; goto lookupname_end -__84: +__89: ; - goto __82 -__82: + goto __87 +__87: j++ - goto __81 - goto __83 -__83: + goto __86 + goto __88 +__88: ; -__80: +__85: ; if !(cnt != 0) { - goto __89 + goto __94 } goto __11 -__89: +__94: ; pNC = (*NameContext)(unsafe.Pointer(pNC)).FpNext nSubquery++ @@ -54343,141 +54562,141 @@ __10: __11: ; if !(cnt == 0 && zTab == uintptr(0)) { - goto __90 + goto __95 } if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != U32(0) && areDoubleQuotedStringsEnabled(tls, db, pTopNC) != 0) { - goto __91 + goto __96 } Xsqlite3_log(tls, SQLITE_WARNING, - ts+6475, libc.VaList(bp+16, zCol)) + ts+6535, 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 -__91: +__96: ; if !(Xsqlite3ExprIdToTrueFalse(tls, pExpr) != 0) { - goto __92 + goto __97 } return WRC_Prune -__92: +__97: ; -__90: +__95: ; if !(cnt != 1) { - goto __93 + goto __98 } if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != 0) { - goto __94 + goto __99 } if !((*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FnExpr == cnt-1) { - goto __95 + goto __100 } if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Leaf) != U32(0)) { - goto __97 + goto __102 } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Leaf)) - goto __98 -__97: + goto __103 +__102: Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) (*Expr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpRight) (*Expr)(unsafe.Pointer(pExpr)).FpRight = uintptr(0) -__98: +__103: ; 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 + 6510 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6570 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 96)) cnt = 1 goto lookupname_end - goto __96 -__95: + goto __101 +__100: Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 96))) *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0) -__96: +__101: ; -__94: +__99: ; if cnt == 0 { - zErr = ts + 6519 + zErr = ts + 6579 } else { - zErr = ts + 6534 + zErr = ts + 6594 } if !(zDb != 0) { - goto __99 + goto __104 } - Xsqlite3ErrorMsg(tls, pParse, ts+6556, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) - goto __100 -__99: + Xsqlite3ErrorMsg(tls, pParse, ts+6616, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + goto __105 +__104: if !(zTab != 0) { - goto __101 + goto __106 } - Xsqlite3ErrorMsg(tls, pParse, ts+6569, libc.VaList(bp+56, zErr, zTab, zCol)) - goto __102 -__101: - Xsqlite3ErrorMsg(tls, pParse, ts+6579, libc.VaList(bp+80, zErr, zCol)) -__102: + Xsqlite3ErrorMsg(tls, pParse, ts+6629, libc.VaList(bp+56, zErr, zTab, zCol)) + goto __107 +__106: + Xsqlite3ErrorMsg(tls, pParse, ts+6639, libc.VaList(bp+80, zErr, zCol)) +__107: ; -__100: +__105: ; Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) (*NameContext)(unsafe.Pointer(pTopNC)).FnNcErr++ -__93: +__98: ; if !!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { - goto __103 + goto __108 } Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) (*Expr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpRight) (*Expr)(unsafe.Pointer(pExpr)).FpRight = uintptr(0) *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Leaf) -__103: +__108: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 && pMatch != uintptr(0)) { - goto __104 + goto __109 } *(*Bitmask)(unsafe.Pointer(pMatch + 80)) |= Xsqlite3ExprColUsed(tls, pExpr) -__104: +__109: ; (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(eNewExprOp) lookupname_end: if !(cnt == 1) { - goto __105 + goto __110 } if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FxAuth != 0 && (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER)) { - goto __107 + goto __112 } Xsqlite3AuthRead(tls, pParse, pExpr, pSchema, (*NameContext)(unsafe.Pointer(pNC)).FpSrcList) -__107: +__112: ; -__108: +__113: ; (*NameContext)(unsafe.Pointer(pTopNC)).FnRef++ if !(pTopNC == pNC) { - goto __111 + goto __116 } - goto __110 -__111: + goto __115 +__116: ; pTopNC = (*NameContext)(unsafe.Pointer(pTopNC)).FpNext - goto __109 -__109: - goto __108 - goto __110 -__110: + goto __114 +__114: + goto __113 + goto __115 +__115: ; return WRC_Prune - goto __106 -__105: + goto __111 +__110: return WRC_Abort -__106: +__111: ; return int32(0) } @@ -54521,15 +54740,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 + 6586 + var zIn uintptr = ts + 6646 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6614 + zIn = ts + 6674 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6632 + zIn = ts + 6692 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6650 + zIn = ts + 6710 } - Xsqlite3ErrorMsg(tls, pParse, ts+6668, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6728, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -54608,10 +54827,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 + 6688 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6748 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6693 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6753 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -54658,7 +54877,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+6699, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6759, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -54722,7 +54941,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+6716, libc.VaList(bp, pExpr)) + ts+6776, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -54738,7 +54957,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+6780, + Xsqlite3ErrorMsg(tls, pParse, ts+6840, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54752,7 +54971,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+6816, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6876, uintptr(0), pExpr) } } else { @@ -54775,30 +54994,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+6844, libc.VaList(bp+16, pExpr)) + ts+6904, 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 + 6887 + zType = ts + 6947 } else { - zType = ts + 6894 + zType = ts + 6954 } - Xsqlite3ErrorMsg(tls, pParse, ts+6904, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6964, 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+6932, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6992, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6954, + Xsqlite3ErrorMsg(tls, pParse, ts+7014, 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+6998, + ts+7058, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -54870,7 +55089,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+7046, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7106, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -54886,7 +55105,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+7057, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7117, pExpr, pExpr) } break @@ -54942,7 +55161,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+6457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6517, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55017,7 +55236,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7068, libc.VaList(bp, i, zType, mx)) + ts+7128, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55037,7 +55256,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+7124, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7184, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55072,7 +55291,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+7158, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7218, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55129,7 +55348,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7164, libc.VaList(bp, i+1)) + ts+7224, libc.VaList(bp, i+1)) return 1 } } @@ -55157,7 +55376,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+7225, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7285, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55371,7 +55590,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+7256, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7316, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55411,7 +55630,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+7158) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7218) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55422,7 +55641,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7295) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7355) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55434,7 +55653,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+7301, 0) + ts+7361, 0) return WRC_Abort } @@ -55534,12 +55753,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 + 308)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 316)) += (*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 + 308)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 316)) -= (*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 @@ -55575,12 +55794,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 308)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 316)) += (*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 + 308)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 316)) -= (*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)) @@ -55690,33 +55909,134 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE (select a from t1); func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { var op int32 - for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { - pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft - - } op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) - if op == TK_REGISTER { - op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) - } - if op == TK_COLUMN || op == TK_AGG_COLUMN { - return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } - if op == TK_SELECT { - return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr) - } - if op == TK_CAST { - return Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)) - } - if op == TK_SELECT_COLUMN { - return Xsqlite3ExprAffinity(tls, - (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft + 32)))).FpEList+8+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr) - } - if op == TK_VECTOR { - return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8)).FpExpr) + for 1 != 0 { + if op == TK_COLUMN || op == TK_AGG_COLUMN && *(*uintptr)(unsafe.Pointer(pExpr + 64)) != uintptr(0) { + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) + } + if op == TK_SELECT { + return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr) + } + if op == TK_CAST { + return Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)) + } + if op == TK_SELECT_COLUMN { + return Xsqlite3ExprAffinity(tls, + (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft + 32)))).FpEList+8+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr) + } + if op == TK_VECTOR { + return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8)).FpExpr) + } + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + continue + } + if op != TK_REGISTER || libc.AssignInt32(&op, int32((*Expr)(unsafe.Pointer(pExpr)).Fop2)) == TK_REGISTER { + break + } } return (*Expr)(unsafe.Pointer(pExpr)).FaffExpr } +// Make a guess at all the possible datatypes of the result that could +// be returned by an expression. Return a bitmask indicating the answer: +// +// 0x01 Numeric +// 0x02 Text +// 0x04 Blob +// +// If the expression must return NULL, then 0x00 is returned. +func Xsqlite3ExprDataType(tls *libc.TLS, pExpr uintptr) int32 { + for pExpr != 0 { + switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + case TK_COLLATE: + fallthrough + case TK_IF_NULL_ROW: + fallthrough + case TK_UPLUS: + { + pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft + break + + } + case TK_NULL: + { + pExpr = uintptr(0) + break + + } + case TK_STRING: + { + return 0x02 + + } + case TK_BLOB: + { + return 0x04 + + } + case TK_CONCAT: + { + return 0x06 + + } + case TK_VARIABLE: + fallthrough + case TK_AGG_FUNCTION: + fallthrough + case TK_FUNCTION: + { + return 0x07 + + } + case TK_COLUMN: + fallthrough + case TK_AGG_COLUMN: + fallthrough + case TK_SELECT: + fallthrough + case TK_CAST: + fallthrough + case TK_SELECT_COLUMN: + fallthrough + case TK_VECTOR: + { + var aff int32 = int32(Xsqlite3ExprAffinity(tls, pExpr)) + if aff >= SQLITE_AFF_NUMERIC { + return 0x05 + } + if aff == SQLITE_AFF_TEXT { + return 0x06 + } + return 0x07 + + } + case TK_CASE: + { + var res int32 = 0 + var ii int32 + var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) + + for ii = 1; ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr; ii = ii + 2 { + res = res | Xsqlite3ExprDataType(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr) + } + if (*ExprList)(unsafe.Pointer(pList)).FnExpr%2 != 0 { + res = res | Xsqlite3ExprDataType(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32)).FpExpr) + } + return res + + } + default: + { + return 0x01 + + } + } + } + return 0x00 +} + // Set the collating sequence for expression pExpr to be the collating // sequence named by pToken. Return a pointer to a new Expr node that // implements the COLLATE operator. @@ -55786,7 +56106,8 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { if op == TK_REGISTER { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } - if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { + if op == TK_AGG_COLUMN && *(*uintptr)(unsafe.Pointer(p + 64)) != uintptr(0) || + op == TK_COLUMN || op == TK_TRIGGER { var j int32 if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { @@ -56121,7 +56442,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6517, 0) return } @@ -56196,7 +56517,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+7360, libc.VaList(bp, mxHeight)) + ts+7420, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -56445,10 +56766,10 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7408, + Xsqlite3ErrorMsg(tls, pParse, ts+7468, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7452 + return ts + 7512 } return ts + 1538 }(), nElem)) @@ -56489,7 +56810,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+7454) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7514) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -56515,7 +56836,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+7456, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7516, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -56543,7 +56864,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+7490, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7550, libc.VaList(bp, pExpr)) } } } @@ -56590,7 +56911,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+7510, + Xsqlite3ErrorMsg(tls, pParse, ts+7570, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -56615,7 +56936,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+7553, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7613, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57190,7 +57511,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+7576, + Xsqlite3ErrorMsg(tls, pParse, ts+7636, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57313,7 +57634,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+7606, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7666, libc.VaList(bp, zObject)) } } @@ -57369,10 +57690,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+6688) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6748) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6693) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6753) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -57803,13 +58124,13 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 // Return TRUE if the given string is a row-id column name. func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { - if Xsqlite3StrICmp(tls, z, ts+7629) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7689) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7637) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7697) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7643) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7703) == 0 { return 1 } return 0 @@ -58013,7 +58334,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+7647, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7707, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58091,7 +58412,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+7694, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7754, 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) @@ -58185,7 +58506,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 + 7725 + var zFmt uintptr = ts + 7785 Xsqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp, nActual, nExpect)) } } @@ -58203,7 +58524,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+6457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6517, 0) } } @@ -58244,7 +58565,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+7769, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7829, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4)), @@ -58274,11 +58595,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+7792, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7852, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 1538 } - return ts + 7811 + return ts + 7871 }(), (*Select)(unsafe.Pointer(pSelect)).FselId)) if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { @@ -58405,7 +58726,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+7823, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7883, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4)), *(*int32)(unsafe.Pointer(pExpr + 64))) @@ -58420,12 +58741,13 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7841, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7901, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 1538 } - return ts + 7811 + return ts + 7871 }(), (*Select)(unsafe.Pointer(pSel)).FselId)) + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { nReg = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr } else { @@ -58446,7 +58768,7 @@ 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+7454) + pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7514) if pLimit != 0 { (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = int8(SQLITE_AFF_NUMERIC) pLimit = Xsqlite3PExpr(tls, pParse, TK_NE, @@ -58455,7 +58777,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { 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+7862) + pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7922) (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) } (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 @@ -58841,8 +59163,8 @@ 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+7864, 2) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7867, + if Xsqlite3_strnicmp(tls, z, ts+7924, 2) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7927, libc.VaList(bp, func() uintptr { if negFlag != 0 { return ts + 4916 @@ -58918,7 +59240,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+7894, + Xsqlite3ErrorMsg(tls, pParse, ts+7954, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else { var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab @@ -59004,8 +59326,8 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { } func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { - bp := tls.Alloc(112) - defer tls.Free(112) + bp := tls.Alloc(120) + defer tls.Free(120) var nFarg int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -59091,14 +59413,16 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI case INLINEFUNC_affinity: { - *(*[5]uintptr)(unsafe.Pointer(bp + 72)) = [5]uintptr{ts + 7924, ts + 7929, ts + 7934, ts + 6175, ts + 6170} + *(*[6]uintptr)(unsafe.Pointer(bp + 72)) = [6]uintptr{ts + 7984, ts + 7989, ts + 7994, ts + 6175, + ts + 6170, ts + 8002} var aff int8 aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) + Xsqlite3VdbeLoadString(tls, v, target, func() uintptr { if int32(aff) <= SQLITE_AFF_NONE { - return ts + 7942 + return ts + 8010 } return *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(int32(aff)-SQLITE_AFF_BLOB)*8)) }()) @@ -59112,7 +59436,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI 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 { + for p = (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr; p != 0; p = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext { var iDataCur int32 = (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur if iDataCur < 0 { continue @@ -59135,10 +59459,10 @@ func sqlite3IndexedExprLookup(tls *libc.TLS, pParse uintptr, pExpr uintptr, targ 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) + p = (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr = uintptr(0) Xsqlite3ExprCode(tls, pParse, pExpr, target) - (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr = p + (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr = p Xsqlite3VdbeJumpHere(tls, v, addr+2) } else { Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur, (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCol, target) @@ -59238,7 +59562,7 @@ expr_code_doover: op = TK_NULL goto __2 __1: - if !((*Parse)(unsafe.Pointer(pParse)).FpIdxExpr != uintptr(0) && + if !((*Parse)(unsafe.Pointer(pParse)).FpIdxEpr != uintptr(0) && !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Leaf) != U32(0)) && libc.AssignInt32(&r1, sqlite3IndexedExprLookup(tls, pParse, pExpr, target)) >= 0) { goto __3 @@ -59368,12 +59692,13 @@ __2: __6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo - pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32 + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*24 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { goto __58 } - - return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem + return func() int32 { + return (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg + int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) + }() goto __59 __58: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { @@ -59382,110 +59707,123 @@ __58: pTab = (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab, int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn), target) - if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) < 0) { - goto __61 + if !(pTab == uintptr(0)) { + goto __62 } - goto __62 -__61: - if !(pTab != uintptr(0)) { - goto __63 + goto __63 +__62: + if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) < 0) { + goto __64 } + goto __65 +__64: + ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { - goto __64 + goto __66 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__64: +__66: ; -__63: +__65: ; -__62: +__63: ; return target + goto __61 __60: + if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) == uintptr(0)) { + goto __67 + } + + Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*Expr)(unsafe.Pointer(pExpr)).FiTable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) + return target +__67: + ; +__61: ; __59: ; __7: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { - goto __65 + goto __68 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) if !(aff > SQLITE_AFF_BLOB) { - goto __66 + goto __69 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) -__66: +__69: ; return iReg -__65: +__68: ; if !(iTab < 0) { - goto __67 + goto __70 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { - goto __68 + goto __71 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { - goto __70 + goto __73 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__70: +__73: ; 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 __71 + goto __74 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __73 + goto __76 } - Xsqlite3ErrorMsg(tls, pParse, ts+7894, + Xsqlite3ErrorMsg(tls, pParse, ts+7954, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__73: +__76: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { - goto __74 + goto __77 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) -__74: +__77: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc - goto __72 -__71: + goto __75 +__74: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { - goto __75 + goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target - goto __76 -__75: + goto __79 +__78: return iSrc -__76: +__79: ; -__72: +__75: ; - goto __69 -__68: + goto __72 +__71: iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 -__69: +__72: ; -__67: +__70: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, @@ -59528,13 +59866,13 @@ __14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { - goto __77 + goto __80 } z1 = Xsqlite3VListNumToName(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) *(*VList)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpVList)) = 0 Xsqlite3VdbeAppendP4(tls, v, z1, -1) -__77: +__80: ; return target @@ -59544,11 +59882,11 @@ __15: __16: inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { - goto __78 + goto __81 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, inReg, target) inReg = target -__78: +__81: ; Xsqlite3VdbeAddOp2(tls, v, OP_Cast, target, int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) @@ -59571,11 +59909,11 @@ __23: __24: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { - goto __79 + goto __82 } codeVectorCompare(tls, pParse, pExpr, target, uint8(op), uint8(p5)) - goto __80 -__79: + goto __83 +__82: r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, inReg) @@ -59584,15 +59922,15 @@ __79: libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) if !(p5 == SQLITE_NULLEQ) { - goto __81 + goto __84 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, inReg) - goto __82 -__81: + goto __85 +__84: Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, inReg, r2) -__82: +__85: ; -__80: +__83: ; goto __5 @@ -59619,20 +59957,20 @@ __37: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { - goto __83 + goto __86 } codeInteger(tls, pParse, pLeft1, 1, target) return target - goto __84 -__83: + goto __87 +__86: if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_FLOAT) { - goto __85 + goto __88 } codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pLeft1 + 8)), 1, target) return target - goto __86 -__85: + goto __89 +__88: (*Expr)(unsafe.Pointer(bp + 48)).Fop = U8(TK_INTEGER) (*Expr)(unsafe.Pointer(bp + 48)).Fflags = U32(EP_IntValue | EP_TokenOnly) *(*int32)(unsafe.Pointer(bp + 48 + 8)) = 0 @@ -59641,9 +59979,9 @@ __85: r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44) Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, r2, r1, target) -__86: +__89: ; -__84: +__87: ; goto __5 @@ -59681,14 +60019,16 @@ __43: if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) >= (*AggInfo)(unsafe.Pointer(pInfo)).FnFunc) { - goto __87 + goto __90 } - Xsqlite3ErrorMsg(tls, pParse, ts+7947, libc.VaList(bp+8, pExpr)) - goto __88 -__87: - return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem -__88: + Xsqlite3ErrorMsg(tls, pParse, ts+8015, libc.VaList(bp+8, pExpr)) + goto __91 +__90: + return func() int32 { + return (*AggInfo)(unsafe.Pointer(pInfo)).FiFirstReg + (*AggInfo)(unsafe.Pointer(pInfo)).FnColumn + int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) + }() +__91: ; goto __5 @@ -59699,17 +60039,17 @@ __44: pColl = uintptr(0) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __89 + goto __92 } return (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FregResult -__89: +__92: ; if !((*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0) { - goto __90 + goto __93 } return Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -1) -__90: +__93: ; pFarg = *(*uintptr)(unsafe.Pointer(pExpr + 32)) if pFarg != 0 { @@ -59721,128 +60061,128 @@ __90: zId = *(*uintptr)(unsafe.Pointer(pExpr + 8)) pDef = Xsqlite3FindFunction(tls, db, zId, nFarg, enc, uint8(0)) if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { - goto __91 + goto __94 } - Xsqlite3ErrorMsg(tls, pParse, ts+7974, libc.VaList(bp+16, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8042, libc.VaList(bp+16, pExpr)) goto __5 -__91: +__94: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { - goto __92 + goto __95 } return exprCodeInlineFunction(tls, pParse, pFarg, int32((*FuncDef)(unsafe.Pointer(pDef)).FpUserData), target) - goto __93 -__92: + goto __96 +__95: if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) != 0) { - goto __94 + goto __97 } Xsqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef) -__94: +__97: ; -__93: +__96: ; i = 0 -__95: +__98: if !(i < nFarg) { - goto __97 + goto __100 } if !(i < 32 && Xsqlite3ExprIsConstant(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr) != 0) { - goto __98 + goto __101 } constMask = constMask | uint32(1)<<i -__98: +__101: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != U32(0) && !(pColl != 0)) { - goto __99 + goto __102 } pColl = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr) -__99: +__102: ; - goto __96 -__96: + goto __99 +__99: i++ - goto __95 - goto __97 -__97: + goto __98 + goto __100 +__100: ; if !(pFarg != 0) { - goto __100 + goto __103 } if !(constMask != 0) { - goto __102 + goto __105 } r1 = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nFarg - goto __103 -__102: + goto __106 +__105: r1 = Xsqlite3GetTempRange(tls, pParse, nFarg) -__103: +__106: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_LENGTH|SQLITE_FUNC_TYPEOF) != U32(0)) { - goto __104 + goto __107 } exprOp = (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pFarg + 8)).FpExpr)).Fop if !(int32(exprOp) == TK_COLUMN || int32(exprOp) == TK_AGG_COLUMN) { - goto __105 + goto __108 } (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pFarg + 8)).FpExpr)).Fop2 = U8((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG)) -__105: +__108: ; -__104: +__107: ; Xsqlite3ExprCodeExprList(tls, pParse, pFarg, r1, 0, uint8(SQLITE_ECEL_DUP|SQLITE_ECEL_FACTOR)) - goto __101 -__100: + goto __104 +__103: r1 = 0 -__101: +__104: ; if !(nFarg >= 2 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_InfixFunc) != U32(0)) { - goto __106 + goto __109 } pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr) - goto __107 -__106: + goto __110 +__109: if !(nFarg > 0) { - goto __108 + goto __111 } pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) -__108: +__111: ; -__107: +__110: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { - goto __109 + goto __112 } if !!(pColl != 0) { - goto __110 + goto __113 } pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl -__110: +__113: ; Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, 0, 0, 0, pColl, -2) -__109: +__112: ; Xsqlite3VdbeAddFunctionCall(tls, pParse, int32(constMask), r1, target, nFarg, pDef, int32((*Expr)(unsafe.Pointer(pExpr)).Fop2)) if !(nFarg != 0) { - goto __111 + goto __114 } if !(constMask == U32(0)) { - goto __112 + goto __115 } Xsqlite3ReleaseTempRange(tls, pParse, r1, nFarg) - goto __113 -__112: + goto __116 +__115: ; -__113: +__116: ; -__111: +__114: ; return target @@ -59850,42 +60190,42 @@ __45: __46: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { - goto __114 + goto __117 } return 0 - goto __115 -__114: + goto __118 +__117: if !(op == TK_SELECT && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && libc.AssignInt32(&nCol, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr) != 1) { - goto __116 + goto __119 } Xsqlite3SubselectError(tls, pParse, nCol, 1) - goto __117 -__116: + goto __120 +__119: return Xsqlite3CodeSubselect(tls, pParse, pExpr) -__117: +__120: ; -__115: +__118: ; goto __5 __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 + goto __121 } (*Expr)(unsafe.Pointer(pLeft2)).FiTable = Xsqlite3CodeSubselect(tls, pParse, pLeft2) (*Expr)(unsafe.Pointer(pLeft2)).Fop2 = (*Parse)(unsafe.Pointer(pParse)).FwithinRJSubrtn -__118: +__121: ; n1 = Xsqlite3ExprVectorSize(tls, pLeft2) if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { - goto __119 + goto __122 } - Xsqlite3ErrorMsg(tls, pParse, ts+7576, + Xsqlite3ErrorMsg(tls, pParse, ts+7636, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) -__119: +__122: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -59908,23 +60248,23 @@ __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) { - goto __120 + goto __123 } inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { - goto __122 + goto __125 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, inReg, target) inReg = target -__122: +__125: ; Xsqlite3VdbeAddOp1(tls, v, OP_ClrSubtype, inReg) return inReg - goto __121 -__120: + goto __124 +__123: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover -__121: +__124: ; __51: __52: @@ -59941,42 +60281,44 @@ __53: Xsqlite3VdbeAddOp2(tls, v, OP_Param, p1, target) if !(iCol1 >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab2)).FaCol+uintptr(iCol1)*24)).Faffinity) == SQLITE_AFF_REAL) { - goto __123 + goto __126 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__123: +__126: ; goto __5 __54: - Xsqlite3ErrorMsg(tls, pParse, ts+6457, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6517, 0) goto __5 __55: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor pAggInfo1 = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pAggInfo1 != 0) { - goto __124 + goto __127 } if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode) != 0) { - goto __125 + goto __128 } - inReg = (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem + inReg = func() int32 { + return (*AggInfo)(unsafe.Pointer(pAggInfo1)).FiFirstReg + int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) + }() goto __5 -__125: +__128: ; if !((*AggInfo)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo)).FuseSortingIdx != 0) { - goto __126 + goto __129 } 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), + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*24)).FiSorterColumn), target) inReg = target goto __5 -__126: +__129: ; -__124: +__127: ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) @@ -59997,15 +60339,15 @@ __56: nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { - goto __127 + goto __130 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { - goto __128 + goto __131 } Xsqlite3ExprDelete(tls, db1, pDel) goto __5 -__128: +__131: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) @@ -60015,22 +60357,22 @@ __128: pTest = bp + 120 *(*int32)(unsafe.Pointer(bp + 40)) = 0 -__127: +__130: ; i1 = 0 -__129: +__132: if !(i1 < nExpr-1) { - goto __131 + goto __134 } if !(pX != 0) { - goto __132 + goto __135 } (*Expr)(unsafe.Pointer(bp + 120)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr - goto __133 -__132: + goto __136 +__135: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr -__133: +__136: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60039,21 +60381,21 @@ __133: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) - goto __130 -__130: + goto __133 +__133: i1 = i1 + 2 - goto __129 - goto __131 -__131: + goto __132 + goto __134 +__134: ; if !(nExpr&1 != 0) { - goto __134 + goto __137 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) - goto __135 -__134: + goto __138 +__137: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__135: +__138: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) @@ -60063,27 +60405,27 @@ __135: __57: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { - goto __136 + goto __139 } Xsqlite3ErrorMsg(tls, pParse, - ts+7998, 0) + ts+8066, 0) return 0 -__136: +__139: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { - goto __137 + goto __140 } Xsqlite3MayAbort(tls, pParse) -__137: +__140: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { - goto __138 + goto __141 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) - goto __139 -__138: + goto __142 +__141: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { @@ -60092,7 +60434,7 @@ __138: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__139: +__142: ; goto __5 @@ -60103,7 +60445,7 @@ __5: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8048)) +var zAff = *(*[10]int8)(unsafe.Pointer(ts + 8116)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -61478,18 +61820,18 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { 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_FUNCTION { - if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { + if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*24)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { - (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(iAgg)*32)).FpCExpr = pExpr + (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(iAgg)*24)).FpCExpr = pExpr Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) } } } else { - if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*32)).FpFExpr == pExpr { + if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*24)).FpFExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { - (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*32)).FpFExpr = pExpr + (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*24)).FpFExpr = pExpr Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) } } @@ -61519,7 +61861,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { db, (*AggInfo)(unsafe.Pointer(pInfo)).FaCol, int32(unsafe.Sizeof(AggInfo_col{})), - pInfo+40, + pInfo+32, bp) return *(*int32)(unsafe.Pointer(bp)) } @@ -61532,12 +61874,110 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { db, (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc, int32(unsafe.Sizeof(AggInfo_func{})), - pInfo+56, + pInfo+48, bp) return *(*int32)(unsafe.Pointer(bp)) } +func findOrCreateAggInfoColumn(tls *libc.TLS, pParse uintptr, pAggInfo uintptr, pExpr uintptr) { + var pCol uintptr + var k int32 + var pE uintptr + var j int32 + var n int32 + var pGB uintptr + var pTerm uintptr + + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + k = 0 +__1: + if !(k < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { + goto __3 + } + 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 __4 + } + goto fix_up_expr +__4: + ; + goto __2 +__2: + k++ + pCol += 24 + goto __1 + goto __3 +__3: + ; + k = addAggInfoColumn(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo) + if !(k < 0) { + goto __5 + } + + return +__5: + ; + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(k)*24 + + (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) + (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable = (*Expr)(unsafe.Pointer(pExpr)).FiTable + (*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn = (*Expr)(unsafe.Pointer(pExpr)).FiColumn + (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = int16(-1) + (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr = pExpr + if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW) { + goto __6 + } + pGB = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy + pTerm = pGB + 8 + n = (*ExprList)(unsafe.Pointer(pGB)).FnExpr + j = 0 +__7: + if !(j < n) { + goto __9 + } + pE = (*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)) { + goto __10 + } + (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(j) + goto __9 +__10: + ; + goto __8 +__8: + j++ + pTerm += 32 + goto __7 + goto __9 +__9: + ; +__6: + ; + if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) < 0) { + goto __11 + } + (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(libc.PostIncUint16(&(*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn, 1)) +__11: + ; +fix_up_expr: + ; + (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo + if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN) { + goto __12 + } + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) +__12: + ; + (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) +} + func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { + bp := tls.Alloc(72) + defer tls.Free(72) + var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -61545,6 +61985,46 @@ 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) { + default: + { + var pIEpr uintptr + + if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_InAggFunc == 0 { + break + } + if (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr == uintptr(0) { + break + } + for pIEpr = (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr; pIEpr != 0; pIEpr = (*IndexedExpr)(unsafe.Pointer(pIEpr)).FpIENext { + var iDataCur int32 = (*IndexedExpr)(unsafe.Pointer(pIEpr)).FiDataCur + if iDataCur < 0 { + continue + } + if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IndexedExpr)(unsafe.Pointer(pIEpr)).FpExpr, iDataCur) == 0 { + break + } + } + if pIEpr == uintptr(0) { + break + } + if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0)) { + break + } + if (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { + break + } + + libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp)).Fop = U8(TK_AGG_COLUMN) + (*Expr)(unsafe.Pointer(bp)).FiTable = (*IndexedExpr)(unsafe.Pointer(pIEpr)).FiIdxCur + (*Expr)(unsafe.Pointer(bp)).FiColumn = YnVar((*IndexedExpr)(unsafe.Pointer(pIEpr)).FiIdxCol) + findOrCreateAggInfoColumn(tls, pParse, pAggInfo, bp) + (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(bp)).FiAgg)*24)).FpCExpr = pExpr + (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo + (*Expr)(unsafe.Pointer(pExpr)).FiAgg = (*Expr)(unsafe.Pointer(bp)).FiAgg + return WRC_Prune + + } case TK_IF_NULL_ROW: fallthrough case TK_AGG_COLUMN: @@ -61559,81 +62039,8 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { goto __3 } { - var pCol uintptr - if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pItem)).FiCursor { - var k int32 - pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol - k = 0 - __4: - if !(k < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __6 - } - { - if (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && - int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) && - int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { - goto __6 - } - - } - goto __5 - __5: - k++ - pCol += 32 - goto __4 - goto __6 - __6: - ; - if k >= (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn && - libc.AssignInt32(&k, addAggInfoColumn(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo)) >= 0 { - pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(k)*32 - - (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) - (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable = (*Expr)(unsafe.Pointer(pExpr)).FiTable - (*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn = (*Expr)(unsafe.Pointer(pExpr)).FiColumn - (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) - (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = int16(-1) - (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr = pExpr - if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_IF_NULL_ROW { - var j int32 - var n int32 - var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy - var pTerm uintptr = pGB + 8 - n = (*ExprList)(unsafe.Pointer(pGB)).FnExpr - j = 0 - __7: - if !(j < n) { - goto __9 - } - { - var pE uintptr = (*ExprList_item)(unsafe.Pointer(pTerm)).FpExpr - if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_COLUMN && - (*Expr)(unsafe.Pointer(pE)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && - int32((*Expr)(unsafe.Pointer(pE)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { - (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(j) - goto __9 - } - - } - goto __8 - __8: - j++ - pTerm += 32 - goto __7 - goto __9 - __9: - } - if int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) < 0 { - (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(libc.PostIncInt32(&(*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn, 1)) - } - } - - (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo - 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) + findOrCreateAggInfoColumn(tls, pParse, pAggInfo, pExpr) goto __3 } @@ -61655,34 +62062,33 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth == int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) { var pItem uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc i = 0 - __10: + __4: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __12 + goto __6 } { if (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr == pExpr { - goto __12 + goto __6 } if Xsqlite3ExprCompare(tls, uintptr(0), (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr, pExpr, -1) == 0 { - goto __12 + goto __6 } } - goto __11 - __11: + goto __5 + __5: i++ - pItem += 32 - goto __10 - goto __12 - __12: + pItem += 24 + goto __4 + goto __6 + __6: ; if i >= (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc { var enc U8 = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc i = addAggInfoFunc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo) if i >= 0 { - pItem = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32 + pItem = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24 (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr = pExpr - (*AggInfo_func)(unsafe.Pointer(pItem)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) (*AggInfo_func)(unsafe.Pointer(pItem)).FpFunc = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(pExpr + 8)), @@ -61772,7 +62178,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 + 224 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 228 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -61780,7 +62186,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 + 224 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 228 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -61831,11 +62237,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+8056, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6365, 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+8064, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8126, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -61847,13 +62253,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8092, + ts+8154, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8267, + ts+8329, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -61863,10 +62269,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8441, libc.VaList(bp, zDb, zDb)) + ts+8503, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8588, 0) + ts+8650, 0) } } @@ -61930,7 +62336,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8739, libc.VaList(bp, zName)) + ts+8801, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -61940,7 +62346,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8798, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8860, zName)) { goto __6 } goto exit_rename_table @@ -61949,7 +62355,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8804, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8866, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -61990,19 +62396,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8831, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8893, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9015, + ts+9077, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9320, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9382, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9336, + ts+9398, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62010,7 +62416,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9394, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9456, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62022,7 +62428,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9659, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9721, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62034,7 +62440,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9672, + ts+9734, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62080,12 +62486,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9710, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9772, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9742, 0) + ts+9804, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62095,11 +62501,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+9769) + ts+9831) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9828) + ts+9890) } if pDflt != 0 { @@ -62112,12 +62518,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9881) + ts+9943) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9927) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9989) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62128,7 +62534,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9954, + ts+10016, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62150,7 +62556,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10100, + ts+10162, libc.VaList(bp+40, zTab, zDb)) } } @@ -62198,14 +62604,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10330, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10392, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10364, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10426, 0) goto exit_begin_add_column __4: ; @@ -62233,7 +62639,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+10394, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10456, 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 } @@ -62273,18 +62679,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 + 10413 + zType = ts + 10475 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10418 + zType = ts + 10480 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10432, + Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10450 + return ts + 10512 } - return ts + 10467 + return ts + 10529 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62368,7 +62774,7 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10485, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10547, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; @@ -62385,17 +62791,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10506, + ts+10568, 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+10688, + ts+10750, 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+9659, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9721, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62590,7 +62996,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 408; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { + for pp = pParse + 416; *(*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 { @@ -62653,10 +63059,10 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10819, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10881, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10842 + return ts + 10904 } return ts + 1538 }(), zWhen, @@ -62698,8 +63104,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+10844, 7) != 0 { - return Xsqlite3CorruptError(tls, 112777) + if Xsqlite3_strnicmp(tls, zSql, ts+10906, 7) != 0 { + return Xsqlite3CorruptError(tls, 113494) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -62716,7 +63122,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, 112788) + rc = Xsqlite3CorruptError(tls, 113505) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -62738,7 +63144,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+10852, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10914, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -62778,10 +63184,10 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10858, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10920, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { - return ts + 10842 + return ts + 10904 } return ts + 1538 }())) @@ -62957,8 +63363,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(496) - defer tls.Free(496) + bp := tls.Alloc(504) + defer tls.Free(504) var db uintptr @@ -63041,15 +63447,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) - 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 { + libc.Xmemset(tls, bp+456, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 456)).FpParse = bp + 32 + (*Walker)(unsafe.Pointer(bp + 456)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 456)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + *(*uintptr)(unsafe.Pointer(bp + 456 + 40)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63077,7 +63483,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+448, pSelect) + Xsqlite3WalkSelect(tls, bp+456, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63110,13 +63516,13 @@ __15: renameTokenFind(tls, bp+32, bp, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable+52) __16: ; - Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+456, (*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+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+456, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63129,7 +63535,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+448, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+456, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63144,7 +63550,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+448, pExpr) + Xsqlite3WalkExpr(tls, bp+456, pExpr) goto __24 __24: i++ @@ -63200,8 +63606,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } - 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) + Xsqlite3WalkExprList(tls, bp+456, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+456, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) @@ -63249,7 +63655,7 @@ __39: renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) + renameWalkTrigger(tls, bp+456, (*Parse)(unsafe.Pointer(bp+32)).FpNewTrigger) __35: ; __8: @@ -63317,8 +63723,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(552) - defer tls.Free(552) + bp := tls.Alloc(560) + defer tls.Free(560) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63360,11 +63766,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+496, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 496)).FpParse = bp + 80 + libc.Xmemset(tls, bp+504, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 504)).FpParse = bp + 80 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+496) + Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+504) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80)).Frc } else { @@ -63457,8 +63863,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(496) - defer tls.Free(496) + bp := tls.Alloc(504) + defer tls.Free(504) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63476,16 +63882,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+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 { + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+456, 0, uint64(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 456)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 456)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 448)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 456)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 448 + 40)) = bp + 416 + *(*uintptr)(unsafe.Pointer(bp + 456 + 40)) = bp + 424 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -63500,31 +63906,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+448, pSelect) + Xsqlite3WalkSelect(tls, bp+456, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+448, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+456, (*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+448, + Xsqlite3WalkExpr(tls, bp+456, 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+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+448, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+456, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+456, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+448, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+456, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+416, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+424, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+416)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+424)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -63542,8 +63948,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(472) - defer tls.Free(472) + bp := tls.Alloc(480) + defer tls.Free(480) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63569,9 +63975,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+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) + libc.Xmemset(tls, bp+424, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+424) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -63599,8 +64005,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(440) - defer tls.Free(440) + bp := tls.Alloc(448) + defer tls.Free(448) var db uintptr var iSchema int32 @@ -63637,7 +64043,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 113724) + rc = Xsqlite3CorruptError(tls, 114441) goto drop_column_done __2: ; @@ -63661,7 +64067,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10863, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10925, 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) @@ -63742,17 +64148,17 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10485, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10547, 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+10870, + Xsqlite3ErrorMsg(tls, pParse, ts+10932, 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 + 10898 + return ts + 10960 } return ts + 6111 }(), @@ -63763,7 +64169,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10910, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10972, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -63780,10 +64186,10 @@ __9: renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1538, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10958, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11020, 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+11079, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11141, 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 @@ -63901,11 +64307,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 + 11097}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11118}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11138}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11157}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11176}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11159}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11180}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11200}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11219}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11238}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -63939,7 +64345,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+11199, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11261, 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) } @@ -63948,10 +64354,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+11222, + ts+11284, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11252, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11314, 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) } @@ -63969,9 +64375,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11270, FzCols: ts + 11283}, - {FzName: ts + 11296, FzCols: ts + 11309}, - {FzName: ts + 11337}, + {FzName: ts + 11332, FzCols: ts + 11345}, + {FzName: ts + 11358, FzCols: ts + 11371}, + {FzName: ts + 11399}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -63990,7 +64396,6 @@ type StatAccum1 = struct { FnPSample TRowcnt FmxSample int32 FiPrn U32 - F__ccgo_pad2 [4]byte FaBest uintptr FiMin int32 FnSample int32 @@ -64069,7 +64474,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FmxSample; i++ { sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48) } - sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32) + sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+40) } Xsqlite3DbFree(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p) } @@ -64115,13 +64520,13 @@ func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { (*StatAccum)(unsafe.Pointer(p)).Fdb = db (*StatAccum)(unsafe.Pointer(p)).FnEst = TRowcnt(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) - (*StatAccum)(unsafe.Pointer(p)).FnRow = TRowcnt(0) + (*StatAccum)(unsafe.Pointer(p)).FnRow = uint64(0) (*StatAccum)(unsafe.Pointer(p)).FnLimit = int32(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) (*StatAccum)(unsafe.Pointer(p)).FnCol = nCol (*StatAccum)(unsafe.Pointer(p)).FnKeyCol = nKeyCol (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead = U8(0) - (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt = p + 1*128 - (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(nColUp)*4 + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt = p + 1*136 + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(nColUp)*8 (*StatAccum)(unsafe.Pointer(p)).FmxSample = func() int32 { if (*StatAccum)(unsafe.Pointer(p)).FnLimit == 0 { @@ -64134,11 +64539,11 @@ func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var i int32 (*StatAccum)(unsafe.Pointer(p)).FiGet = -1 - (*StatAccum)(unsafe.Pointer(p)).FnPSample = (*StatAccum)(unsafe.Pointer(p)).FnEst/TRowcnt(mxSample/3+1) + TRowcnt(1) - (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(nColUp)*4 + (*StatAccum)(unsafe.Pointer(p)).FnPSample = (*StatAccum)(unsafe.Pointer(p)).FnEst/TRowcnt(mxSample/3+1) + uint64(1) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(nColUp)*8 (*StatAccum)(unsafe.Pointer(p)).FiPrn = U32(0x689e962d)*U32(nCol) ^ 0xd0944565*U32(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) - (*StatAccum)(unsafe.Pointer(p)).Fa = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(nColUp)*4 + (*StatAccum)(unsafe.Pointer(p)).Fa = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(nColUp)*8 (*StatAccum)(unsafe.Pointer(p)).FaBest = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample)*48 pSpace = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample+nCol)*48 for i = 0; i < mxSample+nCol; i++ { @@ -64162,17 +64567,17 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11350} + FzName: ts + 11412} func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 for i = (*StatSample)(unsafe.Pointer(pNew)).FiCol + 1; i < nCol; i++ { - if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*4)) > *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*4)) { + if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*8)) > *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*8)) { return 1 } - if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*4)) < *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*4)) { + if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*8)) < *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*8)) { return 0 } } @@ -64183,8 +64588,8 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt } func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { - var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) - var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) + var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*8)) + var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*8)) if nEqNew > nEqOld { return 1 @@ -64227,7 +64632,7 @@ __3: goto __5 } pOld = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48 - if !(*(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) == TRowcnt(0)) { + if !(*(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*8)) == uint64(0)) { goto __6 } if !((*StatSample)(unsafe.Pointer(pOld)).FisPSample != 0) { @@ -64255,7 +64660,7 @@ __5: goto __9 } (*StatSample)(unsafe.Pointer(pUpgrade)).FiCol = (*StatSample)(unsafe.Pointer(pNew)).FiCol - *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pUpgrade)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*4)) + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pUpgrade)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*8)) = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*8)) goto find_new_min __9: ; @@ -64322,7 +64727,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { for i = (*StatAccum)(unsafe.Pointer(p)).FnCol - 2; i >= iChng; i-- { var pBest uintptr = (*StatAccum)(unsafe.Pointer(p)).FaBest + uintptr(i)*48 - *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pBest)).FanEq + uintptr(i)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pBest)).FanEq + uintptr(i)*8)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*8)) if (*StatAccum)(unsafe.Pointer(p)).FnSample < (*StatAccum)(unsafe.Pointer(p)).FmxSample || sampleIsBetter(tls, p, pBest, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr((*StatAccum)(unsafe.Pointer(p)).FiMin)*48) != 0 { sampleInsert(tls, p, pBest, i) } @@ -64338,8 +64743,8 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { for i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1; i >= 0; i-- { var j int32 for j = iChng; j < (*StatAccum)(unsafe.Pointer(p)).FnCol; j++ { - if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*4)) == TRowcnt(0) { - *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(j)*4)) + if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*8)) == uint64(0) { + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*8)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(j)*8)) } } } @@ -64356,9 +64761,9 @@ func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc _ = context - if (*StatAccum)(unsafe.Pointer(p)).FnRow == TRowcnt(0) { + if (*StatAccum)(unsafe.Pointer(p)).FnRow == uint64(0) { for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) = TRowcnt(1) + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*8)) = uint64(1) } } else { if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { @@ -64366,14 +64771,14 @@ func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } for i = 0; i < iChng; i++ { - *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4))++ + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*8))++ } for i = iChng; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4))++ + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*8))++ if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { - *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(i)*4)) += *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(i)*8)) += *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*8)) } - *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) = TRowcnt(1) + *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*8)) = uint64(1) } } @@ -64381,31 +64786,31 @@ func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var nLt TRowcnt if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == SQLITE_INTEGER { - sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) + sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+40, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) } else { - sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))), + sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+40, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))), Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) } - (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiHash = libc.AssignPtrUint32(p+88, (*StatAccum)(unsafe.Pointer(p)).FiPrn*U32(1103515245)+U32(12345)) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiHash = libc.AssignPtrUint32(p+100, (*StatAccum)(unsafe.Pointer(p)).FiPrn*U32(1103515245)+U32(12345)) - nLt = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr((*StatAccum)(unsafe.Pointer(p)).FnCol-1)*4)) + nLt = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr((*StatAccum)(unsafe.Pointer(p)).FnCol-1)*8)) - if nLt/(*StatAccum)(unsafe.Pointer(p)).FnPSample != (nLt+TRowcnt(1))/(*StatAccum)(unsafe.Pointer(p)).FnPSample { + if nLt/(*StatAccum)(unsafe.Pointer(p)).FnPSample != (nLt+uint64(1))/(*StatAccum)(unsafe.Pointer(p)).FnPSample { (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FisPSample = U8(1) (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiCol = 0 - sampleInsert(tls, p, p+32, (*StatAccum)(unsafe.Pointer(p)).FnCol-1) + sampleInsert(tls, p, p+40, (*StatAccum)(unsafe.Pointer(p)).FnCol-1) (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FisPSample = U8(0) } for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol-1; i++ { (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiCol = i - if i >= iChng || sampleIsBetterPost(tls, p, p+32, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48) != 0 { - sampleCopy(tls, p, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48, p+32) + if i >= iChng || sampleIsBetterPost(tls, p, p+40, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48) != 0 { + sampleCopy(tls, p, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48, p+40) } } } else if (*StatAccum)(unsafe.Pointer(p)).FnLimit != 0 && (*StatAccum)(unsafe.Pointer(p)).FnRow > TRowcnt((*StatAccum)(unsafe.Pointer(p)).FnLimit)*TRowcnt(int32((*StatAccum)(unsafe.Pointer(p)).FnSkipAhead)+1) { (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead++ - Xsqlite3_result_int(tls, context, libc.Bool32(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt)) > TRowcnt(0))) + Xsqlite3_result_int(tls, context, libc.Bool32(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt)) > uint64(0))) } } @@ -64413,7 +64818,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11360} + FzName: ts + 11422} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(88) @@ -64427,20 +64832,20 @@ 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+11370, + Xsqlite3_str_appendf(tls, bp+24, ts+11432, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { - return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) + return (*StatAccum)(unsafe.Pointer(p)).FnEst } - return U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + return (*StatAccum)(unsafe.Pointer(p)).FnRow }())) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { - var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) - var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - if iVal == uint64(2) && U64((*StatAccum)(unsafe.Pointer(p)).FnRow*TRowcnt(10)) <= nDistinct*uint64(11) { + var nDistinct U64 = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*8)) + uint64(1) + var iVal U64 = ((*StatAccum)(unsafe.Pointer(p)).FnRow + nDistinct - uint64(1)) / nDistinct + if iVal == uint64(2) && (*StatAccum)(unsafe.Pointer(p)).FnRow*uint64(10) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp+24, ts+11375, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11437, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -64482,7 +64887,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+11381, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+56, ts+11443, libc.VaList(bp+16, *(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*8)))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar-- @@ -64496,7 +64901,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11387} + FzName: ts + 11449} 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) @@ -64540,7 +64945,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+11396, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11458, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -64557,7 +64962,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+11270, uint64(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11332, 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) @@ -64713,7 +65118,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+11406, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11468, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -64770,7 +65175,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+11406, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11468, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -64817,9 +65222,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+11410) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11472) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11414) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11476) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -64905,16 +65310,16 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, z = ts + 1538 } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { - v = TRowcnt(0) + v = uint64(0) for libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z)))) >= '0' && c <= '9' { - v = v*TRowcnt(10) + TRowcnt(c) - TRowcnt('0') + v = v*uint64(10) + TRowcnt(c) - uint64('0') z++ } if aOut != 0 { - *(*TRowcnt)(unsafe.Pointer(aOut + uintptr(i)*4)) = v + *(*TRowcnt)(unsafe.Pointer(aOut + uintptr(i)*8)) = v } if aLog != 0 { - *(*LogEst)(unsafe.Pointer(aLog + uintptr(i)*2)) = Xsqlite3LogEst(tls, uint64(v)) + *(*LogEst)(unsafe.Pointer(aLog + uintptr(i)*2)) = Xsqlite3LogEst(tls, v) } if int32(*(*int8)(unsafe.Pointer(z))) == ' ' { z++ @@ -64924,15 +65329,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11418, z) == 0 { + if Xsqlite3_strglob(tls, ts+11480, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11429, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11491, 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+11439, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11501, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -65012,7 +65417,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { } Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(pIdx)).FaSample) } - if db != 0 && (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { + if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { (*Index)(unsafe.Pointer(pIdx)).FnSample = 0 (*Index)(unsafe.Pointer(pIdx)).FaSample = uintptr(0) } @@ -65026,42 +65431,42 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { var nCol int32 = 1 if (*Index)(unsafe.Pointer(pIdx)).FnSampleCol > 1 { nCol = (*Index)(unsafe.Pointer(pIdx)).FnSampleCol - 1 - *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nCol)*4)) = TRowcnt(1) + *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nCol)*8)) = uint64(1) } for iCol = 0; iCol < nCol; iCol++ { var nSample int32 = (*Index)(unsafe.Pointer(pIdx)).FnSample var i int32 - var sumEq TRowcnt = TRowcnt(0) - var avgEq TRowcnt = TRowcnt(0) + var sumEq TRowcnt = uint64(0) + var avgEq TRowcnt = uint64(0) var nRow TRowcnt var nSum100 I64 = int64(0) var nDist100 I64 - if !(int32((*Index)(unsafe.Pointer(pIdx)).FaiRowEst) != 0) || iCol >= int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) || *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*4)) == TRowcnt(0) { - nRow = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanLt + uintptr(iCol)*4)) - nDist100 = int64(100) * I64(*(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanDLt + uintptr(iCol)*4))) + if !(int32((*Index)(unsafe.Pointer(pIdx)).FaiRowEst) != 0) || iCol >= int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) || *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*8)) == uint64(0) { + nRow = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanLt + uintptr(iCol)*8)) + nDist100 = I64(TRowcnt(int64(100)) * *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanDLt + uintptr(iCol)*8))) nSample-- } else { nRow = *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst)) - nDist100 = int64(100) * I64(*(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst))) / I64(*(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*4))) + nDist100 = I64(TRowcnt(int64(100)) * *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst)) / *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*8))) } (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 = nRow for i = 0; i < nSample; i++ { if i == (*Index)(unsafe.Pointer(pIdx)).FnSample-1 || - *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanDLt + uintptr(iCol)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i+1)*40)).FanDLt + uintptr(iCol)*4)) { - sumEq = sumEq + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*4)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanDLt + uintptr(iCol)*8)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i+1)*40)).FanDLt + uintptr(iCol)*8)) { + sumEq = sumEq + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*8)) nSum100 = nSum100 + int64(100) } } if nDist100 > nSum100 && sumEq < nRow { - avgEq = TRowcnt(int64(100) * I64(nRow-sumEq) / (nDist100 - nSum100)) + avgEq = TRowcnt(int64(100)) * (nRow - sumEq) / TRowcnt(nDist100-nSum100) } - if avgEq == TRowcnt(0) { - avgEq = TRowcnt(1) + if avgEq == uint64(0) { + avgEq = uint64(1) } - *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(iCol)*4)) = avgEq + *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(iCol)*8)) = avgEq } } } @@ -65135,15 +65540,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui } pSpace = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(nSample)*40 (*Index)(unsafe.Pointer(pIdx)).FaAvgEq = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) *(*U32)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable + 48)) |= U32(TF_HasStat4) for i = 0; i < nSample; i++ { (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanEq = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanLt = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanDLt = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) } } @@ -65208,11 +65613,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+11296, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11358, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11451, - ts+11505, + ts+11513, + ts+11567, zDb) } return rc @@ -65259,10 +65664,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+11270, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11332, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11557, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11619, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65320,12 +65725,12 @@ 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+6365, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6425, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(72) + defer tls.Free(72) var i int32 var rc int32 @@ -65336,13 +65741,16 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { var aNew uintptr var pNew uintptr + var pNewSchema uintptr + var pPager uintptr var iDb int32 rc = 0 db = Xsqlite3_context_db_handle(tls, context) - *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 48)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) + pNew = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) _ = NotUsed zFile = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -65363,128 +65771,151 @@ __2: goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3819) - if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { + *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3_vfs_find(tls, ts+3819) + if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __5 } return __5: ; + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), ts+11660, db, bp+24, 0, SQLITE_OPEN_MAIN_DB) + if !(rc == SQLITE_OK) { + goto __6 + } + pNewSchema = Xsqlite3SchemaGet(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) + if !(pNewSchema != 0) { + goto __7 + } + pNew = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*32 if !((*Db)(unsafe.Pointer(pNew)).FpBt != 0) { - goto __6 + goto __9 } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) +__9: + ; + (*Db)(unsafe.Pointer(pNew)).FpBt = *(*uintptr)(unsafe.Pointer(bp + 24)) + (*Db)(unsafe.Pointer(pNew)).FpSchema = pNewSchema + goto __8 +__7: + Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) + rc = SQLITE_NOMEM +__8: + ; __6: ; - (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) - (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11598, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) + if !(rc != 0) { + goto __10 + } + goto attach_error +__10: + ; goto __4 __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { - goto __7 + goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11601, + *(*uintptr)(unsafe.Pointer(bp + 64)) = Xsqlite3MPrintf(tls, db, ts+11663, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error -__7: +__11: ; i = 0 -__8: +__12: if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { - goto __10 + goto __14 } if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { - goto __11 + goto __15 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11638, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 64)) = Xsqlite3MPrintf(tls, db, ts+11700, libc.VaList(bp+8, zName)) goto attach_error -__11: +__15: ; - goto __9 -__9: + goto __13 +__13: i++ - goto __8 - goto __10 -__10: + goto __12 + goto __14 +__14: ; if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+696) { - goto __12 + goto __16 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) if !(aNew == uintptr(0)) { - goto __14 + goto __18 } return -__14: +__18: ; libc.Xmemcpy(tls, aNew, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(unsafe.Sizeof(Db{}))*uint64(2)) - goto __13 -__12: + goto __17 +__16: aNew = Xsqlite3DbRealloc(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(unsafe.Sizeof(Db{}))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnDb+1)) if !(aNew == uintptr(0)) { - goto __15 + goto __19 } return -__15: +__19: ; -__13: +__17: ; (*Sqlite3)(unsafe.Pointer(db)).FaDb = aNew pNew = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Sqlite3)(unsafe.Pointer(db)).FnDb)*32 libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Db{}))) - *(*uint32)(unsafe.Pointer(bp + 24)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags - rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+24, bp+32, bp+40, bp+48) + *(*uint32)(unsafe.Pointer(bp + 32)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags + rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+32, bp+40, bp+48, bp+56) if !(rc != SQLITE_OK) { - goto __16 + goto __20 } if !(rc == SQLITE_NOMEM) { - goto __17 + goto __21 } Xsqlite3OomFault(tls, db) -__17: +__21: ; - Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 48)), -1) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 56)), -1) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) return -__16: +__20: ; - *(*uint32)(unsafe.Pointer(bp + 24)) |= uint32(SQLITE_OPEN_MAIN_DB) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), *(*uintptr)(unsafe.Pointer(bp + 40)), db, pNew+8, 0, int32(*(*uint32)(unsafe.Pointer(bp + 24)))) + *(*uint32)(unsafe.Pointer(bp + 32)) |= uint32(SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 40)), *(*uintptr)(unsafe.Pointer(bp + 48)), db, pNew+8, 0, int32(*(*uint32)(unsafe.Pointer(bp + 32)))) (*Sqlite3)(unsafe.Pointer(db)).FnDb++ (*Db)(unsafe.Pointer(pNew)).FzDbSName = Xsqlite3DbStrDup(tls, db, zName) __4: ; (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(0) if !(rc == SQLITE_CONSTRAINT) { - goto __18 + goto __22 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11668, 0) - goto __19 -__18: + *(*uintptr)(unsafe.Pointer(bp + 64)) = Xsqlite3MPrintf(tls, db, ts+11730, 0) + goto __23 +__22: if !(rc == SQLITE_OK) { - goto __20 + goto __24 } (*Db)(unsafe.Pointer(pNew)).FpSchema = Xsqlite3SchemaGet(tls, db, (*Db)(unsafe.Pointer(pNew)).FpBt) if !!(int32((*Db)(unsafe.Pointer(pNew)).FpSchema) != 0) { - goto __21 + goto __25 } rc = SQLITE_NOMEM - goto __22 -__21: + goto __26 +__25: if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Ffile_format != 0 && int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Fenc) != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { - goto __23 + goto __27 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, - ts+11697, 0) + *(*uintptr)(unsafe.Pointer(bp + 64)) = Xsqlite3MPrintf(tls, db, + ts+11759, 0) rc = SQLITE_ERROR -__23: +__27: ; -__22: +__26: ; Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) @@ -65494,89 +65925,89 @@ __22: Xsqlite3BtreeSetPagerFlags(tls, (*Db)(unsafe.Pointer(pNew)).FpBt, uint32(uint64(PAGER_SYNCHRONOUS_FULL)|(*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK))) Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) -__20: +__24: ; -__19: +__23: ; (*Db)(unsafe.Pointer(pNew)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) if !(rc == SQLITE_OK && (*Db)(unsafe.Pointer(pNew)).FzDbSName == uintptr(0)) { - goto __24 + goto __28 } rc = SQLITE_NOMEM -__24: +__28: ; - Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) + Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) if !(rc == SQLITE_OK) { - goto __25 + goto __29 } Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) if !!(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2) != 0) { - goto __26 + goto __30 } - rc = Xsqlite3Init(tls, db, bp+56) -__26: + rc = Xsqlite3Init(tls, db, bp+64) +__30: ; Xsqlite3BtreeLeaveAll(tls, db) -__25: +__29: ; if !(rc != 0) { - goto __27 + goto __31 } if !!(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2) != 0) { - goto __28 + goto __32 } iDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt != 0) { - goto __29 + goto __33 } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt = uintptr(0) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema = uintptr(0) -__29: +__33: ; Xsqlite3ResetAllSchemasOfConnection(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FnDb = iDb if !(rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8) { - goto __30 + goto __34 } Xsqlite3OomFault(tls, db) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+1474, 0) - goto __31 -__30: - if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { - goto __32 + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 64))) + *(*uintptr)(unsafe.Pointer(bp + 64)) = Xsqlite3MPrintf(tls, db, ts+1474, 0) + goto __35 +__34: + if !(*(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0)) { + goto __36 } - *(*uintptr)(unsafe.Pointer(bp + 56)) = Xsqlite3MPrintf(tls, db, ts+11765, libc.VaList(bp+16, zFile)) -__32: + *(*uintptr)(unsafe.Pointer(bp + 64)) = Xsqlite3MPrintf(tls, db, ts+11827, libc.VaList(bp+16, zFile)) +__36: ; -__31: +__35: ; -__28: +__32: ; goto attach_error -__27: +__31: ; return attach_error: - if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { - goto __33 + if !(*(*uintptr)(unsafe.Pointer(bp + 64)) != 0) { + goto __37 } - Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 56)), -1) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56))) -__33: + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 64)), -1) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 64))) +__37: ; if !(rc != 0) { - goto __34 + goto __38 } Xsqlite3_result_error_code(tls, context, rc) -__34: +__38: } func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { @@ -65630,14 +66061,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11793, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11855, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11814, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11876, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -65645,7 +66076,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11840, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11902, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -65687,42 +66118,48 @@ func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuth var zAuthArg uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { goto __1 } goto attach_end __1: ; + if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { + goto __2 + } + goto attach_end +__2: + ; libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp)).FpParse = pParse if !(SQLITE_OK != resolveAttachExpr(tls, bp, pFilename) || SQLITE_OK != resolveAttachExpr(tls, bp, pDbname) || SQLITE_OK != resolveAttachExpr(tls, bp, pKey)) { - goto __2 + goto __3 } goto attach_end -__2: +__3: ; if !(pAuthArg != 0) { - goto __3 + goto __4 } if !(int32((*Expr)(unsafe.Pointer(pAuthArg)).Fop) == TK_STRING) { - goto __4 + goto __5 } zAuthArg = *(*uintptr)(unsafe.Pointer(pAuthArg + 8)) - goto __5 -__4: - zAuthArg = uintptr(0) + goto __6 __5: + zAuthArg = uintptr(0) +__6: ; rc = Xsqlite3AuthCheck(tls, pParse, type1, zAuthArg, uintptr(0), uintptr(0)) if !(rc != SQLITE_OK) { - goto __6 + goto __7 } goto attach_end -__6: +__7: ; -__3: +__4: ; v = Xsqlite3GetVdbe(tls, pParse) regArgs = Xsqlite3GetTempRange(tls, pParse, 4) @@ -65731,13 +66168,13 @@ __3: Xsqlite3ExprCode(tls, pParse, pKey, regArgs+2) if !(v != 0) { - goto __7 + goto __8 } Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regArgs+3-int32((*FuncDef)(unsafe.Pointer(pFunc)).FnArg), regArgs+3, int32((*FuncDef)(unsafe.Pointer(pFunc)).FnArg), pFunc, 0) Xsqlite3VdbeAddOp1(tls, v, OP_Expire, libc.Bool32(type1 == SQLITE_ATTACH)) -__7: +__8: ; attach_end: Xsqlite3ExprDelete(tls, db, pFilename) @@ -65756,7 +66193,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11862} + FzName: ts + 11924} // Called by the parser to compile an ATTACH statement. // @@ -65769,7 +66206,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11876} + FzName: ts + 11938} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -65783,7 +66220,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+11890, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11952, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -65815,7 +66252,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+11914, + ts+11976, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -65990,7 +66427,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+11960, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12022, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66016,11 +66453,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+11983, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+12045, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11989, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12051, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11995, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12057, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66067,7 +66504,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 + 7637 + zCol = ts + 7697 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66091,7 +66528,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+12022, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12084, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66316,6 +66753,9 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } + if (*Parse)(unsafe.Pointer(pParse)).FeParseMode != 0 { + return + } ap = va zSql = Xsqlite3VMPrintf(tls, db, zFormat, ap) @@ -66328,13 +66768,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)+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)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+288)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+288)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+288)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+288)) *(*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)+280)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+288)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+288)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66359,25 +66799,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6365) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6425) == 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+8056, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+6365, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12037+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5877+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6392+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6411+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5867+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12070) + ts+6373) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6411+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, - ts+5877) + ts+5867) } } } @@ -66398,12 +66838,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8056, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12056+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5877) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12037+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+6365, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6411+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5867) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6392+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, - ts+12070) + ts+6373) } } } @@ -66434,7 +66874,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { if int32((*Parse)(unsafe.Pointer(pParse)).FprepFlags)&SQLITE_PREPARE_NO_VTAB == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+576, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12089, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12099, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -66452,14 +66892,14 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12097 + zMsg = ts + 12107 } else { - zMsg = ts + 12110 + zMsg = ts + 12120 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6569, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6629, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6579, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6639, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -66489,12 +66929,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+8056, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5877+7) == 0 { - return ts + 12056 + if Xsqlite3_strnicmp(tls, zName, ts+6365, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5867+7) == 0 { + return ts + 6411 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12070+7) == 0 { - return ts + 12037 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6373+7) == 0 { + return ts + 6392 } } return zName @@ -66852,7 +67292,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+5877) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5867) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -66878,7 +67318,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6365, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6425, zName) { goto __3 } @@ -66931,13 +67371,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+12124, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12134, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12141, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12151, libc.VaList(bp, pName1)) return -1 } } else { @@ -66979,9 +67419,9 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8056, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+6365, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12161, + Xsqlite3ErrorMsg(tls, pParse, ts+12171, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67141,9 +67581,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 + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67159,7 +67599,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12203, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12213, 0) return __4: ; @@ -67187,9 +67627,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10413 + return ts + 10475 } - return ts + 8798 + return ts + 8860 }(), zName) != 0) { goto __8 } @@ -67205,9 +67645,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 + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67238,12 +67678,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12244, + Xsqlite3ErrorMsg(tls, pParse, ts+12254, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10413 + return ts + 10475 } - return ts + 8798 + return ts + 8860 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67258,7 +67698,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12265, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12275, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67345,7 +67785,7 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 - Xsqlite3HashInsert(tls, pHash, ts+12300, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12310, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67369,7 +67809,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+12317, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12327, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67389,7 +67829,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 + 12300 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12310 (*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) @@ -67401,7 +67841,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+12300, pRet+16) == + if Xsqlite3HashInsert(tls, pHash, ts+12310, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } @@ -67435,7 +67875,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+12351, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12361, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -67443,13 +67883,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+12374, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+12384, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12381, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+12391, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32)).Fn-- @@ -67486,7 +67926,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+12391, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12401, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -67650,10 +68090,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+12417, + Xsqlite3ErrorMsg(tls, pParse, ts+12427, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12462, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12472, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) @@ -67684,7 +68124,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+12503, 0) + ts+12513, 0) } } @@ -67729,7 +68169,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12555, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12565, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -67818,7 +68258,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12596, 0) + ts+12606, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -67913,7 +68353,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12652, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12662, 0) goto generated_done __2: ; @@ -67926,13 +68366,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12695, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12705, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12703, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12713, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -67960,12 +68400,19 @@ __9: makeColumnPartOfPrimaryKey(tls, pParse, pCol) __10: ; + if !(pExpr != 0 && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_ID) { + goto __11 + } + + pExpr = Xsqlite3PExpr(tls, pParse, TK_UPLUS, pExpr, uintptr(0)) +__11: + ; Xsqlite3ColumnSetExpr(tls, pParse, pTab, pCol, pExpr) pExpr = uintptr(0) goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12710, + Xsqlite3ErrorMsg(tls, pParse, ts+12720, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68087,12 +68534,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1538 - zSep2 = ts + 12741 + zSep2 = ts + 12751 zEnd = ts + 4941 } else { - zSep = ts + 12743 - zSep2 = ts + 12747 - zEnd = ts + 12752 + zSep = ts + 12753 + zSep2 = ts + 12757 + zEnd = ts + 12762 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68100,7 +68547,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12755, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12765, 0) *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8)), 1)))) = int8('(') @@ -68138,11 +68585,12 @@ __6: return zStmt } -var azType1 = [5]uintptr{ +var azType1 = [6]uintptr{ ts + 1538, - ts + 12769, - ts + 12775, - ts + 12780, + ts + 12779, + ts + 12785, + ts + 12790, + ts + 12795, ts + 12785, } @@ -68550,10 +68998,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12791, + ts+12801, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1538))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12824, + Xsqlite3ErrorMsg(tls, pParse, ts+12834, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -68572,11 +69020,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+12851, 0) + ts+12861, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12901, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12911, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -68610,7 +69058,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12933, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12943, 0) return } } @@ -68635,11 +69083,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 + 8798 - zType2 = ts + 12977 + zType = ts + 8860 + zType2 = ts + 12987 } else { - zType = ts + 10413 - zType2 = ts + 12983 + zType = ts + 10475 + zType2 = ts + 12993 } if pSelect != 0 { @@ -68701,7 +69149,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 280 + pEnd2 = pParse + 288 } else { pEnd2 = pEnd } @@ -68710,11 +69158,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+12988, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12998, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13003, + ts+13013, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -68730,13 +69178,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+13101, + ts+13111, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13143, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13153, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -68751,7 +69199,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+9320) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9382) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -68781,7 +69229,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+13177, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13187, 0) goto create_view_fail __1: ; @@ -68797,7 +69245,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10413, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+10475, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } @@ -68879,7 +69327,7 @@ func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { } if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13213, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13223, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -68907,8 +69355,7 @@ func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { pTable+54, pTable+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Table)(unsafe.Pointer(pTable)).FnCol) == (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr { - Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTable, pSel, - int8(SQLITE_AFF_NONE)) + Xsqlite3SubqueryColumnTypes(tls, pParse, pTable, pSel, int8(SQLITE_AFF_NONE)) } } else { (*Table)(unsafe.Pointer(pTable)).FnCol = (*Table)(unsafe.Pointer(pSelTab)).FnCol @@ -69005,13 +69452,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+13243, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13253, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13258, + ts+13268, 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) } @@ -69052,10 +69499,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13325, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13335, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11222, + ts+11284, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69087,12 +69534,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+13339, + ts+13349, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13384, + ts+13394, 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) @@ -69120,11 +69567,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+8056, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6365, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3270, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7057, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7117, 10) == 0 { return 0 } return 1 @@ -69202,9 +69649,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) @@ -69263,21 +69710,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13451, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13461, 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+13479, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13489, 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+13513, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13523, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69289,7 +69736,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11414, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11476, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69353,7 +69800,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13545, + ts+13555, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: @@ -69365,7 +69812,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13608, 0) + ts+13618, 0) goto fk_end goto __7 __6: @@ -69450,7 +69897,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13702, + ts+13712, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: @@ -69677,12 +70124,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13748, + Xsqlite3ErrorMsg(tls, pParse, ts+13758, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13776 + return ts + 13786 } - return ts + 13782 + return ts + 13792 }())) return 1 } @@ -69803,7 +70250,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13787, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+13797, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } @@ -69822,7 +70269,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13793, + ts+13803, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -69848,26 +70295,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6365, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13843, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13853, 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+13871, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13881, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13896, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13906, 0) goto exit_create_index __17: ; @@ -69881,7 +70328,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13787, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13797, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -69896,7 +70343,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13930, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13940, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -69908,7 +70355,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13964, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13974, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -69937,7 +70384,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13988, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13998, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -69958,9 +70405,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -69999,7 +70446,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13787) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13797) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70100,7 +70547,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14011, 0) + ts+14021, 0) goto exit_create_index __56: ; @@ -70317,7 +70764,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14072, libc.VaList(bp+48, 0)) + ts+14082, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70369,8 +70816,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14114, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) + Xsqlite3ErrorMsg(tls, pParse, ts+14124, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121835) goto exit_create_index __101: ; @@ -70416,12 +70863,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14131, + zStmt = Xsqlite3MPrintf(tls, db, ts+14141, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1538 } - return ts + 14151 + return ts + 14161 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70429,7 +70876,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14159, + ts+14169, 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, @@ -70443,7 +70890,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14218, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14228, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -70604,7 +71051,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14245, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14255, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -70619,7 +71066,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14263, libc.VaList(bp+8, 0)) + ts+14273, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -70630,9 +71077,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 + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -70658,9 +71105,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14336, + ts+14346, 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+11410, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11472, (*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) @@ -70795,7 +71242,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+14396, + Xsqlite3ErrorMsg(tls, pParse, ts+14406, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71003,12 +71450,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+14432, + Xsqlite3ErrorMsg(tls, pParse, ts+14442, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14468 + return ts + 14478 } - return ts + 14471 + return ts + 14481 }())) goto append_from_error __1: @@ -71177,7 +71624,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14477, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14487, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71213,9 +71660,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14483 + return ts + 14493 } - return ts + 14492 + return ts + 14502 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71240,7 +71687,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14477, ts + 14499, ts + 14483} +var az = [3]uintptr{ts + 14487, ts + 14509, ts + 14493} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71255,7 +71702,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+14507, 0) + ts+14517, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71392,14 +71839,14 @@ 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+14577, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3_str_appendf(tls, bp+8, ts+14587, 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+14588, 2) + Xsqlite3_str_append(tls, bp+8, ts+14598, 2) } Xsqlite3_str_appendall(tls, bp+8, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3_str_append(tls, bp+8, ts+1551, 1) @@ -71425,11 +71872,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+11983, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12045, 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+14591, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14601, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -71559,7 +72006,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14600, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14610, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -71655,7 +72102,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+14646, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14656, libc.VaList(bp, zName)) } } } @@ -71848,7 +72295,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14676, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14686, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72128,7 +72575,7 @@ func vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+14707, + Xsqlite3ErrorMsg(tls, pParse, ts+14717, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) } return 0 @@ -72160,11 +72607,11 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14740, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14750, 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+14769, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14779, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -72668,7 +73115,7 @@ __61: if !(memCnt != 0) { goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14807) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14817) __62: ; delete_from_cleanup: @@ -72783,7 +73230,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+11270) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11332) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73013,7 +73460,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 + 6175, ts + 6170, ts + 7929, ts + 7924, ts + 6165} +var azType2 = [5]uintptr{ts + 6175, ts + 6170, ts + 7989, ts + 7984, ts + 6165} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73072,7 +73519,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+14820, -1) + Xsqlite3_result_error(tls, context, ts+14830, -1) return } iVal = -iVal @@ -73376,7 +73823,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14837, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14847, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -73722,7 +74169,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+14842, -1) + Xsqlite3_result_error(tls, context, ts+14852, -1) return } if argc == 3 { @@ -73732,7 +74179,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+14875, -1) + ts+14885, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -73831,7 +74278,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { 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+14920, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14930, libc.VaList(bp+8, r1)) } } break @@ -73846,21 +74293,21 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_BLOB: { var zBlob uintptr = Xsqlite3_value_blob(tls, pValue) - var nBlob int32 = Xsqlite3_value_bytes(tls, pValue) + var nBlob I64 = I64(Xsqlite3_value_bytes(tls, pValue)) - Xsqlite3StrAccumEnlarge(tls, pStr, nBlob*2+4) + Xsqlite3StrAccumEnlarge(tls, pStr, nBlob*int64(2)+int64(4)) if int32((*StrAccum)(unsafe.Pointer(pStr)).FaccError) == 0 { var zText uintptr = (*StrAccum)(unsafe.Pointer(pStr)).FzText var i int32 - for i = 0; i < nBlob; i++ { + for i = 0; I64(i) < nBlob; i++ { *(*int8)(unsafe.Pointer(zText + uintptr(i*2+2))) = hexdigits[int32(*(*int8)(unsafe.Pointer(zBlob + uintptr(i))))>>4&0x0F] *(*int8)(unsafe.Pointer(zText + uintptr(i*2+3))) = hexdigits[int32(*(*int8)(unsafe.Pointer(zBlob + uintptr(i))))&0x0F] } - *(*int8)(unsafe.Pointer(zText + uintptr(nBlob*2+2))) = int8('\'') - *(*int8)(unsafe.Pointer(zText + uintptr(nBlob*2+3))) = int8(0) + *(*int8)(unsafe.Pointer(zText + uintptr(nBlob*int64(2)+int64(2)))) = int8('\'') + *(*int8)(unsafe.Pointer(zText + uintptr(nBlob*int64(2)+int64(3)))) = int8(0) *(*int8)(unsafe.Pointer(zText)) = int8('X') *(*int8)(unsafe.Pointer(zText + 1)) = int8('\'') - (*StrAccum)(unsafe.Pointer(pStr)).FnChar = U32(nBlob*2 + 3) + (*StrAccum)(unsafe.Pointer(pStr)).FnChar = U32(nBlob*int64(2) + int64(3)) } break @@ -73868,7 +74315,7 @@ func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, ts+14927, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14937, libc.VaList(bp+24, zArg)) break } @@ -73982,6 +74429,119 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } +func strContainsChar(tls *libc.TLS, zStr uintptr, nStr int32, ch U32) int32 { + bp := tls.Alloc(8) + defer tls.Free(8) + + var zEnd uintptr = zStr + uintptr(nStr) + *(*uintptr)(unsafe.Pointer(bp)) = zStr + for *(*uintptr)(unsafe.Pointer(bp)) < zEnd { + var tst U32 = func() uint32 { + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) < 0x80 { + return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1)))) + } + return Xsqlite3Utf8Read(tls, bp) + }() + if tst == ch { + return 1 + } + } + return 0 +} + +func unhexFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { + bp := tls.Alloc(8) + defer tls.Free(8) + + var zPass uintptr + var nPass int32 + + var nHex int32 + var pBlob uintptr + var p uintptr + var ch U32 + var c U8 + var d U8 + zPass = ts + 1538 + nPass = 0 + *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + nHex = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + pBlob = uintptr(0) + p = uintptr(0) + + if !(argc == 2) { + goto __1 + } + zPass = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + nPass = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) +__1: + ; + if !(!(*(*uintptr)(unsafe.Pointer(bp)) != 0) || !(zPass != 0)) { + goto __2 + } + return +__2: + ; + p = libc.AssignUintptr(&pBlob, contextMalloc(tls, pCtx, int64(nHex/2+1))) + if !(pBlob != 0) { + goto __3 + } + +__4: + if !(int32(libc.AssignUint8(&c, *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))) != 0x00) { + goto __5 + } +__6: + if !!(int32(Xsqlite3CtypeMap[c])&0x08 != 0) { + goto __7 + } + ch = func() uint32 { + if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) < 0x80 { + return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1)))) + } + return Xsqlite3Utf8Read(tls, bp) + }() + + if !!(strContainsChar(tls, zPass, nPass, ch) != 0) { + goto __8 + } + goto unhex_null +__8: + ; + c = *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) + if !(int32(c) == 0x00) { + goto __9 + } + goto unhex_done +__9: + ; + goto __6 +__7: + ; + *(*uintptr)(unsafe.Pointer(bp))++ + + d = *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1))) + if !!(int32(Xsqlite3CtypeMap[d])&0x08 != 0) { + goto __10 + } + goto unhex_null +__10: + ; + *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = U8(int32(Xsqlite3HexToInt(tls, int32(c)))<<4 | int32(Xsqlite3HexToInt(tls, int32(d)))) + goto __4 +__5: + ; +__3: + ; +unhex_done: + Xsqlite3_result_blob(tls, pCtx, pBlob, int32((int64(p)-int64(pBlob))/1), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) + return + +unhex_null: + Xsqlite3_free(tls, pBlob) + return +} + func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var n I64 var rc int32 @@ -74184,7 +74744,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10842} +var azOne = [1]uintptr{ts + 10904} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74220,7 +74780,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14930, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14940, 4, uintptr(0)) } } @@ -74245,7 +74805,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+12022, -1) + Xsqlite3_result_error(tls, context, ts+12084, -1) return } @@ -74323,7 +74883,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+14820, -1) + Xsqlite3_result_error(tls, context, ts+14830, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -74585,7 +75145,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+14935, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14945, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -74605,14 +75165,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14941, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14951, 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+14941, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14951, 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+14941, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14941, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14951, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14951, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -74742,17 +75302,17 @@ func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } ans = libc.Xlog(tls, x) / b } else { - ans = libc.Xlog(tls, x) switch int32(Xsqlite3_user_data(tls, context)) { case 1: - ans = ans / 2.30258509299404568402 + ans = libc.Xlog10(tls, x) break fallthrough case 2: - ans = ans / 0.69314718055994530942 + ans = libc.Xlog2(tls, x) break fallthrough default: + ans = libc.Xlog(tls, x) break } } @@ -74811,6 +75371,7 @@ func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { + _ = argv Xsqlite3_result_double(tls, context, 3.14159265358979323846) } @@ -74851,108 +75412,110 @@ 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 + 14946}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 14966}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 14979}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 14997}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15006}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15014}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15014}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15029}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15055}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15080}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 15100}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_sqlite_offset)), FxSFunc: 0, FzName: ts + 15107}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15121}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15121}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15127}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 15133}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15138}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15138}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15138}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15142}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15142}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15142}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15146}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15153}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15161}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15168}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15174}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15181}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15188}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15196}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15201}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, +var aBuiltinFunc = [103]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 + 14956}, + {FnArg: 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 + 14976}, + {FnArg: 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 + 14989}, + {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 + 15007}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15016}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15024}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15024}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15039}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15065}, + {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 + 15090}, + {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 + 15099}, + {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 + 15110}, + {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 + 15117}, + {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 + 15131}, + {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 + 15131}, + {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 + 15137}, + {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 + 15137}, + {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 + 15143}, + {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 + 15143}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15148}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15148}, + {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 + 15148}, + {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 + 15152}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 15152}, + {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 + 15152}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15156}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15163}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15171}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15178}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15184}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15191}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15198}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15206}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15211}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15217}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15223}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15227}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15234}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15241}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15252}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15259}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15274}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15291}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15302}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15308}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15326}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15334}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15348}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15356}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15372}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15382}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15386}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15392}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15396}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15396}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15215}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15215}, + {FnArg: int8(1), 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 + 15237}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15237}, + {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(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15402}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15415}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14941}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14941}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6510}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15420}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15425}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15433}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15439}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15445}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15448}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 15452}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 15458}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15448}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15463}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15467}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15471}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15477}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15481}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15491}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15496}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_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 + 14951}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14951}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6570}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6570}, + {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 | 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(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 + 15506}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15510}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15514}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15524}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15529}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 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 + 15541}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15547}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15552}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15560}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15568}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15571}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6510}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 15576}} + {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 + 6570}, + {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. @@ -75073,7 +75636,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+15580, + 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) @@ -75733,8 +76296,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 + 6376, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6372, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 48)) = Token{Fz: ts + 6436, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 64)) = Token{Fz: ts + 6432, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76234,7 +76797,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7894, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7954, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -76702,7 +77265,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15625, + ts+15641, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: @@ -76727,7 +77290,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15666, + 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 @@ -76876,7 +77439,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15698, + ts+15714, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -76886,7 +77449,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15750, 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: ; @@ -76938,7 +77501,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15775, + Xsqlite3ErrorMsg(tls, pParse, ts+15791, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -76946,7 +77509,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15821, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15837, 0) goto insert_cleanup __57: ; @@ -77358,7 +77921,7 @@ __124: if !(regRowCount != 0) { goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15842) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15858) __125: ; insert_cleanup: @@ -77674,8 +78237,9 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11983, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12045, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) Xsqlite3VdbeAppendP4(tls, v, zMsg, -6) @@ -78764,7 +79328,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 131055) + return Xsqlite3MisuseError(tls, 131895) __1: ; if !(zSql == uintptr(0)) { @@ -79210,6 +79774,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Fserialize: 0, Fdb_name: 0, Fvalue_encoding: 0, + Fis_interrupted: 0, } func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79248,7 +79813,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12022, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12084, 0) __3: ; return SQLITE_ERROR @@ -79257,7 +79822,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15856 + zEntry = ts + 15872 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79272,7 +79837,7 @@ __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11983, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+12045, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79308,7 +79873,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15879, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15895, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79322,7 +79887,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15888, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15904, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79346,7 +79911,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15892, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15908, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79364,7 +79929,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15898, 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: ; @@ -79391,7 +79956,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15941, 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))) @@ -79429,7 +79994,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15973, 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: ; @@ -79439,7 +80004,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 16010, + ts + 16026, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -79595,7 +80160,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+16013, 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))) @@ -79604,62 +80169,62 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { var pragCName = [57]uintptr{ ts + 5041, - ts + 16052, - ts + 8798, - ts + 16056, - ts + 16061, - ts + 16064, - ts + 16074, - ts + 16084, - ts + 16090, - ts + 16094, - ts + 16099, - ts + 16104, - ts + 16112, - ts + 16123, - ts + 16126, - ts + 16133, - ts + 16094, - ts + 16099, - ts + 16140, - ts + 16145, - ts + 16148, - ts + 16155, + ts + 16068, + ts + 8860, + ts + 16072, + ts + 16077, + ts + 16080, ts + 16090, - ts + 16094, + 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 + 16166, + ts + 16164, ts + 16171, - ts + 16094, - ts + 16175, - ts + 16099, - ts + 16183, + ts + 16106, + ts + 16110, + ts + 16177, + ts + 16182, ts + 16187, - ts + 16192, - ts + 11414, - ts + 11410, - ts + 16198, + ts + 16110, + ts + 16191, + ts + 16115, + ts + 16199, ts + 16203, ts + 16208, - ts + 16052, - ts + 16094, - ts + 16213, - ts + 16220, - ts + 16227, - ts + 8798, - ts + 16235, - ts + 5044, - ts + 16241, - ts + 16052, - ts + 16094, - ts + 16246, + ts + 11476, + ts + 11472, + ts + 16214, + ts + 16219, + ts + 16224, + ts + 16068, + ts + 16110, + ts + 16229, + ts + 16236, + ts + 16243, + ts + 8860, ts + 16251, - ts + 15448, - ts + 16256, - ts + 16269, - ts + 16278, + ts + 5044, + ts + 16257, + ts + 16068, + ts + 16110, + ts + 16262, + ts + 16267, + ts + 15464, + ts + 16272, ts + 16285, - ts + 16296, + ts + 16294, + ts + 16301, + ts + 16312, } // Definitions of all built-in pragmas @@ -79677,238 +80242,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16304, + {FzName: ts + 16320, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16319, + {FzName: ts + 16335, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16334, + {FzName: ts + 16350, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16346, + {FzName: ts + 16362, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16362, + {FzName: ts + 16378, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16285, + {FzName: ts + 16301, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16375, + {FzName: ts + 16391, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16387, + {FzName: ts + 16403, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16407, + {FzName: ts + 16423, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16423, + {FzName: ts + 16439, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16444, + {FzName: ts + 16460, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16459, + {FzName: ts + 16475, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16475, + {FzName: ts + 16491, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16489, + {FzName: ts + 16505, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16502, + {FzName: ts + 16518, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16516, + {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 + 16535, + {FzName: ts + 16551, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16554, + {FzName: ts + 16570, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16577, + {FzName: ts + 16593, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16586, + {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 + 16604, + {FzName: ts + 16620, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16621, + {FzName: ts + 16637, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16634, + {FzName: ts + 16650, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16649, + {FzName: ts + 16665, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16667, + {FzName: ts + 16683, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16677, + {FzName: ts + 16693, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16691, + {FzName: ts + 16707, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16707, + {FzName: ts + 16723, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16732, + {FzName: ts + 16748, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16751, + {FzName: ts + 16767, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16762, + {FzName: ts + 16778, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16773, + {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 + 16785, + {FzName: ts + 16801, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16801, + {FzName: ts + 16817, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16814, + {FzName: ts + 16830, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16833, + {FzName: ts + 16849, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16852, + {FzName: ts + 16868, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16865, + {FzName: ts + 16881, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16880, + {FzName: ts + 16896, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16890, + {FzName: ts + 16906, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16902, + {FzName: ts + 16918, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16911, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16922, + {FzName: ts + 16938, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16932, + {FzName: ts + 16948, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16944, + {FzName: ts + 16960, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16955, + {FzName: ts + 16971, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16967, + {FzName: ts + 16983, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16984, + {FzName: ts + 17000, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 17003, + {FzName: ts + 17019, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 17029, + {FzName: ts + 17045, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17044, + {FzName: ts + 17060, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17058, + {FzName: ts + 17074, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17077, + {FzName: ts + 17093, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17091, + {FzName: ts + 17107, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17107, + {FzName: ts + 17123, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17119, + {FzName: ts + 17135, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17130, + {FzName: ts + 17146, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17141, + {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 + 17153, + {FzName: ts + 17169, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17164, + {FzName: ts + 17180, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17185, + {FzName: ts + 17201, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17193, + {FzName: ts + 17209, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17208, + {FzName: ts + 17224, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17221, + {FzName: ts + 17237, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17240, + {FzName: ts + 17256, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17255, + {FzName: ts + 17271, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -79930,7 +80495,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17271)) +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17287)) var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} @@ -79942,10 +80507,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+17296) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17312) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17306) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { return PAGER_LOCKINGMODE_NORMAL } } @@ -79954,13 +80519,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+7942) { + if 0 == Xsqlite3StrICmp(tls, z, ts+8010) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17313) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17329) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17318) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17334) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -79975,9 +80540,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16246) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16262) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17330) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17346) == 0 { return 2 } else { return 0 @@ -79991,7 +80556,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+17337, 0) + ts+17353, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) @@ -80082,19 +80647,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17399 + zName = ts + 17415 break case OE_SetDflt: - zName = ts + 17408 + zName = ts + 17424 break case OE_Cascade: - zName = ts + 17420 + zName = ts + 17436 break case OE_Restrict: - zName = ts + 17428 + zName = ts + 17444 break default: - zName = ts + 17437 + zName = ts + 17453 break } return zName @@ -80111,7 +80676,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17447, ts + 17454, ts + 17462, ts + 17466, ts + 17330, ts + 17475, + ts + 17463, ts + 17470, ts + 17478, ts + 17482, ts + 17346, ts + 17491, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80158,13 +80723,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17479 + zType = ts + 17495 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17481 + zType = ts + 17497 } else { - zType = ts + 7452 + zType = ts + 7512 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17483, + 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), @@ -80172,7 +80737,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17490, ts + 17495, ts + 17503} +var azEnc = [4]uintptr{uintptr(0), ts + 17506, ts + 17511, ts + 17519} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80323,14 +80888,16 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var zErr2 uintptr var k3 int32 var pCheck uintptr + var jmp6 int32 var iCol1 int32 var uniqOk int32 - var jmp6 int32 - var kk int32 + var jmp61 int32 var jmp21 int32 var jmp4 int32 var jmp5 int32 + var label6 int32 + var kk int32 var ckUniq int32 var pTab9 uintptr var pIdx5 uintptr @@ -80417,7 +80984,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17511, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17527, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -80678,7 +81245,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17515) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17531) == 0) { goto __64 } b = 2 @@ -80750,7 +81317,7 @@ __71: goto __15 __20: - zRet = ts + 17306 + zRet = ts + 17322 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -80788,7 +81355,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17296 + zRet = ts + 17312 __83: ; returnSingleText(tls, v, zRet) @@ -81038,7 +81605,7 @@ __116: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 544)) == 0) { goto __119 } - Xsqlite3ErrorMsg(tls, pParse, ts+17520, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17536, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __119: @@ -81079,7 +81646,7 @@ __123: goto __125 } Xsqlite3ErrorMsg(tls, pParse, - ts+17545, 0) + ts+17561, 0) goto __126 __125: if !(iDb != 1) { @@ -81133,7 +81700,7 @@ __132: __134: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17598) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17614) == 0) { goto __135 } @@ -81230,9 +81797,9 @@ __148: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17604 + return ts + 17620 } - return ts + 17612 + return ts + 17628 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -81301,7 +81868,7 @@ __163: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __164 } - zSql = Xsqlite3MPrintf(tls, db, ts+17619, 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 __165 } @@ -81347,29 +81914,29 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __171 } - zType = ts + 10413 + zType = ts + 10475 goto __172 __171: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __173 } - zType = ts + 12695 + zType = ts + 12705 goto __174 __173: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __175 } - zType = ts + 17635 + zType = ts + 17651 goto __176 __175: - zType = ts + 8798 + zType = ts + 8860 __176: ; __174: ; __172: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17642, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -81435,7 +82002,7 @@ __183: goto __185 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17649, 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) @@ -81445,7 +82012,7 @@ __183: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __186 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17654, + 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)))) @@ -81482,8 +82049,8 @@ __189: if !(pIdx1 != 0) { goto __191 } - *(*[3]uintptr)(unsafe.Pointer(bp + 560)) = [3]uintptr{ts + 17659, ts + 17661, ts + 16123} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17663, + *(*[3]uintptr)(unsafe.Pointer(bp + 560)) = [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), @@ -81516,7 +82083,7 @@ __192: goto __193 __195: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17669, + 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))) @@ -81538,7 +82105,7 @@ __196: goto __198 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17673, 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 __197 __197: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -81602,7 +82169,7 @@ __208: goto __210 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7452, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7512, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __209 __209: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -81618,7 +82185,7 @@ __211: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __213 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7452, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7512, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __212 __212: i6++ @@ -81653,7 +82220,7 @@ __219: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __221 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17676, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17692, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -81661,7 +82228,7 @@ __219: (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), - ts+17685)) + ts+17701)) goto __220 __220: j2++ @@ -81850,7 +82417,7 @@ __249: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __250: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17690, 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 + 592))) @@ -82067,7 +82634,7 @@ __277: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17694, 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) @@ -82128,262 +82695,284 @@ __292: Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 604)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) - mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 -__293: - if !(mxCol >= 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 || - int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { - goto __294 + if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __293 + } + mxCol = -1 + j4 = 0 +__295: + if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { + goto __297 + } + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { + goto __298 + } + mxCol++ +__298: + ; + goto __296 +__296: + j4++ + goto __295 + goto __297 +__297: + ; + if !(mxCol == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __299 } mxCol-- - goto __293 +__299: + ; + goto __294 +__293: + mxCol = int32((*Index)(unsafe.Pointer(Xsqlite3PrimaryKeyIndex(tls, pTab9))).FnColumn) - 1 __294: ; if !(mxCol >= 0) { - goto __295 + goto __300 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), mxCol, 3) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 604)), mxCol, 3) Xsqlite3VdbeTypeofColumn(tls, v, 3) -__295: +__300: ; if !!(isQuick != 0) { - goto __296 + goto __301 } if !(pPk1 != 0) { - goto __297 + goto __302 } a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 604)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) zErr = Xsqlite3MPrintf(tls, db, - ts+17718, + 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 -__298: +__303: if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { - goto __300 + goto __305 } Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 604)), j4, r2+j4) - goto __299 -__299: + goto __304 +__304: j4++ - goto __298 - goto __300 -__300: + goto __303 + goto __305 +__305: ; -__297: +__302: ; -__296: +__301: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__301: +__306: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __303 + goto __308 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __304 + goto __309 } - goto __302 -__304: + goto __307 +__309: ; if !(bStrict != 0) { - goto __305 + goto __310 } doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) > COLTYPE_ANY) - goto __306 -__305: + goto __311 +__310: doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) -__306: +__311: ; if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(doTypeCheck != 0)) { - goto __307 + goto __312 } - goto __302 -__307: + goto __307 +__312: ; p4 = SQLITE_NULL if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __308 + goto __313 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) p11 = -1 p3 = 3 - goto __309 -__308: + goto __314 +__313: if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { - goto __310 + goto __315 } *(*uintptr)(unsafe.Pointer(bp + 616)) = uintptr(0) Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, uint8((*Column)(unsafe.Pointer(pCol1)).Faffinity), bp+616) if !(*(*uintptr)(unsafe.Pointer(bp + 616)) != 0) { - goto __311 + goto __316 } p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 616))) -__311: +__316: ; -__310: +__315: ; p11 = *(*int32)(unsafe.Pointer(bp + 604)) if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __312 + goto __317 } p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) - goto __313 -__312: + goto __318 +__317: p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) -__313: +__318: ; -__309: +__314: ; labelError = Xsqlite3VdbeMakeLabel(tls, pParse) labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { - goto __314 + goto __319 } jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17754, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17770, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) if !(doTypeCheck != 0) { - goto __315 + goto __320 } Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) - goto __316 -__315: + goto __321 +__320: ; -__316: +__321: ; -__314: +__319: ; if !(bStrict != 0 && doTypeCheck != 0) { - goto __317 + goto __322 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17774, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17790, libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) - goto __318 -__317: + goto __323 +__322: if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { - goto __319 + goto __324 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17796, + 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 __320 -__319: + goto __325 +__324: if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { - goto __321 + goto __326 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) if !(p11 >= 0) { - goto __322 + goto __327 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 604)), j4, 3) -__322: +__327: ; - Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17819, -1) + 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+17821, + 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) -__321: +__326: ; -__320: +__325: ; -__318: +__323: ; Xsqlite3VdbeResolveLabel(tls, v, labelError) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, labelOk) - goto __302 -__302: + goto __307 +__307: j4++ - goto __301 - goto __303 -__303: + goto __306 + goto __308 +__308: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __323 + goto __328 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __324 + goto __329 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 604)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__325: +__330: if !(k3 > 0) { - goto __327 + goto __332 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) - goto __326 -__326: + goto __331 +__331: k3-- - goto __325 - goto __327 -__327: + goto __330 + goto __332 +__332: ; Xsqlite3ExprIfTrue(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8)).FpExpr, addrCkOk, SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr2 = Xsqlite3MPrintf(tls, db, ts+17841, + 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) -__324: +__329: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__323: +__328: ; if !!(isQuick != 0) { - goto __328 + goto __333 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__329: +__334: if !(pIdx5 != 0) { - goto __331 + goto __336 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __332 + goto __337 } - goto __330 -__332: + goto __335 +__337: ; r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 604)), 0, 0, bp+624, pPrior, r1) @@ -82392,80 +82981,119 @@ __332: jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 608))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17871) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17876) + 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) jmp4 = integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, jmp21) + label6 = 0 + kk = 0 +__338: + if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { + goto __340 + } + if !(*(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FazColl + uintptr(kk)*8)) == uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) { + goto __341 + } + goto __339 +__341: + ; + if !(label6 == 0) { + goto __342 + } + label6 = Xsqlite3VdbeMakeLabel(tls, pParse) +__342: + ; + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 608))+j4, kk, 3) + Xsqlite3VdbeAddOp3(tls, v, OP_Ne, 3, label6, r1+kk) + goto __339 +__339: + kk++ + goto __338 + goto __340 +__340: + ; + if !(label6 != 0) { + goto __343 + } + jmp6 = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + Xsqlite3VdbeResolveLabel(tls, v, label6) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17887) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17913) + Xsqlite3VdbeGoto(tls, v, jmp5-1) + Xsqlite3VdbeJumpHere(tls, v, jmp6) +__343: + ; if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __333 + goto __344 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__334: +__345: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __336 + goto __347 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FaiColumn + uintptr(kk)*2))) if !(iCol1 >= 0 && uint32(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(iCol1)*24 + 8))&0xf>>0)) != 0) { - goto __337 + goto __348 } - goto __335 -__337: + goto __346 +__348: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __335 -__335: + goto __346 +__346: kk++ - goto __334 - goto __336 -__336: + goto __345 + goto __347 +__347: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 608))+j4) + jmp61 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 608))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) - Xsqlite3VdbeJumpHere(tls, v, jmp6) + Xsqlite3VdbeJumpHere(tls, v, jmp61) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 608))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17897) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17940) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__333: +__344: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 624))) - goto __330 -__330: + goto __335 +__335: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __329 - goto __331 -__331: + goto __334 + goto __336 +__336: ; -__328: +__333: ; Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 604)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __338 + goto __349 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17924) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17967) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__339: +__350: if !(pIdx5 != 0) { - goto __341 + goto __352 } if !(pPk1 == pIdx5) { - goto __342 + goto __353 } - goto __340 -__342: + goto __351 +__353: ; Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 608))+j4, 3) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, 8+j4, 0, 3) @@ -82474,21 +83102,21 @@ __342: Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 2, 3) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, addr1) - goto __340 -__340: + goto __351 +__351: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __339 - goto __341 -__341: + goto __350 + goto __352 +__352: ; if !(pPk1 != 0) { - goto __343 + goto __354 } Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) -__343: +__354: ; -__338: +__349: ; goto __284 __284: @@ -82506,14 +83134,14 @@ __259: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __344 + goto __355 } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 600)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17953 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 17996 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__344: +__355: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -82521,27 +83149,27 @@ __344: __45: if !!(zRight != 0) { - goto __345 + goto __356 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __347 + goto __358 } goto pragma_out -__347: +__358: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __346 -__345: + goto __357 +__356: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __348 + goto __359 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__349: +__360: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __351 + goto __362 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __352 + goto __363 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -82550,25 +83178,25 @@ __349: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __351 -__352: + goto __362 +__363: ; - goto __350 -__350: + goto __361 +__361: pEnc += 16 - goto __349 - goto __351 -__351: + goto __360 + goto __362 +__362: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __353 + goto __364 } - Xsqlite3ErrorMsg(tls, pParse, ts+17956, libc.VaList(bp+456, zRight)) -__353: + Xsqlite3ErrorMsg(tls, pParse, ts+17999, libc.VaList(bp+456, zRight)) +__364: ; -__348: +__359: ; -__346: +__357: ; goto __15 @@ -82576,15 +83204,15 @@ __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 __354 + goto __365 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __356 + goto __367 } goto __15 -__356: +__367: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp1 = iDb @@ -82592,41 +83220,41 @@ __356: (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp5 = U16(1) if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { - goto __357 + goto __368 } (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fopcode = U8(OP_Noop) -__357: +__368: ; - goto __355 -__354: + goto __366 +__365: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __358 + goto __369 } goto __15 -__358: +__369: ; (*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) -__355: +__366: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__359: +__370: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __360 + goto __371 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __359 -__360: + goto __370 +__371: ; Xsqlite3VdbeReusable(tls, v) @@ -82641,31 +83269,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __361 + goto __372 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17313) == 0) { - goto __362 + if !(Xsqlite3StrICmp(tls, zRight, ts+17329) == 0) { + goto __373 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __363 -__362: - if !(Xsqlite3StrICmp(tls, zRight, ts+17981) == 0) { - goto __364 + goto __374 +__373: + if !(Xsqlite3StrICmp(tls, zRight, ts+18024) == 0) { + goto __375 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __365 -__364: - if !(Xsqlite3StrICmp(tls, zRight, ts+17466) == 0) { - goto __366 + goto __376 +__375: + if !(Xsqlite3StrICmp(tls, zRight, ts+17482) == 0) { + goto __377 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__366: +__377: ; -__365: +__376: ; -__363: +__374: ; -__361: +__372: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -82675,10 +83303,10 @@ __361: __49: if !(zRight != 0) { - goto __367 + goto __378 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__367: +__378: ; returnSingleInt(tls, v, func() int64 { @@ -82698,19 +83326,19 @@ __50: __51: if !(zRight != 0) { - goto __368 + goto __379 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __370 + goto __381 } goto __15 -__370: +__381: ; - goto __369 -__368: + goto __380 +__379: opMask = U32(0xfffe) -__369: +__380: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -82719,86 +83347,86 @@ __369: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__371: +__382: if !(iDb <= iDbLast) { - goto __373 + goto __384 } if !(iDb == 1) { - goto __374 + goto __385 } - goto __372 -__374: + goto __383 +__385: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__375: +__386: if !(k4 != 0) { - goto __377 + goto __388 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __378 + goto __389 } - goto __376 -__378: + goto __387 +__389: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__379: +__390: if !(pIdx6 != 0) { - goto __381 + goto __392 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { - goto __382 + goto __393 } szThreshold = int16(0) - goto __381 -__382: + goto __392 +__393: ; - goto __380 -__380: + goto __391 +__391: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __379 - goto __381 -__381: + goto __390 + goto __392 +__392: ; if !(szThreshold != 0) { - goto __383 + goto __394 } 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)) -__383: +__394: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17989, + zSubSql = Xsqlite3MPrintf(tls, db, ts+18032, 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 __384 + goto __395 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __385 -__384: + goto __396 +__395: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__385: +__396: ; - goto __376 -__376: + goto __387 +__387: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __375 - goto __377 -__377: + goto __386 + goto __388 +__388: ; - goto __372 -__372: + goto __383 +__383: iDb++ - goto __371 - goto __373 -__373: + goto __382 + goto __384 +__384: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -82806,36 +83434,36 @@ __373: __52: ; if !(zRight != 0) { - goto __386 + goto __397 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__386: +__397: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+632) == SQLITE_OK) { - goto __387 + goto __398 } Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 632))) -__387: +__398: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+640) == SQLITE_OK) { - goto __388 + goto __399 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 640)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 640)))) { - goto __389 + goto __400 } Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 640))) -__389: +__400: ; -__388: +__399: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 @@ -82844,10 +83472,10 @@ __55: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+648) == SQLITE_OK && *(*Sqlite3_int64)(unsafe.Pointer(bp + 648)) >= int64(0)) { - goto __390 + goto __401 } Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 648))&int64(0x7fffffff))) -__390: +__401: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 @@ -82856,10 +83484,10 @@ __56: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+656) == SQLITE_OK && *(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) >= int64(0)) { - goto __391 + goto __402 } (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 656)) & int64(0x7fffffff)) -__391: +__402: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -82867,10 +83495,10 @@ __391: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __392 + goto __403 } -__392: +__403: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -82922,14 +83550,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 18007, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18012, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18018, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18044, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18052}, - {FzName: ts + 18059}, + {FzName: ts + 18050, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18055, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18061, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18070, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18079, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18087, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18095}, + {FzName: ts + 18102}, {}, } var setCookie = [2]VdbeOpList{ @@ -82981,7 +83609,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+18065) + Xsqlite3_str_appendall(tls, bp+32, ts+18108) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -82989,7 +83617,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+18080, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18123, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -83002,16 +83630,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18087, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18130, 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+18093) + Xsqlite3_str_appendall(tls, bp+32, ts+18136) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18105) + Xsqlite3_str_appendall(tls, bp+32, ts+18148) j++ } Xsqlite3_str_append(tls, bp+32, ts+4941, 1) @@ -83194,13 +83822,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+18120) + Xsqlite3_str_appendall(tls, bp+32, ts+18163) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18128, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18171, 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+18132, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18175, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83277,12 +83905,12 @@ 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+18136, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), + ts+18179, 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, 136321) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 137196) } else { var z uintptr var zObj uintptr @@ -83291,19 +83919,19 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 4992 } - z = Xsqlite3MPrintf(tls, db, ts+18164, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18207, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18195, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18238, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136328) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 137203) } } var azAlterType = [3]uintptr{ - ts + 18203, - ts + 18210, - ts + 18222, + ts + 18246, + ts + 18253, + ts + 18265, } // Check to see if any sibling index (another index on the same table) @@ -83363,7 +83991,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+14114) + corruptSchema(tls, pData, argv, ts+14124) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) @@ -83395,13 +84023,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+18233) + corruptSchema(tls, pData, argv, ts+18276) } 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+14114) + corruptSchema(tls, pData, argv, ts+14124) } } } @@ -83434,16 +84062,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 + 8798 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8860 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7862 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18246 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 7922 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 18289 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64)).FiDb = iDb @@ -83521,17 +84149,26 @@ __8: encoding = U8(SQLITE_UTF8) __12: ; + if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 0 && int32(encoding) != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { + goto __13 + } + rc = SQLITE_LOCKED + goto initone_error_out + goto __14 +__13: Xsqlite3SetTextEncoding(tls, db, encoding) +__14: + ; goto __11 __10: if !(*(*int32)(unsafe.Pointer(bp + 104 + 4*4))&3 != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { - goto __13 + goto __15 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11697) + ts+11759) rc = SQLITE_ERROR goto initone_error_out -__13: +__15: ; __11: ; @@ -83540,44 +84177,44 @@ __9: (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size == 0) { - goto __14 + goto __16 } size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 104 + 2*4))) if !(size == 0) { - goto __15 + goto __17 } size = -2000 -__15: +__17: ; (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) -__14: +__16: ; (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 104 + 1*4))) if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) == 0) { - goto __16 + goto __18 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(1) -__16: +__18: ; if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { - goto __17 + goto __19 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+18318) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18361) rc = SQLITE_ERROR goto initone_error_out -__17: +__19: ; if !(iDb == 0 && *(*int32)(unsafe.Pointer(bp + 104 + 1*4)) >= 4) { - goto __18 + goto __20 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyFileFmt)) -__18: +__20: ; (*InitData)(unsafe.Pointer(bp + 64)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18342, + ts+18385, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -83588,57 +84225,57 @@ __18: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc == SQLITE_OK) { - goto __19 + goto __21 } rc = (*InitData)(unsafe.Pointer(bp + 64)).Frc -__19: +__21: ; Xsqlite3DbFree(tls, db, zSql) if !(rc == SQLITE_OK) { - goto __20 + goto __22 } Xsqlite3AnalysisLoad(tls, db, iDb) -__20: +__22: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __21 + goto __23 } rc = SQLITE_NOMEM Xsqlite3ResetAllSchemasOfConnection(tls, db) pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - goto __22 -__21: + goto __24 +__23: if !(rc == SQLITE_OK || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NoSchemaError) != 0 && rc != SQLITE_NOMEM) { - goto __23 + goto __25 } *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 114)) |= U16(DB_SchemaLoaded) rc = SQLITE_OK -__23: +__25: ; -__22: +__24: ; initone_error_out: if !(openedTransaction != 0) { - goto __24 + goto __26 } Xsqlite3BtreeCommit(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) -__24: +__26: ; Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) error_out: if !(rc != 0) { - goto __25 + goto __27 } if !(rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8) { - goto __26 + goto __28 } Xsqlite3OomFault(tls, db) -__26: +__28: ; Xsqlite3ResetOneSchema(tls, db, iDb) -__25: +__27: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) return rc @@ -83727,8 +84364,10 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { Xsqlite3BtreeGetMeta(tls, pBt, BTREE_SCHEMA_VERSION, bp) if *(*int32)(unsafe.Pointer(bp)) != (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fschema_cookie { + if int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).FschemaFlags)&DB_SchemaLoaded == DB_SchemaLoaded { + (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_SCHEMA + } Xsqlite3ResetOneSchema(tls, db, iDb) - (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_SCHEMA } if openedTransaction != 0 { @@ -83841,8 +84480,8 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { - libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+224)-uint64(uintptr(0)+8)) - libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+228)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+288)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+288)) (*Parse)(unsafe.Pointer(pParse)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse @@ -83853,8 +84492,8 @@ func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { } func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(440) + defer tls.Free(440) var rc int32 var i int32 @@ -83866,8 +84505,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)+224)-uint64(uintptr(0)+8)) - libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+280)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+280)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+228)-uint64(uintptr(0)+8)) + libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+288)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+288)) (*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 @@ -83907,7 +84546,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18376, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18419, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -83937,7 +84576,7 @@ __9: if !(nBytes > mxLen) { goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18406, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18449, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __12: @@ -84033,7 +84672,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, 137115) + return Xsqlite3MisuseError(tls, 137995) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -84132,7 +84771,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, 137263) + return Xsqlite3MisuseError(tls, 138143) } if nBytes >= 0 { var sz int32 @@ -84450,8 +85089,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 + 10842 - var zSp2 uintptr = ts + 10842 + var zSp1 uintptr = ts + 10904 + var zSp2 uintptr = ts + 10904 if pB == uintptr(0) { zSp1++ } @@ -84459,13 +85098,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18425, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18468, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18455)) +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18498)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -84640,7 +85279,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 72)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18489, libc.VaList(bp, 0)) + ts+18532, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -84685,7 +85324,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18539, libc.VaList(bp+8, zName)) + ts+18582, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -84696,7 +85335,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 60 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 60 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*104 + 72)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18603, + Xsqlite3ErrorMsg(tls, pParse, ts+18646, libc.VaList(bp+16, zName)) break } @@ -84740,7 +85379,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6510, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6570, 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. @@ -85087,9 +85726,6 @@ 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) @@ -85327,16 +85963,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18640 + z = ts + 18683 break case TK_INTERSECT: - z = ts + 18650 + z = ts + 18693 break case TK_EXCEPT: - z = ts + 18660 + z = ts + 18703 break default: - z = ts + 18667 + z = ts + 18710 break } return z @@ -85346,10 +85982,13 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18673, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18716, libc.VaList(bp, zUsage)) } func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { + bp := tls.Alloc(8) + defer tls.Free(8) + var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -85369,6 +86008,13 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n var nRefKey int32 = 0 var aOutEx uintptr = (*Select)(unsafe.Pointer(p)).FpEList + 8 + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18739, libc.VaList(bp, func() uintptr { + if (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat > 0 { + return ts + 18770 + } + return ts + 1538 + }())) + if (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) Xsqlite3VdbeGoto(tls, v, addrBreak) @@ -85435,6 +86081,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n } } + switch eDest { case SRT_Table: fallthrough @@ -85499,6 +86146,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n } else { Xsqlite3VdbeAddOp2(tls, v, OP_Next, iTab, addr) } + if (*SortCtx)(unsafe.Pointer(pSort)).FregReturn != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_Return, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn) } @@ -85553,7 +86201,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1103 - *(*uintptr)(unsafe.Pointer(bp + 72)) = ts + 16235 + *(*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)) @@ -85692,13 +86340,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16235 + 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+11983, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+12045, 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)) @@ -85706,7 +86354,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+18696, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18785, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -85771,7 +86419,7 @@ func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, i = 0 pCol = aCol __1: - if !(i < nCol && !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0)) { + if !(i < nCol && !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0)) { goto __3 } { @@ -85796,7 +86444,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { - zName = ts + 16235 + zName = ts + 16251 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -85806,7 +86454,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18696, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18785, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 56)) = U32(0) @@ -85822,7 +86470,8 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18794, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56)), 1))) + Xsqlite3ProgressCheck(tls, pParse) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } @@ -85847,45 +86496,48 @@ __2: __3: ; Xsqlite3HashClear(tls, bp+32) - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { for j = 0; j < i; j++ { Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(aCol+uintptr(j)*24)).FzCnName) } Xsqlite3DbFree(tls, db, aCol) *(*uintptr)(unsafe.Pointer(paCol)) = uintptr(0) *(*I16)(unsafe.Pointer(pnCol)) = int16(0) - return SQLITE_NOMEM + return (*Parse)(unsafe.Pointer(pParse)).Frc } return SQLITE_OK } -// Add type and collation information to a column list based on -// a SELECT statement. -// -// The column list presumably came from selectColumnNamesFromExprList(). -// The column list has only names, not types or collations. This -// routine goes through and adds the types and collations. +// pTab is a transient Table object that represents a subquery of some +// kind (maybe a parenthesized subquery in the FROM clause of a larger +// query, or a VIEW, or a CTE). This routine computes type information +// for that Table object based on the Select object that implements the +// subquery. For the purposes of this routine, "type infomation" means: // -// This routine requires that all identifiers in the SELECT -// statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { +// - The datatype name, as it might appear in a CREATE TABLE statement +// - Which collating sequence to use for the column +// - The affinity of the column +func Xsqlite3SubqueryColumnTypes(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { bp := tls.Alloc(56) defer tls.Free(56) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - var pCol uintptr var pColl uintptr var i int32 + var j int32 var p uintptr var a uintptr if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } + for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { + pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior + } + a = (*Select)(unsafe.Pointer(pSelect)).FpEList + 8 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc - a = (*Select)(unsafe.Pointer(pSelect)).FpEList + 8 i = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol __1: @@ -85895,14 +86547,46 @@ __1: { var zType uintptr var n I64 - var m I64 *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_NOINSERT) p = (*ExprList_item)(unsafe.Pointer(a + uintptr(i)*32)).FpExpr - zType = columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0)) (*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3ExprAffinity(tls, p) + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) <= SQLITE_AFF_NONE { + (*Column)(unsafe.Pointer(pCol)).Faffinity = aff + } else if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) >= SQLITE_AFF_NUMERIC && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_CAST { + (*Column)(unsafe.Pointer(pCol)).Faffinity = int8(SQLITE_AFF_FLEXNUM) + } + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) >= SQLITE_AFF_TEXT && (*Select)(unsafe.Pointer(pSelect)).FpNext != 0 { + var m int32 = 0 + var pS2 uintptr + m = 0 + pS2 = (*Select)(unsafe.Pointer(pSelect)).FpNext + for ; pS2 != 0; pS2 = (*Select)(unsafe.Pointer(pS2)).FpNext { + m = m | Xsqlite3ExprDataType(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pS2)).FpEList+8+uintptr(i)*32)).FpExpr) + } + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_TEXT && m&0x01 != 0 { + (*Column)(unsafe.Pointer(pCol)).Faffinity = int8(SQLITE_AFF_BLOB) + } else if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) >= SQLITE_AFF_NUMERIC && m&0x02 != 0 { + (*Column)(unsafe.Pointer(pCol)).Faffinity = int8(SQLITE_AFF_BLOB) + } + } + zType = columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0)) + if zType == uintptr(0) || int32((*Column)(unsafe.Pointer(pCol)).Faffinity) != int32(Xsqlite3AffinityType(tls, zType, uintptr(0))) { + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_NUMERIC || + int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_FLEXNUM { + zType = ts + 18802 + } else { + zType = uintptr(0) + for j = 1; j < SQLITE_N_STDTYPE; j++ { + if int32(Xsqlite3StdTypeAffinity[j]) == int32((*Column)(unsafe.Pointer(pCol)).Faffinity) { + zType = Xsqlite3StdType[j] + break + } + } + } + } if zType != 0 { - m = I64(Xsqlite3Strlen30(tls, zType)) + var m I64 = I64(Xsqlite3Strlen30(tls, zType)) n = I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) (*Column)(unsafe.Pointer(pCol)).FzCnName = Xsqlite3DbReallocOrFree(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName, uint64(n+m+int64(2))) if (*Column)(unsafe.Pointer(pCol)).FzCnName != 0 { @@ -85912,9 +86596,6 @@ __1: *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_HASTYPE | COLFLAG_HASCOLL)) } } - if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) <= SQLITE_AFF_NONE { - (*Column)(unsafe.Pointer(pCol)).Faffinity = aff - } pColl = Xsqlite3ExprCollSeq(tls, pParse, p) if pColl != 0 { Xsqlite3ColumnSetColl(tls, db, pCol, (*CollSeq)(unsafe.Pointer(pColl)).FzName) @@ -85958,7 +86639,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a (*Table)(unsafe.Pointer(pTab)).FzName = uintptr(0) (*Table)(unsafe.Pointer(pTab)).FnRowLogEst = int16(200) Xsqlite3ColumnsFromExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, pTab+54, pTab+8) - Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTab, pSelect, aff) + Xsqlite3SubqueryColumnTypes(tls, pParse, pTab, pSelect, aff) (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3DeleteTable(tls, db, pTab) @@ -86109,7 +86790,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18713, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18806, 0) return __1: ; @@ -86200,7 +86881,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18762, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18855, 0) goto end_of_recursive_query __15: ; @@ -86220,7 +86901,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18804, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18897, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86257,7 +86938,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18810, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18903, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86291,11 +86972,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+18825, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18918, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1538 } - return ts + 18848 + return ts + 18941 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86396,8 +87077,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18850, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18865, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18943, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18958, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -86444,7 +87125,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18640, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18683, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -86511,7 +87192,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+18884, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18977, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) @@ -86573,7 +87254,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+18884, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18977, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) @@ -86726,10 +87407,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+18905, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18998, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18951, + ts+19044, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -86983,8 +87664,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+7158) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7158) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7218) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7218) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87011,13 +87692,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+19033, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19126, 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+19044, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19137, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87029,7 +87710,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+19049, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19142, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -87444,6 +88125,25 @@ func findLeftmostExprlist(tls *libc.TLS, pSel uintptr) uintptr { return (*Select)(unsafe.Pointer(pSel)).FpEList } +func compoundHasDifferentAffinities(tls *libc.TLS, p uintptr) int32 { + var ii int32 + var pList uintptr + + pList = (*Select)(unsafe.Pointer(p)).FpEList + for ii = 0; ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr; ii++ { + var aff int8 + var pSub1 uintptr + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr) + for pSub1 = (*Select)(unsafe.Pointer(p)).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 1 + } + } + } + return 0 +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { bp := tls.Alloc(88) defer tls.Free(88) @@ -87563,15 +88263,8 @@ func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAg return 0 } - for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr; ii++ { - var aff int8 - - aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*32)).FpExpr) - for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { - if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*32)).FpExpr)) != int32(aff) { - return 0 - } - } + if compoundHasDifferentAffinities(tls, pSub) != 0 { + return 0 } if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { @@ -87947,16 +88640,33 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin if (*Select)(unsafe.Pointer(pSubq)).FpPrior != 0 { var pSel uintptr + var notUnionAll int32 = 0 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 + notUnionAll = 1 } if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 { return 0 } } + if compoundHasDifferentAffinities(tls, pSubq) != 0 { + return 0 + } + if notUnionAll != 0 { + for pSel = pSubq; pSel != 0; pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior { + var ii int32 + var pList uintptr = (*Select)(unsafe.Pointer(pSel)).FpEList + + for ii = 0; ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr; ii++ { + var pColl uintptr = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr) + if !(Xsqlite3IsBinary(tls, pColl) != 0) { + return 0 + } + } + } + } } else { if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition == uintptr(0) { return 0 @@ -88016,12 +88726,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15138) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15148) == 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+15142) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15152) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88087,7 +88797,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+19055, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19148, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88170,7 +88880,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19073, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19166, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88299,15 +89009,12 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19096, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19189, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 88)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+60+4, uint32(1), 8, 0x100) *(*uintptr)(unsafe.Pointer(pFrom + 96)) = pCteUse (*CteUse)(unsafe.Pointer(pCteUse)).FnUse++ - if (*CteUse)(unsafe.Pointer(pCteUse)).FnUse >= 2 && int32((*CteUse)(unsafe.Pointer(pCteUse)).FeM10d) == M10d_Any { - (*CteUse)(unsafe.Pointer(pCteUse)).FeM10d = U8(M10d_Yes) - } pRecTerm = libc.AssignUintptr(&pSel, (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect) bMayRecursive = libc.Bool32(int32((*Select)(unsafe.Pointer(pSel)).Fop) == TK_ALL || int32((*Select)(unsafe.Pointer(pSel)).Fop) == TK_UNION) @@ -88325,7 +89032,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19116, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19209, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88341,7 +89048,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19159 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19252 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 { @@ -88367,7 +89074,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+19182, + Xsqlite3ErrorMsg(tls, pParse, ts+19275, 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 @@ -88378,9 +89085,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 + 19220 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19313 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19254 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19347 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -88427,7 +89134,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+19292, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19385, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -88539,7 +89246,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19296, + Xsqlite3ErrorMsg(tls, pParse, ts+19389, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -88558,7 +89265,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+19335, + Xsqlite3ErrorMsg(tls, pParse, ts+19428, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64)), 0) @@ -88566,7 +89273,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 + 4))&0x80>>7)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+14707, + Xsqlite3ErrorMsg(tls, pParse, ts+14717, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -88667,7 +89374,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { - zSchemaName = ts + 6370 + zSchemaName = ts + 6430 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -88682,7 +89389,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+19366, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19459, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 7, 0x80) } @@ -88747,7 +89454,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+19371, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19464, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -88759,7 +89466,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11983, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+12045, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+16+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -88778,9 +89485,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19380, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19473, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19398, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19491, 0) } } } @@ -88790,7 +89497,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+19418, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19511, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -88849,11 +89556,7 @@ __1: if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) != U32(0) { var pSel uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect if pSel != 0 { - for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { - pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior - } - Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTab, pSel, - int8(SQLITE_AFF_NONE)) + Xsqlite3SubqueryColumnTypes(tls, pParse, pTab, pSel, int8(SQLITE_AFF_NONE)) } } @@ -88912,6 +89615,81 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp sqlite3SelectAddTypeInfo(tls, pParse, p) } +func analyzeAggFuncArgs(tls *libc.TLS, pAggInfo uintptr, pNC uintptr) { + var i int32 + + *(*int32)(unsafe.Pointer(pNC + 40)) |= NC_InAggFunc + for i = 0; i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc; i++ { + var pExpr uintptr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24)).FpFExpr + + Xsqlite3ExprAnalyzeAggList(tls, pNC, *(*uintptr)(unsafe.Pointer(pExpr + 32))) + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + Xsqlite3ExprAnalyzeAggregates(tls, pNC, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) + } + } + *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_InAggFunc) +} + +func optimizeAggregateUseOfIndexedExpr(tls *libc.TLS, pParse uintptr, pSelect uintptr, pAggInfo uintptr, pNC uintptr) { + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn = (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator + if int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn) > 0 { + if (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn == 0 { + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = U16(0) + } else { + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = U16(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr((*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn-1)*24)).FiSorterColumn) + 1) + } + } + analyzeAggFuncArgs(tls, pAggInfo, pNC) + _ = pSelect + _ = pParse +} + +func aggregateIdxEprRefToColCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { + var pAggInfo uintptr + var pCol uintptr + _ = pWalker + if (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { + return WRC_Continue + } + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IF_NULL_ROW { + return WRC_Continue + } + pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo + + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*24 + (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) + (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable + (*Expr)(unsafe.Pointer(pExpr)).FiColumn = (*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn + return WRC_Prune +} + +func aggregateConvertIndexedExprRefToColumn(tls *libc.TLS, pAggInfo uintptr) { + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + + 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 + }{aggregateIdxEprRefToColCallback})) + for i = 0; i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc; i++ { + Xsqlite3WalkExpr(tls, bp, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*24)).FpFExpr) + } +} + +func assignAggregateRegisters(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { + (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 + *(*int32)(unsafe.Pointer(pParse + 56)) += (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc +} + func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { bp := tls.Alloc(8) defer tls.Free(8) @@ -88927,7 +89705,8 @@ func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } - Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*AggInfo)(unsafe.Pointer(pAggInfo)).FmnReg, (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg) + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg, + (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg+nReg-1) pFunc = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc i = 0 __1: @@ -88940,13 +89719,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19449, 0) + ts+19542, 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+19500, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19593, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -88954,7 +89733,7 @@ __1: goto __2 __2: i++ - pFunc += 32 + pFunc += 24 goto __1 goto __3 __3: @@ -88974,19 +89753,22 @@ __1: var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFExpr + 32)) - Xsqlite3VdbeAddOp2(tls, v, OP_AggFinal, (*AggInfo_func)(unsafe.Pointer(pF)).FiMem, func() int32 { - if pList != 0 { - return (*ExprList)(unsafe.Pointer(pList)).FnExpr - } - return 0 - }()) + Xsqlite3VdbeAddOp2(tls, v, OP_AggFinal, func() int32 { + return (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + i + }(), + func() int32 { + if pList != 0 { + return (*ExprList)(unsafe.Pointer(pList)).FnExpr + } + return 0 + }()) Xsqlite3VdbeAppendP4(tls, v, (*AggInfo_func)(unsafe.Pointer(pF)).FpFunc, -7) } goto __2 __2: i++ - pF += 32 + pF += 24 goto __1 goto __3 __3: @@ -89000,6 +89782,9 @@ func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uin var pF uintptr var pC uintptr + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return + } (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc @@ -89074,7 +89859,9 @@ __1: } Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, regHit, 0, 0, pColl, -2) } - Xsqlite3VdbeAddOp3(tls, v, OP_AggStep, 0, regAgg, (*AggInfo_func)(unsafe.Pointer(pF)).FiMem) + Xsqlite3VdbeAddOp3(tls, v, OP_AggStep, 0, regAgg, func() int32 { + return (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + i + }()) Xsqlite3VdbeAppendP4(tls, v, (*AggInfo_func)(unsafe.Pointer(pF)).FpFunc, -7) Xsqlite3VdbeChangeP5(tls, v, uint16(U8(nArg))) Xsqlite3ReleaseTempRange(tls, pParse, regAgg, nArg) @@ -89086,7 +89873,7 @@ __1: goto __2 __2: i++ - pF += 32 + pF += 24 goto __1 goto __3 __3: @@ -89104,13 +89891,13 @@ __7: goto __9 } { - Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pC)).FpCExpr, (*AggInfo_col)(unsafe.Pointer(pC)).FiMem) + Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pC)).FpCExpr, func() int32 { ; return (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg + i }()) } goto __8 __8: i++ - pC += 32 + pC += 24 goto __7 goto __9 __9: @@ -89127,11 +89914,11 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19533, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19626, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19545 + return ts + 19638 } return ts + 1538 }(), @@ -89152,7 +89939,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+7862) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7922) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89184,14 +89971,15 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { Xsqlite3WalkExpr(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) } -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr, iFirst int32, iEnd int32) uintptr { var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { return uintptr(0) } - for pItem = pTabList + 8; pItem < pThis; pItem += 104 { + for iFirst < iEnd { var pS1 uintptr + pItem = pTabList + 8 + uintptr(libc.PostIncInt32(&iFirst, 1))*104 if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect == uintptr(0) { continue } @@ -89245,6 +90033,57 @@ func sameSrcAlias(tls *libc.TLS, p0 uintptr, pSrc uintptr) int32 { return 0 } +func fromClauseTermCanBeCoroutine(tls *libc.TLS, pParse uintptr, pTabList uintptr, i int32, selFlags int32) int32 { + var pItem uintptr = pTabList + 8 + uintptr(i)*104 + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x100>>8)) != 0 { + var pCteUse uintptr = *(*uintptr)(unsafe.Pointer(pItem + 96)) + if int32((*CteUse)(unsafe.Pointer(pCteUse)).FeM10d) == M10d_Yes { + return 0 + } + if (*CteUse)(unsafe.Pointer(pCteUse)).FnUse >= 2 && int32((*CteUse)(unsafe.Pointer(pCteUse)).FeM10d) != M10d_No { + return 0 + } + } + if int32((*SrcItem)(unsafe.Pointer(pTabList+8)).Ffg.Fjointype)&JT_LTORJ != 0 { + return 0 + } + if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_Coroutines) != U32(0) { + return 0 + } + if isSelfJoinView(tls, pTabList, pItem, i+1, (*SrcList)(unsafe.Pointer(pTabList)).FnSrc) != uintptr(0) { + return 0 + } + if i == 0 { + if (*SrcList)(unsafe.Pointer(pTabList)).FnSrc == 1 { + return 1 + } + if int32((*SrcItem)(unsafe.Pointer(pTabList+8+1*104)).Ffg.Fjointype)&JT_CROSS != 0 { + return 1 + } + if selFlags&SF_UpdateFrom != 0 { + return 0 + } + return 1 + } + if selFlags&SF_UpdateFrom != 0 { + return 0 + } + for 1 != 0 { + if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0 { + return 0 + } + if i == 0 { + break + } + i-- + pItem -= 104 + if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != uintptr(0) { + return 0 + } + } + return 1 +} + // Generate code for the SELECT statement given in the p argument. // // The results are returned according to the SelectDest structure. @@ -89309,7 +90148,6 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var k int32 var pItem2 uintptr var pExpr uintptr - var pExpr1 uintptr var pCol uintptr var regBase int32 @@ -89408,7 +90246,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19568, + ts+19661, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -89469,7 +90307,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19622, + Xsqlite3ErrorMsg(tls, pParse, ts+19715, 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: @@ -89583,7 +90421,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 308)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 316)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || @@ -89600,11 +90438,7 @@ __33: zSavedAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = (*SrcItem)(unsafe.Pointer(pItem1)).FzName - if !(i == 0 && - ((*SrcList)(unsafe.Pointer(pTabList)).FnSrc == 1 || - int32((*SrcItem)(unsafe.Pointer(pTabList+8+1*104)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0) && - (int32(*(*uint16)(unsafe.Pointer(pItem1 + 60 + 4))&0x100>>8) == 0 || int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 96)))).FeM10d) != M10d_Yes) && - int32((*SrcItem)(unsafe.Pointer(pTabList+8)).Ffg.Fjointype)&JT_LTORJ == 0) { + if !(fromClauseTermCanBeCoroutine(tls, pParse, pTabList, i, int32((*Select)(unsafe.Pointer(p)).FselFlags)) != 0) { goto __34 } @@ -89615,7 +90449,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+19662, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19755, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+96) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60+4, uint32(1), 5, 0x20) @@ -89641,7 +90475,7 @@ __38: (*Select)(unsafe.Pointer(pSub1)).FnSelectRow = (*CteUse)(unsafe.Pointer(pCteUse)).FnRowEst goto __37 __36: - if !(libc.AssignUintptr(&pPrior, isSelfJoinView(tls, pTabList, pItem1)) != uintptr(0)) { + if !(libc.AssignUintptr(&pPrior, isSelfJoinView(tls, pTabList, pItem1, 0, i)) != uintptr(0)) { goto __39 } @@ -89673,11 +90507,9 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+96, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19677, libc.VaList(bp+40, pItem1)) - (*SelectDest)(unsafe.Pointer(bp + 96)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) + + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19770, libc.VaList(bp+40, pItem1)) 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 @@ -89711,7 +90543,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 308)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 316)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90020,12 +90852,11 @@ __90: (*NameContext)(unsafe.Pointer(bp + 152)).FpSrcList = pTabList *(*uintptr)(unsafe.Pointer(bp + 152 + 16)) = pAggInfo - (*AggInfo)(unsafe.Pointer(pAggInfo)).FmnReg = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 - (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = func() int32 { + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = func() uint16 { if pGroupBy != 0 { - return (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr + return uint16((*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) } - return 0 + return uint16(0) }() (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy = pGroupBy Xsqlite3ExprAnalyzeAggList(tls, bp+152, pEList) @@ -90054,39 +90885,15 @@ __93: minMaxFlag = U8(WHERE_ORDERBY_NORMAL) __94: ; - i = 0 -__95: - if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __97 - } - pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr - - *(*int32)(unsafe.Pointer(bp + 152 + 40)) |= NC_InAggFunc - Xsqlite3ExprAnalyzeAggList(tls, bp+152, *(*uintptr)(unsafe.Pointer(pExpr + 32))) - - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __98 - } - Xsqlite3ExprAnalyzeAggregates(tls, bp+152, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) -__98: - ; - *(*int32)(unsafe.Pointer(bp + 152 + 40)) &= libc.CplInt32(NC_InAggFunc) - goto __96 -__96: - i++ - goto __95 - goto __97 -__97: - ; - (*AggInfo)(unsafe.Pointer(pAggInfo)).FmxReg = (*Parse)(unsafe.Pointer(pParse)).FnMem + analyzeAggFuncArgs(tls, pAggInfo, bp+152) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { - goto __99 + goto __95 } goto select_end -__99: +__95: ; if !(pGroupBy != 0) { - goto __100 + goto __96 } pDistinct = uintptr(0) distFlag = U16(0) @@ -90097,24 +90904,24 @@ __99: (*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 __102 + goto __98 } - 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) + pExpr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) + 8)).FpExpr + pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) pDistinct = Xsqlite3ExprListDup(tls, db, pGroupBy, 0) - pDistinct = Xsqlite3ExprListAppend(tls, pParse, pDistinct, pExpr1) + pDistinct = Xsqlite3ExprListAppend(tls, pParse, pDistinct, pExpr) if pDistinct != 0 { distFlag = uint16(WHERE_WANT_DISTINCT | WHERE_AGG_DISTINCT) } else { distFlag = uint16(0) } -__102: +__98: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) pKeyInfo1 = Xsqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, 0, (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) addrSortingIdx = Xsqlite3VdbeAddOp4(tls, v, OP_SorterOpen, - (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn, + (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn), 0, pKeyInfo1, -8) iUseFlag = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -90147,27 +90954,34 @@ __102: return 0 }()|int32(distFlag)), 0) if !(pWInfo == uintptr(0)) { - goto __103 + goto __99 } Xsqlite3ExprListDelete(tls, db, pDistinct) goto select_end -__103: +__99: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FpIdxEpr != 0) { + goto __100 + } + optimizeAggregateUseOfIndexedExpr(tls, pParse, p, pAggInfo, bp+152) +__100: ; + assignAggregateRegisters(tls, pParse, pAggInfo) eDist = Xsqlite3WhereIsDistinct(tls, pWInfo) if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __104 + goto __101 } groupBySort = 0 - goto __105 -__104: + goto __102 +__101: 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 + 19693 + return ts + 19786 } - return ts + 19702 + return ts + 19795 }()) groupBySort = 1 @@ -90175,47 +90989,47 @@ __104: nCol = nGroupBy j = nGroupBy i = 0 -__106: +__103: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __108 + goto __105 } - if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) { - goto __109 + if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*24)).FiSorterColumn) >= j) { + goto __106 } nCol++ j++ -__109: +__106: ; - goto __107 -__107: + goto __104 +__104: i++ - goto __106 - goto __108 -__108: + goto __103 + goto __105 +__105: ; regBase = Xsqlite3GetTempRange(tls, pParse, nCol) Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0)) j = nGroupBy (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) i = 0 -__110: +__107: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { - goto __112 + goto __109 } - pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32 + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*24 if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) { - goto __113 + goto __110 } Xsqlite3ExprCode(tls, pParse, (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ -__113: +__110: ; - goto __111 -__111: + goto __108 +__108: i++ - goto __110 - goto __112 -__112: + goto __107 + goto __109 +__109: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(0) regRecord = Xsqlite3GetTempReg(tls, pParse) @@ -90231,45 +91045,51 @@ __112: Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) (*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1) -__105: +__102: + ; + if !((*Parse)(unsafe.Pointer(pParse)).FpIdxEpr != 0) { + goto __111 + } + aggregateConvertIndexedExprRefToColumn(tls, pAggInfo) +__111: ; if !(orderByGrp != 0 && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_GroupByOrder) == U32(0) && (groupBySort != 0 || Xsqlite3WhereIsSorted(tls, pWInfo) != 0)) { - goto __114 + goto __112 } (*SortCtx)(unsafe.Pointer(bp + 48)).FpOrderBy = uintptr(0) Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48)).FaddrSortIndex) -__114: +__112: ; addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v) if !(groupBySort != 0) { - goto __115 + goto __113 } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, sortOut, sortPTab) -__115: +__113: ; j = 0 -__116: +__114: if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { - goto __118 + goto __116 } if !(groupBySort != 0) { - goto __119 + goto __117 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, iBMem+j) - goto __120 -__119: + goto __118 +__117: (*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pGroupBy+8+uintptr(j)*32)).FpExpr, iBMem+j) -__120: +__118: ; - goto __117 -__117: + goto __115 +__115: j++ + goto __114 goto __116 - goto __118 -__118: +__116: ; Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr, Xsqlite3KeyInfoRef(tls, pKeyInfo1), -8) @@ -90288,16 +91108,16 @@ __118: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag) if !(groupBySort != 0) { - goto __121 + goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop) - goto __122 -__121: + goto __120 +__119: ; Xsqlite3WhereEnd(tls, pWInfo) Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx) -__122: +__120: ; Xsqlite3ExprListDelete(tls, db, pDistinct) @@ -90328,16 +91148,16 @@ __122: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset) if !(int32(distFlag) != 0 && eDist != WHERE_DISTINCT_NOOP) { - goto __123 + goto __121 } pF = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) -__123: +__121: ; - goto __101 -__100: + goto __97 +__96: if !(libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo)) != uintptr(0)) { - goto __124 + goto __122 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab1)).FpSchema) @@ -90350,98 +91170,101 @@ __100: 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 __126 + goto __124 } pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1) -__126: +__124: ; if !!(int32(*(*uint16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8 + 60 + 4))&0x1>>0) != 0) { - goto __127 + goto __125 } pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex -__128: +__126: if !(pIdx != 0) { - goto __130 + goto __128 } if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x4>>2) == 0 && int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab1)).FszTabRow) && (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) && (!(pBest != 0) || int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Index)(unsafe.Pointer(pBest)).FszIdxRow))) { - goto __131 + goto __129 } pBest = pIdx -__131: - ; - goto __129 __129: + ; + goto __127 +__127: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext + goto __126 goto __128 - goto __130 -__130: +__128: ; -__127: +__125: ; if !(pBest != 0) { - goto __132 + goto __130 } iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest) -__132: +__130: ; Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1) if !(pKeyInfo2 != 0) { - goto __133 + goto __131 } Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -8) -__133: +__131: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, iCsr, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiMem) + assignAggregateRegisters(tls, pParse, pAggInfo) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, iCsr, func() int32 { + return (*AggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg + (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + 0 + }()) Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCsr) explainSimpleCount(tls, pParse, pTab1, pBest) - goto __125 -__124: + goto __123 +__122: regAcc = 0 pDistinct1 = uintptr(0) distFlag1 = U16(0) if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) { - goto __134 + goto __132 } i = 0 -__136: +__134: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __138 + goto __136 } - 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 + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*24)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { + goto __137 } - goto __137 -__139: + goto __135 +__137: ; - 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 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*24)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { + goto __138 } - goto __138 -__140: + goto __136 +__138: ; - goto __137 -__137: + goto __135 +__135: i++ + goto __134 goto __136 - goto __138 -__138: +__136: ; if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { - goto __141 + goto __139 } regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc) -__141: +__139: ; - goto __135 -__134: + goto __133 +__132: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1 && (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0) { - goto __142 + goto __140 } pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32)) @@ -90450,79 +91273,74 @@ __134: } else { distFlag1 = uint16(0) } -__142: +__140: ; -__135: +__133: ; + assignAggregateRegisters(tls, pParse, pAggInfo) + resetAccumulator(tls, pParse, pAggInfo) pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208)), pDistinct1, p, uint16(int32(minMaxFlag)|int32(distFlag1)), 0) if !(pWInfo == uintptr(0)) { - goto __143 + goto __141 } goto select_end -__143: +__141: ; eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo) updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1) if !(eDist1 != WHERE_DISTINCT_NOOP) { - goto __144 + goto __142 } pF1 = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc if !(pF1 != 0) { - goto __145 + goto __143 } fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr) -__145: +__143: ; -__144: +__142: ; if !(regAcc != 0) { - goto __146 + goto __144 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc) -__146: +__144: ; if !(minMaxFlag != 0) { - goto __147 + goto __145 } Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo) -__147: +__145: ; Xsqlite3WhereEnd(tls, pWInfo) finalizeAggFunctions(tls, pParse, pAggInfo) -__125: +__123: ; (*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) -__101: +__97: ; Xsqlite3VdbeResolveLabel(tls, v, addrEnd) __65: ; if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __148 + goto __146 } - explainTempTable(tls, pParse, ts+19693) -__148: + explainTempTable(tls, pParse, ts+19786) +__146: ; if !((*SortCtx)(unsafe.Pointer(bp+48)).FpOrderBy != 0) { - goto __149 + goto __147 } - explainTempTable(tls, pParse, - func() uintptr { - if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19711 - } - return ts + 19734 - }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__149: +__147: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -90619,7 +91437,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19743, 0) + ts+19804, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -90852,7 +91670,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+19808, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19869, 0) goto trigger_cleanup __3: ; @@ -90896,7 +91714,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19854, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+40, pParse, iDb, ts+19915, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+40, pTableName) != 0) { goto __9 } @@ -90914,7 +91732,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19862, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19923, 0) goto trigger_orphan_error __11: ; @@ -90926,7 +91744,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19854, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19915, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -90941,7 +91759,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19903, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19964, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -90953,22 +91771,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8056, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6365, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19929, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19990, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19967, + Xsqlite3ErrorMsg(tls, pParse, ts+20028, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 20004 + return ts + 20065 } - return ts + 20011 + return ts + 20072 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -90977,7 +91795,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+20017, libc.VaList(bp+24, pTableName+8)) + ts+20078, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91006,9 +91824,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91126,7 +91944,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19854, bp+56) + Xsqlite3FixInit(tls, bp+72, pParse, iDb, ts+19915, 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 @@ -91159,7 +91977,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+20063, + ts+20124, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91184,13 +92002,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20111, + ts+20172, 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+20186, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20247, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -91446,7 +92264,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20215, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20276, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -91485,9 +92303,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 + 12070 + return ts + 6373 } - return ts + 5877 + return ts + 5867 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -91499,7 +92317,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20235, + ts+20296, 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) @@ -91613,12 +92431,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20297, + ts+20358, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20345 + return ts + 20406 } - return ts + 20352 + return ts + 20413 }())) __15: ; @@ -91732,7 +92550,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+20359, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20420, 0) return 1 } @@ -91915,8 +92733,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(480) - defer tls.Free(480) + bp := tls.Alloc(488) + defer tls.Free(488) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -91949,8 +92767,8 @@ 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+424, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 424)).FpParse = bp + 8 + libc.Xmemset(tls, bp+432, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 432)).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 @@ -91962,13 +92780,13 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if v != 0 { if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20401, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20462, 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+424, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+432, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92284,7 +93102,8 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC } } pSelect = Xsqlite3SelectNew(tls, pParse, pList, - pSrc, pWhere2, pGrp, uintptr(0), pOrderBy2, uint32(SF_UFSrcCheck|SF_IncludeHidden), pLimit2) + pSrc, pWhere2, pGrp, uintptr(0), pOrderBy2, + uint32(SF_UFSrcCheck|SF_IncludeHidden|SF_UpdateFrom), pLimit2) if pSelect != 0 { *(*U32)(unsafe.Pointer(pSelect + 4)) |= U32(SF_OrderByReqd) } @@ -92554,7 +93373,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20415, + ts+20476, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto update_cleanup __27: @@ -92586,7 +93405,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20451, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20512, 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: @@ -92596,7 +93415,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7637 + return ts + 7697 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24)).FzCnName }(), @@ -93466,7 +94285,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20470) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20531) __169: ; update_cleanup: @@ -93772,10 +94591,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*int8)(unsafe.Pointer(bp + 216)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20483, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216, ts+20544, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20487, libc.VaList(bp+8, bp+216)) + ts+20548, libc.VaList(bp+8, bp+216)) return SQLITE_ERROR } @@ -93866,7 +94685,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+12124, -1) + ts+12134, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -93898,7 +94717,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+20560, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20564, uint64(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20621, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20625, uint64(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94046,14 +94865,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20568) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20629) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20608) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20669) return SQLITE_ERROR __2: ; @@ -94064,7 +94883,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20651) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20712) return SQLITE_ERROR __5: ; @@ -94092,7 +94911,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20669, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20730, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94112,7 +94931,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20692) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20753) goto end_of_vacuum __8: ; @@ -94127,7 +94946,7 @@ __7: Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14477) + rc = execSql(tls, db, pzErrMsg, ts+14487) if !(rc != SQLITE_OK) { goto __9 } @@ -94172,7 +94991,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20719, + ts+20780, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94181,7 +95000,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20827, + ts+20888, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94192,7 +95011,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20881, + ts+20942, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94203,7 +95022,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21032, + ts+21093, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -94425,12 +95244,12 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { (*VTable)(unsafe.Pointer(pVTab)).FnRef-- if (*VTable)(unsafe.Pointer(pVTab)).FnRef == 0 { var p uintptr = (*VTable)(unsafe.Pointer(pVTab)).FpVtab - Xsqlite3VtabModuleUnref(tls, (*VTable)(unsafe.Pointer(pVTab)).Fdb, (*VTable)(unsafe.Pointer(pVTab)).FpMod) if p != 0 { (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(p)).FpModule)).FxDisconnect})).f(tls, p) } + Xsqlite3VtabModuleUnref(tls, (*VTable)(unsafe.Pointer(pVTab)).Fdb, (*VTable)(unsafe.Pointer(pVTab)).FpMod) Xsqlite3DbFree(tls, db, pVTab) } } @@ -94548,7 +95367,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+12351, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12361, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 8)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -94632,11 +95451,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+21162, libc.VaList(bp, pParse+264)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21223, libc.VaList(bp, pParse+272)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21186, + ts+21247, 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, @@ -94646,7 +95465,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21285, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21346, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -94680,7 +95499,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 + 376 + var pArg uintptr = pParse + 384 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 @@ -94707,7 +95526,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+21304, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21365, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -94745,7 +95564,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21346, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21407, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3647, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) @@ -94757,7 +95576,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 + 21376 + var zFormat uintptr = ts + 21437 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -94774,7 +95593,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+16126, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16142, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -94831,7 +95650,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21422, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21483, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) @@ -94889,7 +95708,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, 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+21422, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21483, 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) @@ -94909,8 +95728,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(424) - defer tls.Free(424) + bp := tls.Alloc(432) + defer tls.Free(432) var pCtx uintptr var rc int32 = SQLITE_OK @@ -94923,7 +95742,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, 149843) + return Xsqlite3MisuseError(tls, 151030) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab @@ -95376,7 +96195,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, 150334) + rc = Xsqlite3MisuseError(tls, 151521) } else { ap = va switch op { @@ -95403,7 +96222,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 150352) + rc = Xsqlite3MisuseError(tls, 151539) break } @@ -95634,10 +96453,10 @@ type InLoop = struct { 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 + 21441 + return ts + 21502 } if i == -1 { - return ts + 16235 + return ts + 16251 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*24)).FzCnName } @@ -95646,15 +96465,15 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21448, 5) + Xsqlite3_str_append(tls, pStr, ts+21509, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21454, 1) + Xsqlite3_str_append(tls, pStr, ts+21515, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12741, 1) + Xsqlite3_str_append(tls, pStr, ts+12751, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -95665,11 +96484,11 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21454, 1) + Xsqlite3_str_append(tls, pStr, ts+21515, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12741, 1) + Xsqlite3_str_append(tls, pStr, ts+12751, 1) } Xsqlite3_str_append(tls, pStr, ts+4992, 1) } @@ -95691,27 +96510,27 @@ 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+21456, 2) + Xsqlite3_str_append(tls, pStr, ts+21517, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21448, 5) + Xsqlite3_str_append(tls, pStr, ts+21509, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21459 + return ts + 21520 } - return ts + 21464 + return ts + 21525 }(), 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+21472) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21533) 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+21474) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21535) } Xsqlite3_str_append(tls, pStr, ts+4941, 1) } @@ -95754,11 +96573,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+96, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21476, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21537, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21482 + return ts + 21543 } - return ts + 21489 + return ts + 21550 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -95768,43 +96587,43 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10898 + zFmt = ts + 10960 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21494 + zFmt = ts + 21555 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21527 + zFmt = ts + 21588 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21552 + zFmt = ts + 21613 } else { - zFmt = ts + 21570 + zFmt = ts + 21631 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21579, 7) + Xsqlite3_str_append(tls, bp+64, ts+21640, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp int8 - var zRowid uintptr = ts + 16235 - Xsqlite3_str_appendf(tls, bp+64, ts+21587, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16251 + Xsqlite3_str_appendf(tls, bp+64, ts+21648, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = int8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21618, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21679, libc.VaList(bp+32, zRowid)) cRangeOp = int8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = int8('>') } else { cRangeOp = int8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21628, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21689, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21633, + Xsqlite3_str_appendf(tls, bp+64, ts+21694, 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+21660, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21721, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -95836,28 +96655,29 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+56, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21671, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21732, 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+21459, 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+21520, 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+21692, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21753, 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+21448, 5) + Xsqlite3_str_append(tls, bp+24, ts+21509, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21459, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21520, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4941, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) + return ret } @@ -95918,52 +96738,58 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb + var pSelect uintptr var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { - var pOrigRhs uintptr - var pOrigLhs uintptr - var pRhs uintptr = uintptr(0) - var pLhs uintptr = uintptr(0) - var i int32 - var pSelect uintptr + for pSelect = *(*uintptr)(unsafe.Pointer(pNew + 32)); pSelect != 0; pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior { + var pOrigRhs uintptr + var pOrigLhs uintptr = uintptr(0) + var pRhs uintptr = uintptr(0) + var pLhs uintptr = uintptr(0) + var i int32 - pOrigRhs = (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 32)))).FpEList + pOrigRhs = (*Select)(unsafe.Pointer(pSelect)).FpEList - pOrigLhs = *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 32)) - for i = iEq; i < int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm); i++ { - if (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { - var iField int32 + if pSelect == *(*uintptr)(unsafe.Pointer(pNew + 32)) { + pOrigLhs = *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 32)) + } + for i = iEq; i < int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm); i++ { + if (*WhereTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)))).FpExpr == pX { + var iField int32 - iField = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)) + 32 + 4)) - 1 - if (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*32)).FpExpr == uintptr(0) { - continue + iField = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*8)) + 32 + 4)) - 1 + if (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*32)).FpExpr == uintptr(0) { + continue + } + pRhs = Xsqlite3ExprListAppend(tls, pParse, pRhs, (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*32)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pOrigRhs + 8 + uintptr(iField)*32)).FpExpr = uintptr(0) + if pOrigLhs != 0 { + pLhs = Xsqlite3ExprListAppend(tls, pParse, pLhs, (*ExprList_item)(unsafe.Pointer(pOrigLhs+8+uintptr(iField)*32)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pOrigLhs + 8 + uintptr(iField)*32)).FpExpr = uintptr(0) + } } - pRhs = Xsqlite3ExprListAppend(tls, pParse, pRhs, (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*32)).FpExpr) - (*ExprList_item)(unsafe.Pointer(pOrigRhs + 8 + uintptr(iField)*32)).FpExpr = uintptr(0) - - pLhs = Xsqlite3ExprListAppend(tls, pParse, pLhs, (*ExprList_item)(unsafe.Pointer(pOrigLhs+8+uintptr(iField)*32)).FpExpr) - (*ExprList_item)(unsafe.Pointer(pOrigLhs + 8 + uintptr(iField)*32)).FpExpr = uintptr(0) } - } - Xsqlite3ExprListDelete(tls, db, pOrigRhs) - Xsqlite3ExprListDelete(tls, db, pOrigLhs) - *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 32)) = pLhs - (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 32)))).FpEList = pRhs - if pLhs != 0 && (*ExprList)(unsafe.Pointer(pLhs)).FnExpr == 1 { - var p uintptr = (*ExprList_item)(unsafe.Pointer(pLhs + 8)).FpExpr - (*ExprList_item)(unsafe.Pointer(pLhs + 8)).FpExpr = uintptr(0) - Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pNew)).FpLeft) - (*Expr)(unsafe.Pointer(pNew)).FpLeft = p - } - pSelect = *(*uintptr)(unsafe.Pointer(pNew + 32)) - if (*Select)(unsafe.Pointer(pSelect)).FpOrderBy != 0 { - var pOrderBy uintptr = (*Select)(unsafe.Pointer(pSelect)).FpOrderBy - for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { - *(*U16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 24)) = U16(0) + Xsqlite3ExprListDelete(tls, db, pOrigRhs) + if pOrigLhs != 0 { + Xsqlite3ExprListDelete(tls, db, pOrigLhs) + *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 32)) = pLhs + } + (*Select)(unsafe.Pointer(pSelect)).FpEList = pRhs + if pLhs != 0 && (*ExprList)(unsafe.Pointer(pLhs)).FnExpr == 1 { + var p uintptr = (*ExprList_item)(unsafe.Pointer(pLhs + 8)).FpExpr + (*ExprList_item)(unsafe.Pointer(pLhs + 8)).FpExpr = uintptr(0) + Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pNew)).FpLeft) + (*Expr)(unsafe.Pointer(pNew)).FpLeft = p + } + if (*Select)(unsafe.Pointer(pSelect)).FpOrderBy != 0 { + var pOrderBy uintptr = (*Select)(unsafe.Pointer(pSelect)).FpOrderBy + for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { + *(*U16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 24)) = U16(0) + } } - } + } } return pNew } @@ -97441,7 +98267,7 @@ __134: ; __126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21700, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21761, 0) ii = 0 __135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { @@ -97469,7 +98295,7 @@ __139: pOrExpr = pAndExpr __140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21715, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21776, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -97987,7 +98813,7 @@ func Xsqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe var mAll Bitmask = uint64(0) var k int32 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21785, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 @@ -98345,10 +99171,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16084, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15415, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14941, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21738, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16100, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15431, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14951, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21799, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -98725,49 +99551,38 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { return mask } -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, aiCurCol uintptr, pExpr uintptr, j int32) int32 { var pIdx uintptr var i int32 var iCur int32 - i = 0 -__1: - if !(mPrereq > uint64(1)) { - goto __3 - } - { - } - goto __2 -__2: - i++ - mPrereq >>= 1 - goto __1 - goto __3 -__3: - ; - iCur = (*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(i)*104)).FiCursor - for pIdx = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(i)*104)).FpTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { - if (*Index)(unsafe.Pointer(pIdx)).FaColExpr == uintptr(0) { - continue - } - for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { - if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) != -2 { + for __ccgo := true; __ccgo; __ccgo = libc.PreIncInt32(&j, 1) < (*SrcList)(unsafe.Pointer(pFrom)).FnSrc { + iCur = (*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(j)*104)).FiCursor + for pIdx = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(j)*104)).FpTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + if (*Index)(unsafe.Pointer(pIdx)).FaColExpr == uintptr(0) { continue } + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) != -2 { + continue + } - if Xsqlite3ExprCompareSkip(tls, pExpr, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, iCur) == 0 { - *(*int32)(unsafe.Pointer(aiCurCol)) = iCur - *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 - return 1 + if Xsqlite3ExprCompareSkip(tls, pExpr, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, iCur) == 0 && + int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_STRING { + *(*int32)(unsafe.Pointer(aiCurCol)) = iCur + *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = -2 + return 1 + } } } } return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, aiCurCol uintptr, pExpr uintptr, op int32) int32 { + var i int32 + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VECTOR && (op >= TK_GT && op <= TK_GE) { pExpr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8)).FpExpr - } if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { @@ -98775,13 +99590,16 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol *(*int32)(unsafe.Pointer(aiCurCol + 1*4)) = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) return 1 } - if mPrereq == uint64(0) { - return 0 - } - if mPrereq&(mPrereq-uint64(1)) != uint64(0) { - return 0 + + for i = 0; i < (*SrcList)(unsafe.Pointer(pFrom)).FnSrc; i++ { + var pIdx uintptr + for pIdx = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(i)*104)).FpTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { + if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 { + return exprMightBeIndexed2(tls, pFrom, aiCurCol, pExpr, i) + } + } } - return exprMightBeIndexed2(tls, pFrom, mPrereq, aiCurCol, pExpr) + return 0 } func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { @@ -98846,12 +99664,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21745, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21806, 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+21745, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21806, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -98875,7 +99693,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { pLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 32)) + 8 + uintptr(*(*int32)(unsafe.Pointer(pTerm + 32 + 4))-1)*32)).FpExpr } - if exprMightBeIndexed(tls, pSrc, prereqLeft, bp, pLeft, op) != 0 { + if exprMightBeIndexed(tls, pSrc, bp, pLeft, op) != 0 { (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = *(*int32)(unsafe.Pointer(bp)) *(*int32)(unsafe.Pointer(pTerm + 32)) = *(*int32)(unsafe.Pointer(bp + 1*4)) @@ -98885,7 +99703,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_IS) } if pRight != 0 && - exprMightBeIndexed(tls, pSrc, (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight, bp, pRight, op) != 0 && + exprMightBeIndexed(tls, pSrc, bp, pRight, op) != 0 && !((*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FixedCol) != U32(0)) { var pNew uintptr var pDup uintptr @@ -98930,7 +99748,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 + 6693 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6753 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99024,7 +99842,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { - return ts + 21786 + return ts + 21847 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99035,7 +99853,6 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { transferJoinMarkings(tls, pNewExpr1, pExpr) idxNew1 = whereClauseInsert(tls, pWC, pNewExpr1, wtFlags) - exprAnalyze(tls, pSrc, pWC, idxNew1) pNewExpr2 = Xsqlite3ExprDup(tls, db, pLeft, 0) pNewExpr2 = Xsqlite3PExpr(tls, pParse, TK_LT, Xsqlite3ExprAddCollateString(tls, pParse, pNewExpr2, zCollSeqName), @@ -99043,6 +99860,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { transferJoinMarkings(tls, pNewExpr2, pExpr) idxNew2 = whereClauseInsert(tls, pWC, pNewExpr2, wtFlags) + exprAnalyze(tls, pSrc, pWC, idxNew1) exprAnalyze(tls, pSrc, pWC, idxNew2) pTerm = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { @@ -99076,7 +99894,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { *(*int32)(unsafe.Pointer(pTerm + 32 + 4)) == 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && - (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpPrior == uintptr(0) && + ((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpPrior == uintptr(0) || (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselFlags&U32(SF_Values) != 0) && (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpWin == uintptr(0) && int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { var i int32 @@ -99229,6 +100047,9 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*56)).FwtFlags)&TERM_CODED != 0 { continue } + if (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*56)).FnChild != 0 { + continue + } if (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*56)).FleftCursor != iCsr { return } @@ -99397,7 +100218,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21793, + Xsqlite3ErrorMsg(tls, pParse, ts+21854, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100131,7 +100952,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21829, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21890, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*24)).FzCnName)) sentWarning = U8(1) __6: @@ -100202,7 +101023,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21855 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21916 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -100709,7 +101530,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro var iTest int32 var res int32 var nField int32 - var iLower TRowcnt = TRowcnt(0) + var iLower TRowcnt = uint64(0) _ = pParse @@ -100729,7 +101550,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro iSamp = iTest / nField if iSamp > 0 { for n = iTest%nField + 1; n < nField; n++ { - if *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp-1)*40)).FanLt + uintptr(n-1)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*4)) { + if *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp-1)*40)).FanLt + uintptr(n-1)*8)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*8)) { break } } @@ -100740,10 +101561,10 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro (*UnpackedRecord)(unsafe.Pointer(pRec)).FnField = U16(n) res = Xsqlite3VdbeRecordCompare(tls, (*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).Fn, (*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).Fp, pRec) if res < 0 { - iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*4)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanEq + uintptr(n-1)*4)) + iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*8)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanEq + uintptr(n-1)*8)) iMin = iTest + 1 } else if res == 0 && n < nField { - iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*4)) + iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*40)).FanLt + uintptr(n-1)*8)) iMin = iTest + 1 res = -1 } else { @@ -100754,29 +101575,29 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro i = iSample / nField if res == 0 { - *(*TRowcnt)(unsafe.Pointer(aStat)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) - *(*TRowcnt)(unsafe.Pointer(aStat + 1*4)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*4)) + *(*TRowcnt)(unsafe.Pointer(aStat)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*8)) + *(*TRowcnt)(unsafe.Pointer(aStat + 1*8)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*8)) } else { var iUpper TRowcnt var iGap TRowcnt if i >= (*Index)(unsafe.Pointer(pIdx)).FnSample { iUpper = (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 } else { - iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*4)) + iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanLt + uintptr(iCol)*8)) } if iLower >= iUpper { - iGap = TRowcnt(0) + iGap = uint64(0) } else { iGap = iUpper - iLower } if roundUp != 0 { - iGap = iGap * TRowcnt(2) / TRowcnt(3) + iGap = iGap * uint64(2) / uint64(3) } else { - iGap = iGap / TRowcnt(3) + iGap = iGap / uint64(3) } *(*TRowcnt)(unsafe.Pointer(aStat)) = iLower + iGap - *(*TRowcnt)(unsafe.Pointer(aStat + 1*4)) = *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nField-1)*4)) + *(*TRowcnt)(unsafe.Pointer(aStat + 1*8)) = *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nField-1)*8)) } (*UnpackedRecord)(unsafe.Pointer(pRec)).FnField = U16(nField) @@ -100878,8 +101699,8 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper } func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr) int32 { - bp := tls.Alloc(28) - defer tls.Free(28) + bp := tls.Alloc(36) + defer tls.Free(36) var rc int32 = SQLITE_OK var nOut int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnOut) @@ -100891,7 +101712,7 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u if (*Index)(unsafe.Pointer(p)).FnSample > 0 && nEq < (*Index)(unsafe.Pointer(p)).FnSampleCol && (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { if nEq == (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid { - *(*uintptr)(unsafe.Pointer(bp + 8)) = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec + *(*uintptr)(unsafe.Pointer(bp + 16)) = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec var nBtm int32 = int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))) var nTop int32 = int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))) @@ -100901,17 +101722,17 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u var iLwrIdx int32 = -2 var iUprIdx int32 = -1 - if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - (*UnpackedRecord)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FnField = U16((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid) + if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { + (*UnpackedRecord)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FnField = U16((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid) } if nEq == 0 { - iLower = TRowcnt(0) + iLower = uint64(0) iUpper = (*Index)(unsafe.Pointer(p)).FnRowEst0 } else { - whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8)), 0, bp) + whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 16)), 0, bp) iLower = *(*TRowcnt)(unsafe.Pointer(bp)) - iUpper = *(*TRowcnt)(unsafe.Pointer(bp)) + *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) + iUpper = *(*TRowcnt)(unsafe.Pointer(bp)) + *(*TRowcnt)(unsafe.Pointer(bp + 1*8)) } if *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSortOrder + uintptr(nEq))) != 0 { @@ -100931,19 +101752,19 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u if pLower != 0 { var pExpr uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pLower)).FpExpr)).FpRight - rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8, pExpr, nBtm, nEq, bp+16) - if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 16)) != 0 { + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+16, pExpr, nBtm, nEq, bp+24) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 24)) != 0 { var iNew TRowcnt var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) - if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 16)) { + if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 24)) { mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) } - iLwrIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8)), 0, bp) - iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint32 { + iLwrIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 16)), 0, bp) + iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint64 { if int32((*WhereTerm)(unsafe.Pointer(pLower)).FeOperator)&int32(mask) != 0 { - return *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) + return *(*TRowcnt)(unsafe.Pointer(bp + 1*8)) } - return uint32(0) + return uint64(0) }() if iNew > iLower { iLower = iNew @@ -100955,19 +101776,19 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u if pUpper != 0 { var pExpr uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pUpper)).FpExpr)).FpRight - rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8, pExpr, nTop, nEq, bp+20) - if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 20)) != 0 { + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+16, pExpr, nTop, nEq, bp+28) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 28)) != 0 { var iNew TRowcnt var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) - if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 20)) { + if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 28)) { mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) } - iUprIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8)), 1, bp) - iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint32 { + iUprIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 16)), 1, bp) + iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint64 { if int32((*WhereTerm)(unsafe.Pointer(pUpper)).FeOperator)&int32(mask) != 0 { - return *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) + return *(*TRowcnt)(unsafe.Pointer(bp + 1*8)) } - return uint32(0) + return uint64(0) }() if iNew < iUpper { iUpper = iNew @@ -100977,10 +101798,10 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u } } - (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec = *(*uintptr)(unsafe.Pointer(bp + 8)) + (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec = *(*uintptr)(unsafe.Pointer(bp + 16)) if rc == SQLITE_OK { if iUpper > iLower { - nNew = Xsqlite3LogEst(tls, uint64(iUpper-iLower)) + nNew = Xsqlite3LogEst(tls, iUpper-iLower) if iLwrIdx == iUprIdx { nNew = int16(int32(nNew) - 20) @@ -100994,9 +101815,9 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u } } else { - *(*int32)(unsafe.Pointer(bp + 24)) = 0 - rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+24) - if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { + *(*int32)(unsafe.Pointer(bp + 32)) = 0 + rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+32) + if *(*int32)(unsafe.Pointer(bp + 32)) != 0 { return rc } } @@ -101021,8 +101842,8 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u } func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr uintptr, pnRow uintptr) int32 { - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(32) + defer tls.Free(32) var p uintptr = *(*uintptr)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + 24 + 8)) var nEq int32 = int32(*(*U16)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + 24))) @@ -101034,7 +101855,7 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui } if nEq >= int32((*Index)(unsafe.Pointer(p)).FnColumn) { - *(*TRowcnt)(unsafe.Pointer(pnRow)) = TRowcnt(1) + *(*TRowcnt)(unsafe.Pointer(pnRow)) = uint64(1) return SQLITE_OK } @@ -101048,23 +101869,23 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui } (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = nEq - whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp)), 0, bp+12) + whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp)), 0, bp+16) - *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 12 + 1*4)) + *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 16 + 1*8)) return rc } func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintptr, pnRow uintptr) int32 { - bp := tls.Alloc(4) - defer tls.Free(4) + bp := tls.Alloc(8) + defer tls.Free(8) var p uintptr = *(*uintptr)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew + 24 + 8)) var nRow0 I64 = I64(Xsqlite3LogEstToInt(tls, *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaiRowLogEst)))) var nRecValid int32 = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid var rc int32 = SQLITE_OK - var nRowEst TRowcnt = TRowcnt(0) + var nRowEst TRowcnt = uint64(0) var i int32 for i = 0; rc == SQLITE_OK && i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { @@ -101075,7 +101896,7 @@ func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintp } if rc == SQLITE_OK { - if I64(nRowEst) > nRow0 { + if nRowEst > TRowcnt(nRow0) { nRowEst = TRowcnt(nRow0) } *(*TRowcnt)(unsafe.Pointer(pnRow)) = nRowEst @@ -101397,6 +102218,7 @@ __1: } } if j < 0 { + Xsqlite3ProgressCheck(tls, (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse) if (*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf == (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator)&0x3f != 0 || int32((*SrcItem)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpTabList+8+uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104)).Ffg.Fjointype)& @@ -101490,8 +102312,8 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr } func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { - bp := tls.Alloc(116) - defer tls.Free(116) + bp := tls.Alloc(120) + defer tls.Free(120) var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse @@ -101515,8 +102337,9 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb var pBtm uintptr = uintptr(0) pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { - return SQLITE_NOMEM + + if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { + return (*Parse)(unsafe.Pointer(pParse)).Frc } if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { @@ -101668,7 +102491,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*LogEst)(unsafe.Pointer(pNew + 22)) += LogEst(int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb)) *(*LogEst)(unsafe.Pointer(pNew + 22)) -= LogEst(nIn) } else { - *(*TRowcnt)(unsafe.Pointer(bp + 112)) = TRowcnt(0) + *(*TRowcnt)(unsafe.Pointer(bp + 112)) = uint64(0) if int32(nInMul) == 0 && (*Index)(unsafe.Pointer(pProbe)).FnSample != 0 && int32(*(*U16)(unsafe.Pointer(pNew + 24))) <= (*Index)(unsafe.Pointer(pProbe)).FnSampleCol && @@ -101687,7 +102510,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb break } if *(*TRowcnt)(unsafe.Pointer(bp + 112)) != 0 { - (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = Xsqlite3LogEst(tls, uint64(*(*TRowcnt)(unsafe.Pointer(bp + 112)))) + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = Xsqlite3LogEst(tls, *(*TRowcnt)(unsafe.Pointer(bp + 112))) if nEq == 1 && int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut)+10 > int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst))) { *(*U16)(unsafe.Pointer(pTerm + 18)) |= U16(TERM_HIGHTRUTH) @@ -101701,7 +102524,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*LogEst)(unsafe.Pointer(pNew + 22)) -= LogEst(nIn) } } - if *(*TRowcnt)(unsafe.Pointer(bp + 112)) == TRowcnt(0) { + if *(*TRowcnt)(unsafe.Pointer(bp + 112)) == uint64(0) { *(*LogEst)(unsafe.Pointer(pNew + 22)) += LogEst(int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(nEq)*2))) - int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(nEq-1)*2)))) if int32(eOp)&WO_ISNULL != 0 { *(*LogEst)(unsafe.Pointer(pNew + 22)) += int16(10) @@ -101710,9 +102533,13 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb } } - rCostIdx = LogEst(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut) + 1 + 15*int32((*Index)(unsafe.Pointer(pProbe)).FszIdxRow)/int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FszTabRow)) + if int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x3>>0) == SQLITE_IDXTYPE_IPK { + rCostIdx = LogEst(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut) + 16) + } else { + rCostIdx = LogEst(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut) + 1 + 15*int32((*Index)(unsafe.Pointer(pProbe)).FszIdxRow)/int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FszTabRow)) + } (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = Xsqlite3LogEstAdd(tls, rLogSize, rCostIdx) - if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_IDX_ONLY|WHERE_IPK) == U32(0) { + if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_IDX_ONLY|WHERE_IPK|WHERE_EXPRIDX) == U32(0) { (*WhereLoop)(unsafe.Pointer(pNew)).FrRun = Xsqlite3LogEstAdd(tls, (*WhereLoop)(unsafe.Pointer(pNew)).FrRun, int16(int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut)+16)) } @@ -101731,6 +102558,9 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb if (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags&U32(WHERE_TOP_LIMIT) == U32(0) && int32(*(*U16)(unsafe.Pointer(pNew + 24))) < int32((*Index)(unsafe.Pointer(pProbe)).FnColumn) && (int32(*(*U16)(unsafe.Pointer(pNew + 24))) < int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol) || int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x3>>0) != SQLITE_IDXTYPE_PRIMARYKEY) { + if int32(*(*U16)(unsafe.Pointer(pNew + 24))) > 3 { + Xsqlite3ProgressCheck(tls, pParse) + } whereLoopAddBtreeIndex(tls, pBuilder, pSrc, pProbe, int16(int32(nInMul)+nIn)) } (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut @@ -101858,30 +102688,49 @@ __3: return 0 } +func exprIsCoveredByIndex(tls *libc.TLS, pExpr uintptr, pIdx uintptr, iTabCur int32) int32 { + var i int32 + for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { + if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) == -2 && + Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, iTabCur) == 0 { + return 1 + } + } + return 0 +} + +// Structure passed to the whereIsCoveringIndex Walker callback. +type CoveringIndexCheck = CoveringIndexCheck1 + 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) { + var pCk uintptr + + pCk = *(*uintptr)(unsafe.Pointer(pWalk + 40)) + pIdx = (*CoveringIndexCheck)(unsafe.Pointer(pCk)).FpIdx + if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { + if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(pCk)).FiTabCur { return WRC_Continue } + pIdx = (*CoveringIndexCheck1)(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 + } + } + (*CoveringIndexCheck)(unsafe.Pointer(pCk)).FbUnidx = U8(1) + return WRC_Abort + } else if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 && + exprIsCoveredByIndex(tls, pExpr, pIdx, (*CoveringIndexCheck1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur) != 0 { + (*CoveringIndexCheck)(unsafe.Pointer(pCk)).FbExpr = U8(1) + return WRC_Prune } - (*Walker)(unsafe.Pointer(pWalk)).FeCode = U16(1) - return WRC_Abort + return WRC_Continue } func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur int32) U32 { @@ -101889,20 +102738,25 @@ func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur i defer tls.Free(64) var i int32 + var rc int32 if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect == uintptr(0) { - return U32(1) + return U32(0) } - 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 int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11) == 0 { + 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(0) } } - 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 + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 48)).FpIdx = pIdx + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 48)).FiTabCur = iTabCur + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 48)).FbExpr = U8(0) + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 48)).FbUnidx = U8(0) 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 @@ -101911,9 +102765,15 @@ func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur i 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) + if (*CoveringIndexCheck1)(unsafe.Pointer(bp+48)).FbUnidx != 0 { + rc = 0 + } else if (*CoveringIndexCheck1)(unsafe.Pointer(bp+48)).FbExpr != 0 { + rc = WHERE_EXPRIDX + } else { + rc = WHERE_IDX_ONLY + } + return U32(rc) } func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { @@ -101954,7 +102814,7 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { (*Index)(unsafe.Pointer(bp)).FaiRowLogEst = bp + 154 (*Index)(unsafe.Pointer(bp)).FonError = U8(OE_Replace) (*Index)(unsafe.Pointer(bp)).FpTable = pTab - (*Index)(unsafe.Pointer(bp)).FszIdxRow = (*Table)(unsafe.Pointer(pTab)).FszTabRow + (*Index)(unsafe.Pointer(bp)).FszIdxRow = int16(3) libc.SetBitFieldPtr16Uint32(bp+100, uint32(SQLITE_IDXTYPE_IPK), 0, 0x3) *(*LogEst)(unsafe.Pointer(bp + 154)) = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst *(*LogEst)(unsafe.Pointer(bp + 154 + 1*2)) = int16(0) @@ -101994,7 +102854,8 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Ephemeral) == U32(0) { *(*LogEst)(unsafe.Pointer(pNew + 18)) += int16(28) } else { - *(*LogEst)(unsafe.Pointer(pNew + 18)) -= int16(10) + *(*LogEst)(unsafe.Pointer(pNew + 18)) -= int16(25) + } if int32((*WhereLoop)(unsafe.Pointer(pNew)).FrSetup) < 0 { @@ -102060,19 +102921,24 @@ __1: } else { var m Bitmask if uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x20>>5)) != 0 { - (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_IDX_ONLY | WHERE_INDEXED) m = uint64(0) + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_IDX_ONLY | WHERE_INDEXED) } 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) + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_INDEXED) + if m == uint64(1)<<(int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1) || uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x800>>11)) != 0 && !(int32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x400>>10) != 0) && m != uint64(0) { + var isCov U32 = whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor) + if isCov == U32(0) { + } else { + m = uint64(0) + *(*U32)(unsafe.Pointer(pNew + 56)) |= isCov + if isCov&U32(WHERE_IDX_ONLY) != 0 { + } else { + } } - return uint32(WHERE_INDEXED) - }() + } else if m == uint64(0) { + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_IDX_ONLY | WHERE_INDEXED) + } } if b != 0 || @@ -102253,7 +103119,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+21866, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21927, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102311,7 +103177,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+21866, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21927, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102709,7 +103575,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+21892, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21953, 0) rc = SQLITE_OK } else { goto __3 @@ -102920,8 +103786,8 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, continue } } else { - var pIdxExpr uintptr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaColExpr + 8 + uintptr(j)*32)).FpExpr - if Xsqlite3ExprCompareSkip(tls, pOBExpr, pIdxExpr, iCur) != 0 { + var pIxExpr uintptr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaColExpr + 8 + uintptr(j)*32)).FpExpr + if Xsqlite3ExprCompareSkip(tls, pOBExpr, pIxExpr, iCur) != 0 { continue } } @@ -103040,14 +103906,23 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { } func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { - var rScale LogEst var rSortCost LogEst + var nCol LogEst - rScale = LogEst(int32(Xsqlite3LogEst(tls, uint64((nOrderBy-nSorted)*100/nOrderBy))) - 66) - rSortCost = LogEst(int32(nRow) + int32(rScale) + 16) + nCol = Xsqlite3LogEst(tls, uint64(((*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FpEList)).FnExpr+59)/30)) + rSortCost = LogEst(int32(nRow) + int32(nCol)) + if nSorted > 0 { + rSortCost = LogEst(int32(rSortCost) + (int32(Xsqlite3LogEst(tls, uint64((nOrderBy-nSorted)*100/nOrderBy))) - 66)) + } - if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_USE_LIMIT != 0 && int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit) < int32(nRow) { - nRow = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_USE_LIMIT != 0 { + rSortCost = int16(int32(rSortCost) + 10) + if nSorted != 0 { + rSortCost = int16(int32(rSortCost) + 6) + } + if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit) < int32(nRow) { + nRow = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiLimit + } } else if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&WHERE_WANT_DISTINCT != 0 { if int32(nRow) > 10 { nRow = int16(int32(nRow) - 10) @@ -103199,7 +104074,7 @@ __3: pWInfo, nRowEst, nOrderBy, int32(isOrdered)) } - rCost = LogEst(int32(Xsqlite3LogEstAdd(tls, rUnsorted, *(*LogEst)(unsafe.Pointer(aSortCost + uintptr(isOrdered)*2)))) + 5) + rCost = LogEst(int32(Xsqlite3LogEstAdd(tls, rUnsorted, *(*LogEst)(unsafe.Pointer(aSortCost + uintptr(isOrdered)*2)))) + 3) } else { rCost = rUnsorted @@ -103307,7 +104182,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21927, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21988, 0) Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -103569,19 +104444,21 @@ func whereOmitNoopJoin(tls *libc.TLS, pWInfo uintptr, notReady Bitmask) Bitmask func whereCheckIfBloomFilterIsUseful(tls *libc.TLS, pWInfo uintptr) { var i int32 - var nSearch LogEst + var nSearch LogEst = int16(0) - nSearch = (*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pWInfo + 856)).FpWLoop)).FnOut - for i = 1; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { + for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { 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 && + var pItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat1) == U32(0) { + break + } + *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_StatsUsed) + if i >= 1 && + (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&reqFlags == reqFlags && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_IPK|WHERE_INDEXED) != U32(0) { - var pItem uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pLoop)).FiTab)*104 - var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab - *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_StatsUsed) - if int32(nSearch) > int32((*Table)(unsafe.Pointer(pTab)).FnRowLogEst) && - (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat1) != U32(0) { + if int32(nSearch) > int32((*Table)(unsafe.Pointer(pTab)).FnRowLogEst) { *(*U32)(unsafe.Pointer(pLoop + 56)) |= U32(WHERE_BLOOMFILTER) *(*U32)(unsafe.Pointer(pLoop + 56)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) @@ -103593,9 +104470,9 @@ 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 + for (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr != uintptr(0) { + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr + (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr = (*IndexedExpr)(unsafe.Pointer(p)).FpIENext Xsqlite3ExprDelete(tls, db, (*IndexedExpr)(unsafe.Pointer(p)).FpExpr) Xsqlite3DbFreeNN(tls, db, p) } @@ -103628,13 +104505,13 @@ func whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur in if p == uintptr(0) { break } - (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + (*IndexedExpr)(unsafe.Pointer(p)).FpIENext = (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr (*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 + (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr = p if (*IndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) @@ -103786,7 +104663,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21945, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+22006, libc.VaList(bp, int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))) return uintptr(0) __2: ; @@ -103850,7 +104727,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21973, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22034, 0) goto __5 __4: ii = 0 @@ -104551,7 +105428,7 @@ __4: last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x800>>11)) != 0 { - var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxEpr for p != 0 { if (*IndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { (*IndexedExpr)(unsafe.Pointer(p)).FiDataCur = -1 @@ -104732,7 +105609,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21991, -1) + pCtx, ts+22052, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -104865,7 +105742,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+22047, -1) + pCtx, ts+22108, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -104955,17 +105832,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22092)) -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22103)) -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22114)) -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22119)) -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22132)) -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22142)) -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22148)) -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22159)) -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22169)) -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22181)) -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22186)) +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 22153)) +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 22164)) +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 22175)) +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 22180)) +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 22193)) +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 22203)) +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 22209)) +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22220)) +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22230)) +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22242)) +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22247)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105011,7 +105888,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22190, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22251, libc.VaList(bp, zName)) } return p } @@ -105055,12 +105932,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+22209, 0) + ts+22270, 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+22280, 0) + ts+22341, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105083,7 +105960,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+7862) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7922) } break } @@ -105287,7 +106164,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+22343, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22404, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105403,7 +106280,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+7454)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7514)) } pSub = Xsqlite3SelectNew(tls, @@ -105414,6 +106291,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if (*Select)(unsafe.Pointer(p)).FpSrc != 0 { var pTab2 uintptr (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpSelect = pSub + libc.SetBitFieldPtr16Uint32((*Select)(unsafe.Pointer(p)).FpSrc+8+60+4, uint32(1), 3, 0x8) Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer(p)).FpSrc) *(*U32)(unsafe.Pointer(pSub + 4)) |= U32(SF_Expanded | SF_OrderByReqd) pTab2 = Xsqlite3ResultSetOfSelect(tls, pParse, pSub, int8(SQLITE_AFF_NONE)) @@ -105517,7 +106395,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22369, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22430, 0) goto windowAllocErr __2: ; @@ -105582,15 +106460,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 + 22401 + zErr = ts + 22462 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22418 + zErr = ts + 22479 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22434 + zErr = ts + 22495 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22454, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22515, 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 { @@ -105611,7 +106489,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+22487, 0) + ts+22548, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -105767,11 +106645,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22534, - ts + 22587, - ts + 21991, - ts + 22638, - ts + 22690, + ts + 22595, + ts + 22648, + ts + 22052, + ts + 22699, + ts + 22751, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -106968,8 +107846,7 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin var addrGe int32 = Xsqlite3VdbeAddOp3(tls, v, op, regStart, 0, regEnd) windowAggFinal(tls, bp, 0) - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr, 1) - + Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr) windowReturnOneRow(tls, bp) Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr) Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lblWhereEnd) @@ -106980,13 +107857,10 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin } if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) != TK_UNBOUNDED { - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fstart.Fcsr, 1) - + Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fstart.Fcsr) } - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr, 1) - - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fend.Fcsr, 1) - + Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fcurrent.Fcsr) + Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp)).Fend.Fcsr) if regPeer != 0 && pOrderBy != 0 { Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regNewPeer, regPeer, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr-1) Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regPeer, (*WindowCodeArg)(unsafe.Pointer(bp)).Fstart.Freg, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr-1) @@ -107170,19 +108044,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+22740, + Xsqlite3ErrorMsg(tls, pParse, ts+22801, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19734 + return ts + 22843 } - return ts + 22782 + return ts + 22852 }(), 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+22788, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22858, 0) } } @@ -107250,7 +108124,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+22822, + Xsqlite3ErrorMsg(tls, pParse, ts+22892, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108347,7 +109221,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22860, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22930, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109322,21 +110196,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+16235, 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+22882, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22952, 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+16148, 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+22882, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+8)).Fn, (*Token)(unsafe.Pointer(yymsp+8)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22952, 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)) @@ -110079,7 +110953,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+22909) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8)), ts+22979) 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 { @@ -110243,7 +111117,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+22918, libc.VaList(bp+32, bp+128)) + Xsqlite3ErrorMsg(tls, pParse, ts+22988, 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)) @@ -110460,9 +111334,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 + 6688 + return ts + 6748 } - return ts + 6693 + return ts + 6753 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8))) @@ -110474,6 +111348,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) pRHS = Xsqlite3PExpr(tls, pParse, TK_UPLUS, pRHS, uintptr(0)) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_EQ, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), pRHS) + } else if (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8)))).FnExpr == 1 && int32((*Expr)(unsafe.Pointer(pRHS)).Fop) == TK_SELECT { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) + Xsqlite3PExprAddSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), *(*uintptr)(unsafe.Pointer(pRHS + 32))) + *(*uintptr)(unsafe.Pointer(pRHS + 32)) = uintptr(0) + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8))) } else { *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)), uintptr(0)) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8)) == uintptr(0) { @@ -110741,19 +111620,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+22942, 0) + ts+23012, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+23037, 0) + ts+23107, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23121, 0) + ts+23191, 0) } break case uint32(273): @@ -111132,9 +112011,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22918, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22988, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23206, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23276, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -111902,7 +112781,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+23223, libc.VaList(bp, bp+2464)) + Xsqlite3ErrorMsg(tls, pParse, ts+23293, libc.VaList(bp, bp+2464)) break } } @@ -111925,7 +112804,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3647, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23248, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23318, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112098,7 +112977,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23259, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23329, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112111,11 +112990,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19854, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19915, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23266, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23336, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23271, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23341, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112128,9 +113007,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23281, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23351, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23285, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23355, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112364,7 +113243,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { var rc int32 = SQLITE_OK if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 172925) + return Xsqlite3MisuseError(tls, 174337) } ap = va @@ -112939,7 +113818,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 173699) + return Xsqlite3MisuseError(tls, 175111) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -112954,7 +113833,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23293, 0) + ts+23363, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113145,23 +114024,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 + 23361 + var zErr uintptr = ts + 23431 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23375 + zErr = ts + 23445 break } case SQLITE_ROW: { - zErr = ts + 23397 + zErr = ts + 23467 break } case SQLITE_DONE: { - zErr = ts + 23419 + zErr = ts + 23489 break } @@ -113179,35 +114058,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23442, - ts + 23455, + ts + 23512, + ts + 23525, uintptr(0), - ts + 23471, - ts + 23496, - ts + 23510, - ts + 23529, + ts + 23541, + ts + 23566, + ts + 23580, + ts + 23599, ts + 1474, - ts + 23554, - ts + 23591, - ts + 23603, - ts + 23618, - ts + 23651, - ts + 23669, - ts + 23694, - ts + 23723, + ts + 23624, + ts + 23661, + ts + 23673, + ts + 23688, + ts + 23721, + ts + 23739, + ts + 23764, + ts + 23793, uintptr(0), - ts + 5832, + ts + 5822, ts + 5318, - ts + 23740, - ts + 23758, - ts + 23776, - uintptr(0), ts + 23810, + ts + 23828, + ts + 23846, uintptr(0), - ts + 23831, - ts + 23857, ts + 23880, + uintptr(0), ts + 23901, + ts + 23927, + ts + 23950, + ts + 23971, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113308,6 +114187,12 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { *(*int32)(unsafe.Pointer(db + 432)) = 1 } +// Return true or false depending on whether or not an interrupt is +// pending on connection db. +func Xsqlite3_is_interrupted(tls *libc.TLS, db uintptr) int32 { + return libc.Bool32(*(*int32)(unsafe.Pointer(db + 432)) != 0) +} + // This function is exactly the same as sqlite3_create_function(), except // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code @@ -113322,7 +114207,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, 174328) + return Xsqlite3MisuseError(tls, 175758) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -113367,7 +114252,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+23917, 0) + ts+23987, 0) return SQLITE_BUSY } else { @@ -113484,7 +114369,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23980, libc.VaList(bp, zName)) + ts+24050, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -113720,7 +114605,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+24031, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24101, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -113813,7 +114698,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, 175073)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 176503)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -113883,7 +114768,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, 175152) + return Xsqlite3MisuseError(tls, 176582) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113893,7 +114778,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, 175161) + return Xsqlite3MisuseError(tls, 176591) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -113925,14 +114810,14 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 175209) + return Xsqlite3MisuseError(tls, 176639) } 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+24052, 0) + ts+24122, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -114062,7 +114947,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+24120, uint64(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24190, uint64(5)) == 0) { goto __1 } iOut = 0 @@ -114107,10 +114992,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24126, zUri+7, uint64(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24196, zUri+7, uint64(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24136, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24206, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114215,7 +115100,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24164, zOpt, uint64(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24234, zOpt, uint64(3)) == 0) { goto __29 } zVfs = zVal @@ -114226,17 +115111,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24168, zOpt, uint64(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24238, zOpt, uint64(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24168 + zModeType = ts + 24238 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24174, zOpt, uint64(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24244, zOpt, uint64(4)) == 0) { goto __32 } @@ -114274,7 +115159,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24179, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24249, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114282,7 +115167,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24199, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24269, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114322,7 +115207,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24223, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24293, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114346,15 +115231,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24239, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24246, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24309, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24316, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24254, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24257, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24260, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17330, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24324, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24327, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24330, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17346, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -114500,10 +115385,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+21786, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21847, 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+24264, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24334, 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) { @@ -114517,7 +115402,7 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 175878) + rc = Xsqlite3MisuseError(tls, 177308) goto __17 __16: rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+16, bp+24) @@ -114568,9 +115453,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 + 6365 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6425 (*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 + 23266 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 23336 (*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) @@ -114675,7 +115560,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24270 + zFilename = ts + 24340 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -114778,21 +115663,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+24273, + Xsqlite3_log(tls, iErr, ts+24343, 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+24298) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24368) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24318) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24388) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24325) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24395) } // This is a convenience routine that makes sure that all thread-specific @@ -114950,7 +115835,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24342, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24412, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -115606,7 +116491,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24370, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24440, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -115724,7 +116609,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 + 24378 + return ts + 24448 } return uintptr(0) }(), 0) @@ -115902,7 +116787,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6165, ts + 6688, ts + 6693, ts + 6175, ts + 6170, ts + 7929, ts + 24401, ts + 24407, + ts + 6165, ts + 6748, ts + 6753, ts + 6175, ts + 6170, ts + 7989, ts + 24471, ts + 24477, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116055,7 +116940,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24414 + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24484 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -116110,7 +116995,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+24431, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24501, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116174,13 +117059,13 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6688, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6748, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6693, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6753, uint32(5)) break } @@ -116730,12 +117615,12 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { 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+6688, uint64(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6748, uint64(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(4)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_TRUE), uint32(0), uintptr(0)) return int32(i + U32(4)) } else if int32(c) == 'f' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6693, uint64(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6753, uint64(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -116836,7 +117721,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+24460, -1) + Xsqlite3_result_error(tls, pCtx, ts+24530, -1) } } jsonParseReset(tls, pParse) @@ -117142,7 +118027,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24475, uint64(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24545, uint64(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117157,7 +118042,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24479, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24549, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117211,7 +118096,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+24505, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24575, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117316,11 +118201,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*int8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath)))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24548, uint32(2)) + jsonAppendRaw(tls, bp, ts+24618, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4982, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24551, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24621, uint32(1+libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, int8(0)) } @@ -117477,14 +118362,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24554, -1) + ts+24624, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24605, -1) + Xsqlite3_result_error(tls, ctx, ts+24675, -1) jsonReset(tls, bp) return } @@ -117579,7 +118464,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15348) + jsonWrongNumArgs(tls, ctx, ts+15364) return __2: ; @@ -117654,9 +118539,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24639 + return ts + 24709 } - return ts + 24643 + return ts + 24713 }()) return __2: @@ -117789,7 +118674,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24650, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24720, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117886,7 +118771,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24653, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24723, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -117930,7 +118815,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24656) + ts+24726) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118061,7 +118946,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24739, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24809, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118080,7 +118965,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+24745, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24815, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 16 @@ -118176,7 +119061,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24745, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24815, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118200,7 +119085,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 + 24750 + zRoot = ts + 24820 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118265,6 +119150,12 @@ __2: goto __3 __3: ; + if (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnOrderBy > 0 && + (*sqlite3_index_orderby)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).FiColumn < 0 && + int32((*sqlite3_index_orderby)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc) == 0 { + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 + } + if unusableMask & ^idxMask != 0 { return SQLITE_CONSTRAINT } @@ -118316,7 +119207,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+24460, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24530, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -118411,25 +119302,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 + 24752}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24757}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24768}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24786}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24799}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24802}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24806}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24818}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24830}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24841}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24852}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24864}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24877}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24886}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24886}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24896}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24907}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24924}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24822}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24827}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24838}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24838}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24856}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_JSON)), FxSFunc: 0, FzName: ts + 24869}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_SQL)), FxSFunc: 0, FzName: ts + 24872}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24876}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24888}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24900}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24911}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24922}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24934}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(int64(JSON_ISSET)), FxSFunc: 0, FzName: ts + 24947}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24956}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24956}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24966}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24977}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24994}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -118448,8 +119339,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24942, FpModule: 0}, - {FzName: ts + 24952, FpModule: 0}, + {FzName: ts + 25012, FpModule: 0}, + {FzName: ts + 25022, FpModule: 0}, } type Rtree1 = struct { @@ -118709,11 +119600,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+24962, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+25032, 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+24970, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25040, iNode, 0, pRtree+112) Xsqlite3_free(tls, zTab) } @@ -118924,7 +119815,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24975, + ts+25045, 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)) @@ -119627,7 +120518,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25057) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25127) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -120968,7 +121859,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+25071, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25141, 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 { @@ -120980,12 +121871,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+25091, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25161, 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+25123, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25193, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121211,7 +122102,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+25160, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25230, 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)) @@ -121234,14 +122125,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(24) defer tls.Free(24) - var zFmt uintptr = ts + 25305 + var zFmt uintptr = ts + 25375 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+11270, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11332, 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 { @@ -121282,7 +122173,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25361, ts + 5044, ts + 16235, + ts + 25431, ts + 5044, ts + 16251, } var rtreeModule = Sqlite3_module{ @@ -121325,19 +122216,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+25366, + ts+25436, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25428, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25498, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25433, + ts+25503, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25497, + ts+25567, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25567, + ts+25637, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121366,7 +122257,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 + 25616 + zFormat = ts + 25686 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121378,7 +122269,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+25724, + ts+25794, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121386,18 +122277,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+25769, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25839, 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+12741, 1) + Xsqlite3_str_append(tls, p, ts+12751, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25796, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25866, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25818, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25888, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25826, 0) + Xsqlite3_str_appendf(tls, p, ts+25896, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121412,14 +122303,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25842, - ts + 25895, - ts + 25940, - ts + 25992, - ts + 26046, - ts + 26091, - ts + 26149, - ts + 26204, + ts + 25912, + ts + 25965, + ts + 26010, + ts + 26062, + ts + 26116, + ts + 26161, + ts + 26219, + ts + 26274, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -121448,7 +122339,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+26251, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26321, 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 @@ -121460,7 +122351,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26271, + ts+26341, 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 { @@ -121468,7 +122359,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26328, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26398, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -121510,10 +122401,10 @@ 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 + 26363, - ts + 26406, - ts + 26441, - ts + 26477, + ts + 26433, + ts + 26476, + ts + 26511, + ts + 26547, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { @@ -121544,7 +122435,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+26514, + Xsqlite3_str_appendf(tls, pSql, ts+26584, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: @@ -121556,7 +122447,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26538, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26608, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -121579,7 +122470,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26544, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26614, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -121675,7 +122566,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26547, ts + 26558} +var azFormat = [2]uintptr{ts + 26617, ts + 26628} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(1072) @@ -121713,13 +122604,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+10842, 1) + Xsqlite3_str_append(tls, pOut, ts+10904, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26568, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26638, 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+26574, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26644, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 1024 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26578, 1) + Xsqlite3_str_append(tls, pOut, ts+26648, 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}))) @@ -121730,7 +122621,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+26580, -1) + Xsqlite3_result_error(tls, ctx, ts+26650, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -121808,7 +122699,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26613, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26683, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4046 @@ -121832,7 +122723,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+26620, + ts+26690, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -121851,7 +122742,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+26665, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26735, libc.VaList(bp+16, iNode)) } } @@ -121865,8 +122756,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 + 26697, - ts + 26751, + ts + 26767, + ts + 26821, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { @@ -121881,23 +122772,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+26799, + rtreeCheckAppendMsg(tls, pCheck, ts+26869, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26844 + return ts + 26914 } - return ts + 26852 + return ts + 26922 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26861, + ts+26931, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26844 + return ts + 26914 } - return ts + 26852 + return ts + 26922 }(), iKey, iVal)) } } @@ -121921,7 +122812,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+26919, libc.VaList(bp, i, iCell, iNode)) + ts+26989, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -121941,7 +122832,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+26967, libc.VaList(bp+24, i, iCell, iNode)) + ts+27037, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -121958,14 +122849,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+27034, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27104, 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+27068, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27138, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -121973,7 +122864,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+27098, + ts+27168, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122002,14 +122893,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+27153, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27223, 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+27184, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27254, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122031,12 +122922,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+14477, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14487, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27251, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27321, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122045,12 +122936,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+25071, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25141, 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+27279, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27349, 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) } @@ -122064,8 +122955,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+27310, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27317, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27380, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27387, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122073,7 +122964,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+27325, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27395, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122088,7 +122979,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27329, -1) + ts+27399, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122096,7 +122987,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6365 + zDb = ts + 6425 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -122106,7 +122997,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 + 17953 + return ts + 17996 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122401,7 +123292,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui var nByte int32 if Xsqlite3_value_type(tls, pVal) == SQLITE_BLOB && - uint64(libc.AssignInt32(&nByte, Xsqlite3_value_bytes(tls, pVal))) >= uint64(4)+uint64(6)*uint64(unsafe.Sizeof(GeoCoord(0))) { + libc.AssignInt32(&nByte, Xsqlite3_value_bytes(tls, pVal)) >= int32(uint64(4)+uint64(6)*uint64(unsafe.Sizeof(GeoCoord(0)))) { var a uintptr = Xsqlite3_value_blob(tls, pVal) var nVertex int32 if a == uintptr(0) { @@ -122459,6 +123350,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + _ = argc if p != 0 { Xsqlite3_result_blob(tls, context, p+4, 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) @@ -122471,15 +123363,16 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { defer tls.Free(32) var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + _ = argc if p != 0 { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27380, 1) + Xsqlite3_str_append(tls, x, ts+27450, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27382, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27452, 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+27393, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27463, 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) } @@ -122499,19 +123392,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27404, 0) + Xsqlite3_str_appendf(tls, x, ts+27474, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27422, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27492, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27430, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27500, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27438, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27508, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27442, 0) + Xsqlite3_str_appendf(tls, x, ts+27512, 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) } @@ -122530,6 +123423,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) var x0 GeoCoord var y0 GeoCoord var ii int32 + _ = argc if p != 0 { for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; ii++ { x0 = *(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(ii*2)*4)) @@ -122561,6 +123455,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + _ = argc if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) Xsqlite3_free(tls, p) @@ -122569,6 +123464,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) + _ = argc if p != 0 { if geopolyArea(tls, p) < 0.0 { var ii int32 @@ -122627,6 +123523,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr var n int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) var p uintptr + _ = argc if n < 3 || r <= 0.0 { return @@ -122795,6 +123692,7 @@ __4: func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) + _ = argc if p != 0 { Xsqlite3_result_blob(tls, context, p+4, 4+8*(*GeoPoly)(unsafe.Pointer(p)).FnVertex, libc.UintptrFromInt32(-1)) @@ -122816,6 +123714,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { defer tls.Free(20) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK + _ = argc geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), bp, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { var pBBox uintptr @@ -122900,6 +123799,8 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u var v int32 = 0 var cnt int32 = 0 var ii int32 + _ = argc + if p1 == uintptr(0) { return } @@ -122928,6 +123829,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) + _ = argc if p1 != 0 && p2 != 0 { var x int32 = geopolyOverlap(tls, p1, p2) if x < 0 { @@ -123366,6 +124268,7 @@ geopolyOverlapDone: func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0)) + _ = argc if p1 != 0 && p2 != 0 { var x int32 = geopolyOverlap(tls, p1, p2) if x < 0 { @@ -123379,6 +124282,9 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { + _ = context + _ = argc + _ = argv } func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { @@ -123393,6 +124299,7 @@ func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintp var zSql uintptr var ii int32 rc = SQLITE_OK + _ = pAux Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_CONSTRAINT_SUPPORT, libc.VaList(bp, 1)) @@ -123417,7 +124324,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+27455, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27525, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -123426,7 +124333,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27477, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27547, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -123434,7 +124341,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26544, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26614, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -123513,6 +124420,7 @@ func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uint *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 48)) = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 16)) = 0 + _ = idxStr rtreeReference(tls, pRtree) @@ -123641,6 +124549,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 var idxNum int32 = 0 + _ = tab for ii = 0; ii < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var p uintptr = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12 @@ -123659,7 +124568,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 + 16235 + (*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 @@ -123669,7 +124578,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 + 27481 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27551 (*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 @@ -123677,7 +124586,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 + 27487 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27557 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -123789,7 +124698,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27496, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27566, 0) __4: ; goto geopoly_update_end @@ -123919,14 +124828,16 @@ 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+27536) == 0 { + _ = pVtab + _ = nArg + if Xsqlite3_stricmp(tls, zName, ts+27606) == 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+27552) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27622) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -123963,8 +124874,8 @@ var geopolyModule = Sqlite3_module{ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { var rc int32 = SQLITE_OK - var i int32 - for i = 0; uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { + var i uint32 + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aFunc))/uint64(unsafe.Sizeof(struct { FxFunc uintptr FnArg int8 FbPure uint8 @@ -123981,7 +124892,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { enc, uintptr(0), aFunc[i].FxFunc, uintptr(0), uintptr(0)) } - for i = 0; uint64(i) < uint64(unsafe.Sizeof(aAgg))/uint64(unsafe.Sizeof(struct { + for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aAgg))/uint64(unsafe.Sizeof(struct { FxStep uintptr FxFinal uintptr FzName uintptr @@ -123991,7 +124902,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+27567, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27637, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124003,25 +124914,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [6]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27575}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27588}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27601}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27614}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27552}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27626}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27536}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27649}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27663}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27676}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27690}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27706}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27645}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27658}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27671}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27684}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27622}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27696}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27606}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27719}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27733}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27746}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27760}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27776}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27718}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27788}, } // Register the r-tree module with database handle db. This creates the @@ -124031,26 +124942,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27737, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27807, 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+27747, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27817, 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+27758, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27828, -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+27481, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27551, 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+27769, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27839, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124104,7 +125015,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+25057, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25127, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -124431,7 +125342,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+27779, -1) + Xsqlite3_result_error(tls, context, ts+27849, -1) return } @@ -124442,7 +125353,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+27779, -1) + Xsqlite3_result_error(tls, context, ts+27849, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -124543,7 +125454,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+27800, uintptr(0), uintptr(0), p+64) + ts+27870, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { @@ -124607,7 +125518,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+24970, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, ts+25040, zIn, uint64(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -124628,16 +125539,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+27971, libc.VaList(bp, func() uintptr { + ts+28041, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28121 + return ts + 28191 } return ts + 1538 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, - ts+28162) + ts+28232) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -124753,7 +125664,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+28287, libc.VaList(bp, zTab))) + ts+28357, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -124771,7 +125682,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+28406, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28476, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -124789,7 +125700,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*8, p+64, Xsqlite3_mprintf(tls, - ts+28427, libc.VaList(bp+16, zIdx))) + ts+28497, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -124812,7 +125723,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+28478, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28548, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -124858,7 +125769,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+28499, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28569, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -124873,7 +125784,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+28527, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28597, 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 { @@ -124913,7 +125824,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+19380, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19473, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -124923,18 +125834,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+28556, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28626, 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+28575, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28645, 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+28580, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28650, zName) { bRbuRowid = 1 } } @@ -124946,18 +125857,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+28590, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28660, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28619 + return ts + 28689 } - return ts + 28632 + return ts + 28702 }())) } 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+28641, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28711, 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) @@ -124971,7 +125882,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+28663, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28733, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), 5) @@ -125018,8 +125929,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28690, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14588 + zList = rbuMPrintf(tls, p, ts+28760, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14598 } return zList } @@ -125036,7 +125947,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28769, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125058,25 +125969,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+28712, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28782, 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+28744, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28814, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+28767) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28773, ts+28780, ts+4941) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+1538) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14598, ts+28837) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28843, ts+28850, ts+4941) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14598, ts+1538) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+64, Xsqlite3_mprintf(tls, - ts+28788, + ts+28858, 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+28830, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28900, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125118,7 +126029,7 @@ func rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { *(*uintptr)(unsafe.Pointer(bp + 176)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+64, - Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28597, 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 @@ -125153,7 +126064,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) goto __7 __6: - zCol = ts + 28850 + zCol = ts + 28920 __7: ; goto __5 @@ -125161,13 +126072,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28858, + zLhs = rbuMPrintf(tls, p, ts+28928, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28879, + zOrder = rbuMPrintf(tls, p, ts+28949, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28915, + zSelect = rbuMPrintf(tls, p, ts+28985, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14588 + zSep = ts + 14598 iCol++ goto __1 __2: @@ -125185,7 +126096,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 184)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184, p+64, - Xsqlite3_mprintf(tls, ts+28942, + Xsqlite3_mprintf(tls, ts+29012, 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 @@ -125212,8 +126123,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28990, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14588 + zVector = rbuMPrintf(tls, p, ts+29060, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14598 goto __15 __15: iCol++ @@ -125224,7 +126135,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28997, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29067, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125257,7 +126168,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+64, - Xsqlite3_mprintf(tls, ts+28527, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28597, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125269,7 +126180,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 0) - zRet = Xsqlite3_mprintf(tls, ts+29009, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29079, 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 + 1538 } else { @@ -125281,37 +126192,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 + 28850 + zCol = ts + 28920 } else { - zCol = ts + 28580 + zCol = ts + 28650 } zType = ts + 1103 } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+29031, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29101, 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 + 28767 + return ts + 28837 } return ts + 1538 }() - zImpPK = Xsqlite3_mprintf(tls, ts+29051, + zImpPK = Xsqlite3_mprintf(tls, ts+29121, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+29072, + zImpCols = Xsqlite3_mprintf(tls, ts+29142, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29105, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29175, 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 + 14588 - zAnd = ts + 21448 + zCom = ts + 14598 + zAnd = ts + 21509 nBind++ } @@ -125350,11 +126261,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, ts+29129, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29199, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29141, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29211, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14588 + zS = ts + 14598 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125362,7 +126273,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+29150, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29220, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125374,18 +126285,18 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+29165, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29235, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1538 var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29179, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21448 + zList = rbuMPrintf(tls, p, ts+29249, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21509 } } zList = rbuMPrintf(tls, p, - ts+29191, libc.VaList(bp+40, zList)) + ts+29261, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1538 @@ -125393,8 +126304,8 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+29241, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21448 + zList = rbuMPrintf(tls, p, ts+29311, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21509 } } } @@ -125403,7 +126314,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+29254, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29324, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125421,17 +126332,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29241, + zList = rbuMPrintf(tls, p, ts+29311, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+1)) - zSep = ts + 14588 + zSep = ts + 14598 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29280, + zList = rbuMPrintf(tls, p, ts+29350, 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 + 14588 + zSep = ts + 14598 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29310, + zList = rbuMPrintf(tls, p, ts+29380, 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 + 14588 + zSep = ts + 14598 } } } @@ -125466,19 +126377,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 + 29347 + var zSep uintptr = ts + 29417 *(*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+28499, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28569, 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+16123) == 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+28527, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28597, libc.VaList(bp+8, zIdx))) } break } @@ -125490,15 +126401,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 + 28767 + zDesc = ts + 28837 } else { zDesc = ts + 1538 } - z = rbuMPrintf(tls, p, ts+29360, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14588 + z = rbuMPrintf(tls, p, ts+29430, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14598 } } - z = rbuMPrintf(tls, p, ts+29371, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29441, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64))) } return z @@ -125518,7 +126429,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var zPk uintptr = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+64, - ts+29375) + ts+29445) 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))) { @@ -125527,7 +126438,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+28527, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28597, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -125537,25 +126448,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+29425, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29495, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29447, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29517, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28767 + return ts + 28837 } return ts + 1538 }())) - zComma = ts + 14588 + zComma = ts + 14598 } } - zCols = rbuMPrintf(tls, p, ts+29457, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29527, 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+6365, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29472, + ts+29542, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 0, 0)) } } @@ -125568,7 +126479,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { var zComma uintptr = ts + 1538 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { var zPk uintptr = ts + 1538 @@ -125576,39 +126487,39 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { *(*uintptr)(unsafe.Pointer(bp + 192)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, (*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 + 29534 + zPk = ts + 29604 } - zSql = rbuMPrintf(tls, p, ts+29547, + zSql = rbuMPrintf(tls, p, ts+29617, 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 + 29574 + return ts + 29644 } return ts + 1538 }())) - zComma = ts + 14588 + zComma = ts + 14598 } 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+29584, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29654, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29591, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29661, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29623 + return ts + 29693 } return ts + 1538 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 0, 0)) } } @@ -125621,7 +126532,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+29638, + ts+29708, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -125658,7 +126569,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+29695) + ts+29765) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { var rc2 int32 @@ -125763,7 +126674,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+29761, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29831, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -125783,24 +126694,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+6365, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29781, + ts+29851, 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+6365, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 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+29846, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29916, 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+29882, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) + Xsqlite3_mprintf(tls, ts+29952, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -125816,7 +126727,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29916, + ts+29986, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -125824,9 +126735,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29977 + return ts + 30047 } - return ts + 29981 + return ts + 30051 }() } return ts + 1538 @@ -125835,20 +126746,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29987, + ts+30057, libc.VaList(bp+216, zCollist, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+30048, + ts+30118, 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 + 29977 + return ts + 30047 } - return ts + 29981 + return ts + 30051 }(), zCollist, zLimit)) } @@ -125873,8 +126784,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+6376) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6372) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6436) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6432) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -125885,16 +126796,16 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1538 } - return ts + 30207 + return ts + 30277 }() 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+30216, + ts+30286, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30252 + return ts + 30322 } return ts + 1538 }(), zBindings))) @@ -125903,32 +126814,32 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, - ts+30262, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30332, 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 + 1538 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30290 + zRbuRowid = ts + 30360 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30302, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30372, libc.VaList(bp+408, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30378 + return ts + 30448 } return ts + 1538 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30395, + ts+30465, 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+30694, + ts+30764, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -125941,9 +126852,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30793 + zRbuRowid = ts + 30863 } else { - zRbuRowid = ts + 30803 + zRbuRowid = ts + 30873 } } @@ -125956,20 +126867,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28850, 0) + zOrder = rbuMPrintf(tls, p, ts+28920, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14588, ts+1538) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1538, ts+14598, ts+1538) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, - ts+30814, + ts+30884, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30862 + return ts + 30932 } return ts + 1538 }(), @@ -125982,7 +126893,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19734 + return ts + 22843 } return ts + 1538 }(), zOrder, @@ -126050,9 +126961,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1538 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30207 + zPrefix = ts + 30277 } - zUpdate = Xsqlite3_mprintf(tls, ts+30868, + zUpdate = Xsqlite3_mprintf(tls, ts+30938, 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) @@ -126111,7 +127022,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+30898, libc.VaList(bp, p+48))) + Xsqlite3_mprintf(tls, ts+30968, 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: @@ -126181,28 +127092,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+6365, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6425, 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+6365) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30928, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6425) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30998, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30956, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31026, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48, ts+3270, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, ts+6365, uint64(4)) + libc.Xmemcpy(tls, p+48, ts+6425, uint64(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30974, libc.VaList(bp+24, p+48)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31044, 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+6365, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6425, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126235,11 +127146,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+31040, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31110, 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+24120, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, ts+24190, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -126251,13 +127162,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+31072, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6365), + zTarget = Xsqlite3_mprintf(tls, ts+31142, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6425), func() uintptr { if zExtra == uintptr(0) { return ts + 1538 } - return ts + 31104 + return ts + 31174 }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1538 @@ -126276,37 +127187,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+31106, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31176, -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+31121, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31191, 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+31138, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31208, -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+6365, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31154, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31224, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6365, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, 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+31182, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31252, 0) } } @@ -126335,15 +127246,15 @@ 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+31154, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31224, 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+31200, uintptr(0), uintptr(0), uintptr(0)) - if rc2 != SQLITE_INTERNAL { + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31270, uintptr(0), uintptr(0), uintptr(0)) + if rc2 != SQLITE_NOTICE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } } @@ -126391,7 +127302,7 @@ func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 if (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FmLock != mReq { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).Frc = SQLITE_BUSY - return SQLITE_INTERNAL + return SQLITE_NOTICE | int32(3)<<8 } (*Sqlite3rbu)(unsafe.Pointer(pRbu)).Fpgsz = iAmt @@ -126451,7 +127362,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+6365, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6425, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -126468,23 +127379,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+31235, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31305, 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+6365) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425) 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+6365) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6425) } - zOal = Xsqlite3_mprintf(tls, ts+31260, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31267, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31330, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31337, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -126601,7 +127512,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+23758, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23828, 0) return } @@ -126694,7 +127605,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+31274) + ts+31344) 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) @@ -126702,7 +127613,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+31296, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31366, libc.VaList(bp, iCookie+1)) } } } @@ -126723,7 +127634,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+31323, + ts+31393, libc.VaList(bp, p+48, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -126753,9 +127664,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+31481, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31551, 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+31496, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31566, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -126769,10 +127680,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+31516, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31586, 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+31541) + ts+31611) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126786,12 +127697,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+31649) + ts+31719) } 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+31714) + ts+31784) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -126803,7 +127714,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+31758, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31828, uintptr(0), uintptr(0), p+64) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -126823,15 +127734,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+17208) - rbuCopyPragma(tls, p, ts+16319) + 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+31783, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31853, libc.VaList(bp, p+48, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -126855,10 +127766,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+14492, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14502, 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+14492, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14502, uintptr(0), uintptr(0), p+64) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -126953,7 +127864,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+31811, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31881, 0) } if rc == SQLITE_OK { @@ -126966,16 +127877,17 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { } func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { - bp := tls.Alloc(8) - defer tls.Free(8) + bp := tls.Alloc(16) + defer tls.Free(16) - var zOal uintptr = rbuMPrintf(tls, p, ts+31260, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31330, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { - var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6425, SQLITE_FCNTL_VFS_POINTER, bp+8) (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete})).f(tls, pVfs, zOal, 0) + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FxDelete})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), zOal, 0) Xsqlite3_free(tls, zOal) } } @@ -126985,7 +127897,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31836, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31906, 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) @@ -127019,7 +127931,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+16, Xsqlite3_mprintf(tls, - ts+31847, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31917, 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 { @@ -127049,13 +127961,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+31919, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31989, 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+31933) + ts+32003) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127066,7 +127978,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+31990) + ts+32060) 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) @@ -127140,7 +128052,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+32064, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32134, 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 @@ -127158,12 +128070,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+32096, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32166, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32128 + return ts + 32198 } - return ts + 32135 + return ts + 32205 }())) } } @@ -127171,7 +128083,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+14477, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14487, uintptr(0), uintptr(0), p+64) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+80) @@ -127182,19 +128094,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+16922) - rbuCopyPragma(tls, p, ts+16334) + 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+32142, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32212, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6365, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6425, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32158, uintptr(0), uintptr(0), p+64) + db, ts+32228, uintptr(0), uintptr(0), p+64) } } @@ -127248,7 +128160,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+32182, zState+uintptr(n-7), uint64(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32252, zState+uintptr(n-7), uint64(7)) { return rbuMisuseError(tls) } } @@ -127275,7 +128187,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+30207, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30277, uint64(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -127292,7 +128204,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+14492, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14502, uintptr(0), uintptr(0), p+64) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127305,13 +128217,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+14492, uintptr(0), uintptr(0), p+64) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14502, 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+32190, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32260, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127406,7 +128318,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+14492, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14502, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127423,19 +128335,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+14492, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14502, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14477 + zBegin = ts + 14487 } else { - zBegin = ts + 32142 + zBegin = ts + 32212 } 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+32142, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32212, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127558,11 +128470,14 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { Xsqlite3_free(tls, (*Rbu_file)(unsafe.Pointer(p)).FzDel) if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { + var pMeth uintptr = (*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods rbuMainlistRemove(tls, p) rbuUnlockShm(tls, p) - (*struct { - f func(*libc.TLS, uintptr, int32) int32 - })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmUnmap})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, 0) + if (*Sqlite3_io_methods)(unsafe.Pointer(pMeth)).FiVersion > 1 && (*Sqlite3_io_methods)(unsafe.Pointer(pMeth)).FxShmUnmap != 0 { + (*struct { + f func(*libc.TLS, uintptr, int32) int32 + })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_io_methods)(unsafe.Pointer(pMeth)).FxShmUnmap})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, 0) + } } else if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { rbuUpdateTempSize(tls, p, int64(0)) } @@ -127701,7 +128616,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { - return SQLITE_INTERNAL + return SQLITE_NOTICE | int32(3)<<8 } return SQLITE_OK } @@ -127778,7 +128693,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+32217, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32287, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -127803,7 +128718,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+32240, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32310, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -127948,7 +128863,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+6365) + zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6425) zOpen = Xsqlite3_filename_wal(tls, zOpen) } nOpen = libc.Xstrlen(tls, zOpen) @@ -127963,7 +128878,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+32251, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32321, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) } @@ -127974,7 +128889,13 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags })(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 { - (*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + var pMeth uintptr = (*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pFd)).FpReal)).FpMethods + + if (*Sqlite3_io_methods)(unsafe.Pointer(pMeth)).FiVersion < 2 || (*Sqlite3_io_methods)(unsafe.Pointer(pMeth)).FxShmLock == uintptr(0) { + (*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + } else { + (*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + } if flags&SQLITE_OPEN_MAIN_DB != 0 { rbuMainlistAdd(tls, pFd) } @@ -128004,6 +128925,21 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmBarrier: 0, FxShmUnmap: 0, } +var rbuvfs_io_methods1 = Sqlite3_io_methods{ + FiVersion: 1, + FxClose: 0, + FxRead: 0, + FxWrite: 0, + FxTruncate: 0, + FxSync: 0, + FxFileSize: 0, + FxLock: 0, + FxUnlock: 0, + FxCheckReservedLock: 0, + FxFileControl: 0, + FxSectorSize: 0, + FxDeviceCharacteristics: 0, +} func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs @@ -128767,11 +129703,11 @@ 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+11270, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11332, 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+32262, 0) + ts+32332, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1538, 0) } else { @@ -128784,7 +129720,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32383, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32453, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -128882,7 +129818,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { break } } - if 0 == Xsqlite3_stricmp(tls, ts+11270, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11332, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -129349,6 +130285,9 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, var pSession uintptr var nDb int32 = Xsqlite3Strlen30(tls, zDb) + _ = iKey1 + _ = iKey2 + for pSession = pCtx; pSession != 0; pSession = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpNext { if (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable == 0 { continue @@ -129431,6 +130370,7 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { } func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { + _ = pCtx return 0 } @@ -129460,9 +130400,9 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32412, + zRet = Xsqlite3_mprintf(tls, ts+32482, 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 + 21448 + zSep = ts + 21509 if zRet == uintptr(0) { break } @@ -129485,9 +130425,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+32446, + ts+32516, 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 + 32487 + zSep = ts + 32557 if zRet == uintptr(0) { break } @@ -129495,18 +130435,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp } if bHave == 0 { - zRet = Xsqlite3_mprintf(tls, ts+7454, 0) + zRet = Xsqlite3_mprintf(tls, ts+7514, 0) } return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { +func sessionSelectFindNew(tls *libc.TLS, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32492, + ts+32562, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } @@ -129516,7 +130456,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, defer tls.Free(8) var rc int32 = SQLITE_OK - var zStmt uintptr = sessionSelectFindNew(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, zDb1, zDb2, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr) + var zStmt uintptr = sessionSelectFindNew(tls, zDb1, zDb2, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr) if zStmt == uintptr(0) { rc = SQLITE_NOMEM @@ -129549,7 +130489,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32570, + ts+32640, 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 @@ -129676,7 +130616,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32623, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32693, 0) __16: ; rc = SQLITE_SCHEMA @@ -130150,9 +131090,9 @@ 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+11270, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11332, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32650, libc.VaList(bp, zDb)) + ts+32720, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_NOMEM } @@ -130161,18 +131101,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1538 *(*SessionBuffer)(unsafe.Pointer(bp + 8)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32760, bp+24) + sessionAppendStr(tls, bp+8, ts+32830, bp+24) sessionAppendIdent(tls, bp+8, zDb, bp+24) sessionAppendStr(tls, bp+8, ts+1551, bp+24) sessionAppendIdent(tls, bp+8, zTab, bp+24) - sessionAppendStr(tls, bp+8, ts+32775, bp+24) + sessionAppendStr(tls, bp+8, ts+32845, 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+32783, bp+24) + sessionAppendStr(tls, bp+8, ts+32853, bp+24) sessionAppendInteger(tls, bp+8, i+1, bp+24) - zSep = ts + 21448 + zSep = ts + 21509 } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8)).FaBuf @@ -130281,7 +131221,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+32789, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32859, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40)) } @@ -130373,7 +131313,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24)).FaBuf) - Xsqlite3_exec(tls, db, ts+32809, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32879, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 40)) } @@ -130636,7 +131576,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, 217555) + rc = Xsqlite3CorruptError(tls, 219078) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -130659,7 +131599,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, 217575) + rc = Xsqlite3CorruptError(tls, 219098) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -130701,7 +131641,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, 217629) + rc = Xsqlite3CorruptError(tls, 219152) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -130762,7 +131702,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, 217717) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 219240) } } @@ -130836,13 +131776,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, 217803)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 219326)) } (*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, 217809)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 219332)) } if paRec != 0 { @@ -130904,7 +131844,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, 217853)) + return libc.AssignPtrInt32(p+100, Xsqlite3CorruptError(tls, 219376)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) = uintptr(0) } @@ -131277,7 +132217,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 218218) + *(*int32)(unsafe.Pointer(bp + 40)) = Xsqlite3CorruptError(tls, 219741) goto finished_invert __6: ; @@ -131445,7 +132385,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11270) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11332) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_NOMEM @@ -131456,34 +132396,34 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint64(nU32)*uint64(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32827, bp+16) + sessionAppendStr(tls, bp, ts+32897, bp+16) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16) - sessionAppendStr(tls, bp, ts+32840, bp+16) + sessionAppendStr(tls, bp, ts+32910, 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+32846, bp+16) + sessionAppendStr(tls, bp, ts+32916, bp+16) sessionAppendInteger(tls, bp, ii*2+1, bp+16) - zSep = ts + 14588 + zSep = ts + 14598 } } zSep = ts + 1538 - sessionAppendStr(tls, bp, ts+32775, bp+16) + sessionAppendStr(tls, bp, ts+32845, 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+32851, bp+16) + ts+32921, bp+16) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32783, bp+16) + sessionAppendStr(tls, bp, ts+32853, bp+16) sessionAppendInteger(tls, bp, ii*2+2, bp+16) } - zSep = ts + 21448 + zSep = ts + 21509 } } @@ -131535,34 +132475,34 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp, ts+32926, bp+16) + sessionAppendStr(tls, bp, ts+32996, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+32775, bp+16) + sessionAppendStr(tls, bp, ts+32845, 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+32846, bp+16) + sessionAppendStr(tls, bp, ts+32916, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 21448 + zSep = ts + 21509 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32944, bp+16) + sessionAppendStr(tls, bp, ts+33014, bp+16) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+16) - sessionAppendStr(tls, bp, ts+32487, bp+16) + sessionAppendStr(tls, bp, ts+32557, bp+16) zSep = ts + 1538 for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+16) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) - sessionAppendStr(tls, bp, ts+32783, bp+16) + sessionAppendStr(tls, bp, ts+32853, bp+16) sessionAppendInteger(tls, bp, i+1, bp+16) - zSep = ts + 32952 + zSep = ts + 33022 } } sessionAppendStr(tls, bp, ts+4941, bp+16) @@ -131578,7 +132518,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+6365, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + db, ts+6425, 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 { @@ -131589,19 +132529,19 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp)) = SessionBuffer{} - sessionAppendStr(tls, bp, ts+32957, bp+16) + sessionAppendStr(tls, bp, ts+33027, bp+16) sessionAppendIdent(tls, bp, zTab, bp+16) - sessionAppendStr(tls, bp, ts+21454, bp+16) + sessionAppendStr(tls, bp, ts+21515, bp+16) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14588, bp+16) + sessionAppendStr(tls, bp, ts+14598, bp+16) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16) } - sessionAppendStr(tls, bp, ts+32975, bp+16) + sessionAppendStr(tls, bp, ts+33045, bp+16) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32986, bp+16) + sessionAppendStr(tls, bp, ts+33056, bp+16) } sessionAppendStr(tls, bp, ts+4941, bp+16) @@ -131617,14 +132557,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+11270, p) + var rc int32 = sessionSelectRow(tls, db, ts+11332, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+16, - ts+32990) + ts+33060) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+33103) + ts+33173) } return rc } @@ -131652,7 +132592,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, 218696) + rc = Xsqlite3CorruptError(tls, 220219) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp))) } @@ -131661,7 +132601,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab return rc } -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { +func sessionSeekToRow(tls *libc.TLS, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { bp := tls.Alloc(16) defer tls.Free(16) @@ -131738,7 +132678,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr Xsqlite3changeset_op(tls, pIter, bp, bp+8, bp+12, uintptr(0)) if pbReplace != 0 { - *(*int32)(unsafe.Pointer(bp + 16)) = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + *(*int32)(unsafe.Pointer(bp + 16)) = sessionSeekToRow(tls, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) } else { *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK } @@ -131864,7 +132804,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt } else { if (*SessionApplyCtx)(unsafe.Pointer(p)).FbStat1 != 0 { - rc = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + rc = sessionSeekToRow(tls, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) if rc == SQLITE_ROW { rc = SQLITE_CONSTRAINT Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) @@ -131905,7 +132845,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+33247, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33317, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -131921,7 +132861,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+33268, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33338, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -131994,10 +132934,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+33287, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33357, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33313, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33383, 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)) @@ -132043,7 +132983,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+6365, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) + db, ts+6425, *(*uintptr)(unsafe.Pointer(bp + 176)), bp+48+32, bp+200, bp+48+40, bp+48+48) if rc != SQLITE_OK { break } @@ -132056,19 +132996,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+33343, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33413, 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+33387, + ts+33457, 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+33458, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200)))) + ts+33528, 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+11270) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+11332) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132119,14 +133059,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33518, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33588, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33548, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33618, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33572, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33548, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33642, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33618, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133374,7 +134314,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33600, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33670, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133662,7 +134602,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33628, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33698, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -133849,7 +134789,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+33659, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33729, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -133917,7 +134857,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33666 + var zErr uintptr = ts + 33736 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134099,7 +135039,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33716 + var zErr uintptr = ts + 33786 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134423,13 +135363,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(96) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33764, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33834, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33772, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33842, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33782, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33852, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -134980,7 +135920,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+33787, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33857, zCmd, nCmd) == 0 { var nByte int32 = int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135007,14 +135947,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33794, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33864, 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+33825, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33895, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135025,7 +135965,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33858, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33928, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135038,7 +135978,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33895, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33965, 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))) @@ -135047,7 +135987,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+33904, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33974, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135066,7 +136006,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33937, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34007, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135081,14 +136021,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33971, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34041, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33979, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34049, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34011, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34081, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135096,9 +136036,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34017, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34087, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34031, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34101, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135106,9 +136046,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34069, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34139, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34080, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34150, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -135118,19 +136058,19 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5059, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48)) = [4]Fts5Enum{ - {FzName: ts + 7942, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17313}, - {FzName: ts + 34115, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 8010, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17329}, + {FzName: ts + 34185, 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+34123, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34193, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34154, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34224, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135177,15 +136117,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+22114) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16235) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34182, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22175) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16251) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34252, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34212) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34282) { *(*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+34222, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34292, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135202,13 +136142,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+34253, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34323, 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+34258, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34328, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34265, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+32, ts+34335, libc.VaList(bp+16, i)) } } } @@ -135246,8 +136186,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+22114) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34273, 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+22175) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34343, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135279,7 +136219,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+34302, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34372, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135316,19 +136256,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 + 33971 + zTail = ts + 34041 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34322 + zTail = ts + 34392 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34330, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34400, 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+16235, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16251, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135372,18 +136312,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+34341, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34411, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1538 } - return ts + 14588 + return ts + 14598 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34357, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34427, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34364, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22114)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34434, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22175)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -135493,7 +136433,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34390) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34460) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -135503,7 +136443,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+34395) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34465) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -135513,7 +136453,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+34404) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34474) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -135526,7 +136466,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+34414) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34484) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -135536,7 +136476,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+34424) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34494) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -135552,7 +136492,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+22114) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22175) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) @@ -135575,7 +136515,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(52) defer tls.Free(52) - var zSelect uintptr = ts + 34436 + var zSelect uintptr = ts + 34506 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -135597,7 +136537,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+34468) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34538) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 48)) = 0 @@ -135611,7 +136551,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+34476, + ts+34546, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -135709,7 +136649,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34541, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34611, 0) return FTS5_EOF } } @@ -135722,20 +136662,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34561, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34631, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = int32((int64(z2) - int64(z)) / 1) - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34592, uint64(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34662, uint64(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34595, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34665, uint64(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29977, uint64(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30047, uint64(3)) == 0 { tok = FTS5_AND } break @@ -135821,6 +136761,17 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol return (*Fts5Parse)(unsafe.Pointer(bp)).Frc } +func fts5ExprCountChar(tls *libc.TLS, z uintptr, nByte int32) int32 { + var nRet int32 = 0 + var ii int32 + for ii = 0; ii < nByte; ii++ { + if int32(*(*int8)(unsafe.Pointer(z + uintptr(ii))))&0xC0 != 0x80 { + nRet++ + } + } + return nRet +} + func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { bp := tls.Alloc(3) defer tls.Free(3) @@ -135849,7 +136800,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in for I64(i) <= nText { if I64(i) == nText || int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp))) || int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp + 1))) || int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp + 2))) { - if i-iFirst >= 3 { + if fts5ExprCountChar(tls, zText+uintptr(iFirst), i-iFirst) >= 3 { var jj int32 *(*int8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8('"') for jj = iFirst; jj < i; jj++ { @@ -137502,9 +138453,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+34599, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34669, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33628, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33698, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -137520,7 +138471,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34604, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34674, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -137607,7 +138558,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20451, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20512, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -137688,7 +138639,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+34633, 0) + ts+34703, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -137858,12 +138809,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+34686, + ts+34756, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34736 + return ts + 34806 } - return ts + 34599 + return ts + 34669 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -138806,7 +139757,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+34743, iRowid, 0, p+56) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34813, iRowid, 0, p+56) } if rc == SQLITE_ERROR { @@ -138885,7 +139836,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+34749, + ts+34819, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -138910,7 +139861,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+34800, + ts+34870, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+72, zSql) != 0 { return @@ -138933,7 +139884,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+34849, + ts+34919, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139172,7 +140123,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+34889, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34959, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -140371,7 +141322,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+34912, + ts+34982, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -141837,7 +142788,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+34996, + ts+35066, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142328,10 +143279,15 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr if pNew != 0 { var pLvl uintptr nByte = Sqlite3_int64(uint64(nSeg) * uint64(unsafe.Sizeof(Fts5StructureSegment{}))) - (*Fts5Structure)(unsafe.Pointer(pNew)).FnLevel = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel + 1 + (*Fts5Structure)(unsafe.Pointer(pNew)).FnLevel = func() int32 { + if (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel+1 < FTS5_MAX_LEVEL { + return (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel + 1 + } + return FTS5_MAX_LEVEL + }() (*Fts5Structure)(unsafe.Pointer(pNew)).FnRef = 1 (*Fts5Structure)(unsafe.Pointer(pNew)).FnWriteCounter = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnWriteCounter - pLvl = pNew + 24 + uintptr((*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel)*16 + pLvl = pNew + 24 + uintptr((*Fts5Structure)(unsafe.Pointer(pNew)).FnLevel-1)*16 (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, p+52, nByte) if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg != 0 { var iLvl int32 @@ -142914,13 +143870,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+35053, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35123, 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+24970, ts+35061, 0, pzErr) + pConfig, ts+25040, ts+35131, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11410, - ts+35096, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11472, + ts+35166, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143173,7 +144129,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+34743, int64(FTS5_STRUCTURE_ROWID), 1, bp+8) + ts+34813, 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))) @@ -143287,7 +144243,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35140, + ts+35210, 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))) { @@ -143457,7 +144413,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+35226) + sqlite3Fts5BufferAppendBlob(tls, p+52, bp+16, uint32(4), ts+35296) 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)) @@ -143728,7 +144684,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+35231, 0) + ts+35301, 0) return SQLITE_ERROR } @@ -144152,11 +145108,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35270, + ts+35340, 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 + 14588 + return ts + 14598 } return ts + 1538 }(), @@ -144168,9 +145124,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35325 + return ts + 35395 } - return ts + 35330 + return ts + 35400 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144216,12 +145172,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+35334, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35404, 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+5041, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35340, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35410, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144252,7 +145208,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+35368, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35438, 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, @@ -144283,7 +145239,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+35378, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35448, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144315,14 +145271,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+35399, libc.VaList(bp, z)) + ts+35469, 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 + 33782 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33852 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144378,7 +145334,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+35231, 0) + ts+35301, 0) return SQLITE_ERROR __1: ; @@ -144595,7 +145551,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35432, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35502, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -144740,28 +145696,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+35468, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35538, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35479, 0) + ts+35549, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35559, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35629, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35567, 0) + ts+35637, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16902, 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+35623, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35693, 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+35629, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35699, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -144819,7 +145775,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+17447, 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))) @@ -144832,12 +145788,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+35645, + ts+35715, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20352 + return ts + 20413 } - return ts + 35682 + return ts + 35752 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -145467,7 +146423,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+35694, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35764, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -145711,7 +146667,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+35715, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35785, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -145730,7 +146686,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+35737, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35807, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -145777,7 +146733,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+35768) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35838) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -145786,7 +146742,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+35781, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35851, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -145800,7 +146756,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35872, ts + 33971, ts + 24970, ts + 34322, ts + 11410, + ts + 35942, ts + 34041, ts + 25040, ts + 34392, ts + 11472, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -145824,7 +146780,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+35879, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35949, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -145842,13 +146798,15 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35879, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35949, 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+35884, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35954, 0, + SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS, + p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -145903,17 +146861,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 + 35899, - ts + 35967, - ts + 36036, - ts + 36069, - ts + 36108, - ts + 36148, - ts + 36187, - ts + 36228, - ts + 36267, - ts + 36309, - ts + 36349, + ts + 35969, + ts + 36037, + ts + 36106, + ts + 36139, + ts + 36178, + ts + 36218, + ts + 36257, + ts + 36298, + ts + 36337, + ts + 36379, + ts + 36419, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146015,18 +146973,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+36372, + ts+36442, 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+36476, + ts+36546, 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+36514, + ts+36584, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146038,7 +146996,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+36552, + ts+36622, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146050,14 +147008,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+24970, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11410, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35872, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+25040, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11472, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35942, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34322, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34392, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33971, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34041, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146069,17 +147027,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+36594, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36664, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29623 + return ts + 29693 } return ts + 1538 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36624, + ts+36694, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146116,27 +147074,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36668, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36738, 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+36691, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36761, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33971, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34041, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34322, ts+36697, 0, pzErr) + pConfig, ts+34392, ts+36767, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35872, ts+36729, 1, pzErr) + pConfig, ts+35942, ts+36799, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34468, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34538, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146342,12 +147300,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+36746, + ts+36816, 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+36796, + ts+36866, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146355,7 +147313,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+34468, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34538, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -146531,7 +147489,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36825, + zSql = Xsqlite3_mprintf(tls, ts+36895, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -146713,14 +147671,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+33971, bp+48) + rc = fts5StorageCount(tls, p, ts+34041, 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+34322, bp+56) + rc = fts5StorageCount(tls, p, ts+34392, bp+56) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 56)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -146915,9 +147873,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+36857) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36927) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36868) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36938) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147132,7 +148090,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 + 36879 + var zCat uintptr = ts + 36949 var i int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147144,7 +148102,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+36888) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36958) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*8)) } } @@ -147155,18 +148113,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+36899) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36969) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36857) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36927) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36868) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36938) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36888) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+36958) { } else { rc = SQLITE_ERROR } @@ -147442,7 +148400,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 + 36917 + var zBase uintptr = ts + 36987 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -147584,7 +148542,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36927, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36997, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147592,11 +148550,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36930, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37000, 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+36935, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37005, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147604,7 +148562,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36940, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147612,7 +148570,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36943, aBuf+uintptr(nBuf-2), uint64(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37013, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147620,11 +148578,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36946, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37016, 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+36951, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37021, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147632,19 +148590,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37026, 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+36960, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37030, 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+36966, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37036, 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+36971, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37041, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147652,11 +148610,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37045, 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+36979, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37049, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -147664,7 +148622,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36982, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37052, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147672,11 +148630,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36986, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37056, 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+36990, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37060, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147684,7 +148642,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36994, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37064, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147692,7 +148650,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36998, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147700,7 +148658,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37002, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147716,24 +148674,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36986, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37076, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37056, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37012, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37079, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37082, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37016, aBuf+uintptr(nBuf-2), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37002, uint64(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37086, aBuf+uintptr(nBuf-2), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37072, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -147748,137 +148706,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37019, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37089, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36986, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37056, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37027, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37097, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37034, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37104, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36935, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37005, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37044, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37114, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36930, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37000, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37049, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37002, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37072, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37054, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37124, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15448, 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+37059, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37129, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37012, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37082, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37133, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36927, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36997, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37138, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36971, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37041, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37074, aBuf+uintptr(nBuf-3), uint64(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37144, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37078, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37148, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37080, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37150, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36994, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37064, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37086, aBuf+uintptr(nBuf-7), uint64(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37156, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37002, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37072, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } 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+37164, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36986, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37056, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37100, aBuf+uintptr(nBuf-4), uint64(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37170, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36986, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37056, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37105, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37175, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36997, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37111, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37181, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36998, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37068, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37119, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37189, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37127, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37197, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37131, aBuf+uintptr(nBuf-7), uint64(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37201, aBuf+uintptr(nBuf-7), uint64(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36994, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37064, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37139, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37209, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36997, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37145, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37215, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36998, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37068, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37151, aBuf+uintptr(nBuf-6), uint64(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37221, aBuf+uintptr(nBuf-6), uint64(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37012, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37082, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -147893,16 +148851,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37158, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37228, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36943, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37013, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37163, aBuf+uintptr(nBuf-4), uint64(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37233, aBuf+uintptr(nBuf-4), uint64(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -147910,21 +148868,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37168, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37238, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37013, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37174, aBuf+uintptr(nBuf-5), uint64(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37244, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36943, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37013, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37127, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37197, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -147932,7 +148890,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37180, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37250, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -147940,9 +148898,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37186, aBuf+uintptr(nBuf-5), uint64(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37256, aBuf+uintptr(nBuf-5), uint64(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36927, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36997, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -147957,12 +148915,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37192, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37262, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37196, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37266, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37199, aBuf+uintptr(nBuf-2), uint64(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37269, aBuf+uintptr(nBuf-2), uint64(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -147971,7 +148929,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37202, aBuf+uintptr(nBuf-3), uint64(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37272, aBuf+uintptr(nBuf-3), uint64(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148127,7 +149085,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+37206) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+37276) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148307,22 +149265,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(128) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36917, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36987, 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 + 37221, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37291, 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 + 37227, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37297, 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 + 37234, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37304, 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 @@ -149465,14 +150423,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+37242) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37312) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37246) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37316) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37250) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37320) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37259, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37329, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -149498,19 +150456,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 + 37293, - ts + 37333, - ts + 37368, + ts + 37363, + ts + 37403, + ts + 37438, } 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+23266, *(*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+23336, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37411, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37481, 0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_ERROR } else { var nByte int32 @@ -149643,11 +150601,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+37444, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37514, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37475, + ts+37545, 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)) @@ -149671,7 +150629,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+37526, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37596, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150066,7 +151024,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+37552, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37622, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150088,7 +151046,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 + 37562 + return ts + 37632 } func init() { @@ -150143,114 +151101,116 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = upperFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = lowerFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760)) = hexFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = versionFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = randomFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = randomBlob - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = nullifFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = versionFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = sourceidFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = errlogFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = quoteFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = last_insert_rowid - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = changes - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = total_changes - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = replaceFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = zeroblobFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = substrFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = substrFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832)) = unhexFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904)) = unhexFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = versionFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = randomFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120)) = randomBlob + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192)) = nullifFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264)) = versionFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = sourceidFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = errlogFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480)) = quoteFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552)) = last_insert_rowid + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624)) = changes + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = total_changes + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = replaceFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840)) = zeroblobFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912)) = substrFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984)) = substrFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = sumStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064)) = sumFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072)) = sumFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080)) = sumInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = sumStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136)) = totalFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144)) = totalFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152)) = sumInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = substrFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128)) = substrFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200)) = sumStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = avgFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = avgFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208)) = sumFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216)) = sumFinalize *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224)) = sumInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = countStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = countFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = countFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = countInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = countStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = countFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = countFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = countInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = groupConcatStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = groupConcatFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = groupConcatValue - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = groupConcatInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = groupConcatStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = groupConcatFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = groupConcatValue - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = groupConcatInverse - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4544)) = uintptr(unsafe.Pointer(&globInfo)) - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = likeFunc - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4616)) = uintptr(unsafe.Pointer(&likeInfoNorm)) - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = likeFunc - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688)) = uintptr(unsafe.Pointer(&likeInfoNorm)) + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272)) = sumStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280)) = totalFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288)) = totalFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296)) = sumInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344)) = sumStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4352)) = avgFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4360)) = avgFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4368)) = sumInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416)) = countStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4424)) = countFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4432)) = countFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4440)) = countInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488)) = countStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4496)) = countFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4504)) = countFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4512)) = countInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4560)) = groupConcatStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4568)) = groupConcatFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4576)) = groupConcatValue + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4584)) = groupConcatInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4632)) = groupConcatStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4640)) = groupConcatFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4648)) = groupConcatValue + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4656)) = groupConcatInverse + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4688)) = uintptr(unsafe.Pointer(&globInfo)) *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704)) = likeFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4904)) = xCeil - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4920)) = ceilingFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4976)) = xCeil - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4992)) = ceilingFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xFloor + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4760)) = uintptr(unsafe.Pointer(&likeInfoNorm)) + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4776)) = likeFunc + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4832)) = uintptr(unsafe.Pointer(&likeInfoNorm)) + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4848)) = likeFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5048)) = xCeil *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5064)) = ceilingFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = libc.Xtrunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5120)) = xCeil *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5136)) = ceilingFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = logFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = logFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5192)) = xFloor + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5208)) = ceilingFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5264)) = libc.Xtrunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5280)) = ceilingFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5352)) = logFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5424)) = logFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5496)) = logFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5552)) = libc.Xexp - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = math1Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5624)) = libc.Xpow - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = math2Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xpow - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math2Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xfmod + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5568)) = logFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5640)) = logFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5696)) = libc.Xexp + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5712)) = math1Func + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5768)) = libc.Xpow *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5784)) = math2Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xacos - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xasin - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xatan + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5840)) = libc.Xpow + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5856)) = math2Func + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5912)) = libc.Xfmod + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5928)) = math2Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 5984)) = libc.Xacos *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6000)) = math1Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xatan2 - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math2Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xcos + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6056)) = libc.Xasin + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6072)) = math1Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6128)) = libc.Xatan *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6144)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xsin - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xtan + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6200)) = libc.Xatan2 + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6216)) = math2Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6272)) = libc.Xcos *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6288)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xcosh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6344)) = libc.Xsin *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6360)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xsinh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6416)) = libc.Xtan *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6432)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xtanh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6488)) = libc.Xcosh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6504)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xacosh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6560)) = libc.Xsinh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6576)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xasinh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6632)) = libc.Xtanh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6648)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xatanh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6704)) = libc.Xacosh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6720)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xsqrt + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6776)) = libc.Xasinh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6792)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = degToRad + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6848)) = libc.Xatanh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6864)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = radToDeg + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6920)) = libc.Xsqrt *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6936)) = math1Func - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = piFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = signFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = versionFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = versionFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 6992)) = degToRad + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7008)) = math1Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7064)) = radToDeg + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7080)) = math1Func + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7152)) = piFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7224)) = signFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7296)) = versionFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 7368)) = versionFunc *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24)) = juliandayFunc *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) @@ -150708,6 +151668,18 @@ func init() { *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112)) = rbuVfsShmLock *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120)) = rbuVfsShmBarrier *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128)) = rbuVfsShmUnmap + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 8)) = rbuVfsClose + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 16)) = rbuVfsRead + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 24)) = rbuVfsWrite + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 32)) = rbuVfsTruncate + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 40)) = rbuVfsSync + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 48)) = rbuVfsFileSize + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 56)) = rbuVfsLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 64)) = rbuVfsUnlock + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 72)) = rbuVfsCheckReservedLock + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 80)) = rbuVfsFileControl + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 88)) = rbuVfsSectorSize + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 96)) = rbuVfsDeviceCharacteristics *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeCreate *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeConnect *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeBestIndex @@ -151026,6 +151998,7 @@ func init() { *(*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(&sqlite3Apis)) + 2128)) = Xsqlite3_is_interrupted *(*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 @@ -151047,5 +152020,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128)) = rbuVfsGetLastError } -var ts1 = "3.40.1\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-13.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00coalesce\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00HAVING clause on a non-aggregate query\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00unsafe use of virtual table \"%s\"\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%s\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00trigger \"%s\" may not write to shadow table \"%s\"\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00<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 ts1 = "3.41.0\x00ATOMIC_INTRINSICS=0\x00COMPILER=clang-13.0.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\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\x00ValueList\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\x00sqlite_\x00sqlite_temp_master\x00sqlite_temp_schema\x00sqlite_schema\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\x00flexnum\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00F\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\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\x00unhex\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 \x00 values differ 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\x00USE TEMP B-TREE FOR %sORDER BY\x00RIGHT PART OF \x00column%d\x00%.*z:%u\x00NUM\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\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\x00ORDER BY\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: 2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d\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\x002023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data |