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_freebsd_arm.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_freebsd_arm.go')
-rw-r--r-- | vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go | 12964 |
1 files changed, 6970 insertions, 5994 deletions
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go index 2837204c..c565308b 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_arm.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -volatile=sqlite3_io_error_pending,sqlite3_open_file_count,sqlite3_pager_readdb_count,sqlite3_pager_writedb_count,sqlite3_pager_writej_count,sqlite3_search_count,sqlite3_sort_count,saved_cnt,randomnessPid -o lib/sqlite_freebsd_arm.go -trace-translation-units testdata/sqlite-amalgamation-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_freebsd_arm.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 @@ -412,6 +412,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 @@ -519,6 +520,7 @@ const ( HASHTABLE_HASH_1 = 383 HASHTABLE_NPAGE = 4096 HASHTABLE_NSLOT = 8192 + HAVE_FCHMOD = 0 HAVE_FCHOWN = 1 HAVE_FULLFSYNC = 0 HAVE_GETHOSTUUID = 0 @@ -797,6 +799,7 @@ const ( OPFLG_IN2 = 0x04 OPFLG_IN3 = 0x08 OPFLG_JUMP = 0x01 + OPFLG_NCYCLE = 0x40 OPFLG_OUT2 = 0x10 OPFLG_OUT3 = 0x20 OP_Abortable = 186 @@ -1313,6 +1316,7 @@ const ( SF_SETTABLE = 0xffff0000 SF_SNAPSHOT = 0x00200000 SF_UFSrcCheck = 0x0800000 + SF_UpdateFrom = 0x10000000 SF_UsesEphemeral = 0x0000020 SF_Values = 0x0000200 SF_View = 0x0200000 @@ -1348,6 +1352,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 @@ -1466,6 +1471,7 @@ const ( SQLITE_CacheSpill = 0x00000020 SQLITE_CellSizeCk = 0x00200000 SQLITE_CkptFullFSync = 0x00000010 + SQLITE_Coroutines = 0x02000000 SQLITE_CountOfView = 0x00000200 SQLITE_CoverIdxScan = 0x00000020 SQLITE_CursorHints = 0x00000400 @@ -1832,6 +1838,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 @@ -1928,11 +1935,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 @@ -1947,7 +1957,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 @@ -2055,8 +2065,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 @@ -2448,6 +2458,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 @@ -3714,6 +3725,7 @@ type sqlite3_api_routines = struct { Fserialize uintptr Fdb_name uintptr Fvalue_encoding uintptr + Fis_interrupted uintptr } // CAPI3REF: Loadable Extension Thunk @@ -4940,10 +4952,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 @@ -4998,12 +5008,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 @@ -5250,7 +5258,6 @@ type Index1 = struct { FaSample uintptr FaiRowEst uintptr FnRowEst0 TRowcnt - F__ccgo_pad3 [4]byte FcolNotIdxed Bitmask } @@ -5366,7 +5373,7 @@ type Parse1 = struct { FnLabelAlloc int32 FaLabel uintptr FpConstExpr uintptr - FpIdxExpr uintptr + FpIdxEpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask @@ -5385,6 +5392,7 @@ type Parse1 = struct { FnQueryLoop U32 Foldmask U32 Fnewmask U32 + FnProgressSteps U32 FeTriggerOp U8 FbReturning U8 FeOrconf U8 @@ -6031,7 +6039,7 @@ type Vdbe1 = struct { FnOp int32 FnOpAlloc int32 FaColName uintptr - FpResultSet uintptr + FpResultRow uintptr FzErrMsg uintptr FpVList uintptr F__ccgo_pad3 [4]byte @@ -6160,7 +6168,6 @@ type AggInfo_col = struct { FpTab uintptr FpCExpr uintptr FiTable int32 - FiMem int32 FiColumn I16 FiSorterColumn I16 } @@ -6179,7 +6186,6 @@ type AggInfo_col = struct { type AggInfo_func = struct { FpFExpr uintptr FpFunc uintptr - FiMem int32 FiDistinct int32 FiDistAddr int32 } @@ -6362,9 +6368,12 @@ type RenameCtx1 = struct { } // Context pointer passed down through the tree-walk. -type CoveringIndexCheck = struct { - FpIdx uintptr - FiTabCur int32 +type CoveringIndexCheck1 = struct { + FpIdx uintptr + FiTabCur int32 + FbExpr U8 + FbUnidx U8 + F__ccgo_pad1 [2]byte } var sqlite3azCompileOpt = [52]uintptr{ @@ -6568,7 +6577,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]uint8)(unsafe.Pointer(ts + 1092)) @@ -6718,11 +6727,11 @@ type VdbeFrame1 = struct { Fv uintptr FpParent uintptr FaOp uintptr - FanExec uintptr FaMem uintptr FapCsr uintptr FaOnce uintptr Ftoken uintptr + F__ccgo_pad1 [4]byte FlastRowid I64 FpAuxData uintptr FnCursor int32 @@ -6731,7 +6740,7 @@ type VdbeFrame1 = struct { FnMem int32 FnChildMem int32 FnChildCsr int32 - F__ccgo_pad1 [4]byte + F__ccgo_pad2 [4]byte FnChange I64 FnDbChange I64 } @@ -6768,8 +6777,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 @@ -6780,6 +6799,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 @@ -6896,7 +6924,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 23140) + return Xsqlite3MisuseError(tls, 23229) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -7724,14 +7752,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, uint32(unsafe.Sizeof(DateTime{}))) - iGuess = iGuess - I64(iErr) + iGuess = iGuess - iErr (*DateTime)(unsafe.Pointer(bp)).FiJD = iGuess (*DateTime)(unsafe.Pointer(bp)).FvalidJD = uint8(1) rc = toLocaltime(tls, bp, pCtx) @@ -7739,7 +7767,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, uint32(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FiJD = iGuess @@ -9551,7 +9579,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) zStart++ } n = (int32(zEnd) - int32(zStart)) / 1 - for n > 0 && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart + uintptr(n-1)))])&0x01 != 0 { + for int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zStart + uintptr(n-1)))])&0x01 != 0 { n-- } return Xsqlite3DbStrNDup(tls, db, zStart, uint64(n)) @@ -9807,6 +9835,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 @@ -10797,6 +10827,7 @@ __180: if !(precision > 1) { goto __192 } + nPrior = int64(1) width = width - (precision - 1) if !(width > 1 && !(flag_leftjustify != 0)) { goto __193 @@ -10805,11 +10836,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: ; @@ -10821,30 +10876,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 + 1547 - 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 @@ -10853,83 +10908,83 @@ __198: *(*U8)(unsafe.Pointer(pAccum + 21)) |= 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(z) - int32(bufpt)) / 1 - goto __205 -__204: + goto __208 +__207: length = 0 -__211: +__214: if !(length < precision && *(*uint8)(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(*(*uint8)(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: @@ -10943,17 +10998,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 { @@ -10961,90 +11016,90 @@ __219: } return ts + 1553 }() -__220: +__223: ; k = I64(precision) i1 = libc.AssignInt64(&n1, int64(0)) -__221: +__224: if !(k != int64(0) && int32(libc.AssignUint8(&ch1, *(*uint8)(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(*(*uint8)(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 } *(*uint8)(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 } *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt64(&j, 1)))) = libc.AssignUint8(&ch1, *(*uint8)(unsafe.Pointer(escarg + uintptr(i1)))) if !(int32(ch1) == int32(q)) { - goto __235 + goto __238 } *(*uint8)(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 } *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt64(&j, 1)))) = q -__236: +__239: ; *(*uint8)(unsafe.Pointer(bufpt + uintptr(j))) = uint8(0) length = int32(j) @@ -11052,89 +11107,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+1560, 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+1562, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) - goto __251 -__250: + goto __254 +__253: Xsqlite3_str_appendf(tls, pAccum, ts+1572, libc.VaList(bp+8, (*Select)(unsafe.Pointer(pSel)).FselId)) -__251: +__254: ; -__249: +__252: ; -__246: +__249: ; -__244: +__247: ; length = libc.AssignInt32(&width, 0) goto __58 @@ -11147,32 +11202,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, uint8(' ')) -__254: +__257: ; Xsqlite3_str_append(tls, pAccum, bufpt, length) if !(flag_leftjustify != 0) { - goto __255 + goto __258 } Xsqlite3_str_appendchar(tls, pAccum, width, uint8(' ')) -__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: @@ -11231,7 +11286,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 { @@ -11247,8 +11302,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) } @@ -11277,12 +11331,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 uint8) { - 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 { @@ -11291,7 +11346,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { } 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, uint32(N)) *(*U32)(unsafe.Pointer(p + 16)) += U32(N) @@ -12415,6 +12470,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 + 312)) != 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 @@ -13020,10 +13093,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) @@ -13049,6 +13125,7 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = uint8('-') } libc.Xmemcpy(tls, zOut, bp+uintptr(i+1), uint32(unsafe.Sizeof([22]uint8{}))-uint32(1)-uint32(i)) + return int32(uint32(unsafe.Sizeof([22]uint8{})) - uint32(2) - uint32(i)) } func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { @@ -14057,11 +14134,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)) } @@ -15031,7 +15109,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) @@ -15254,7 +15332,7 @@ __3: (*flock)(unsafe.Pointer(bp)).Fl_len = int64(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 { @@ -15270,113 +15348,113 @@ __3: tErrno = *(*int32)(unsafe.Pointer(libc.X__error(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__error(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 = int64(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__error(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 = int64(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__error(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) @@ -15508,7 +15586,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 38764) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 39055) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -15799,7 +15877,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40385), ts+3371, bp+8, 40385) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40676), ts+3371, bp+8, 40676) } func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { @@ -15816,14 +15894,14 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3659, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40426) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3659, (*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*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40440) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), 40731) } else { rc = SQLITE_OK } @@ -15843,7 +15921,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40471) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40762) } else { if nByte < (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize { (*UnixFile)(unsafe.Pointer(pFile)).FmmapSize = nByte @@ -15911,7 +15989,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40592) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3290, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 40883) } } @@ -16138,7 +16216,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) @@ -16166,7 +16244,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+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41208) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3290, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41499) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -16265,7 +16343,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41333), ts+3254, zShm, 41333) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 41624), ts+3254, zShm, 41624) goto shm_open_err __10: ; @@ -16395,7 +16473,7 @@ __11: goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41477) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3325, zFile, 41768) goto shmpage_out __14: ; @@ -16441,7 +16519,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41504) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3412, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 41795) goto shmpage_out __20: ; @@ -16680,7 +16758,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 41878) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 42169) (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeMax = int64(0) } @@ -16814,7 +16892,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename unixEnterMutex(tls) rc = findInodeInfo(tls, pNew, pNew+8) if rc != SQLITE_OK { - robust_close(tls, pNew, h, 42381) + robust_close(tls, pNew, h, 42672) h = -1 } unixLeaveMutex(tls) @@ -16835,7 +16913,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 @@ -17151,7 +17229,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 42907), ts+3254, zName, 42907) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43198), ts+3254, zName, 43198) if !(rc == SQLITE_OK) { goto __20 } @@ -17242,7 +17320,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__error(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43046) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3364, zPath, 43337) } return rc } @@ -17250,9 +17328,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3781, zPath, 43056) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3781, 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 } @@ -17295,12 +17373,9 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int return } if int32(*(*uint8)(unsafe.Pointer(zName + 1))) == '.' && nName == 2 { - if (*DbPath)(unsafe.Pointer(pPath)).FnUsed <= 1 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = SQLITE_ERROR - return - } - - for int32(*(*uint8)(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(*(*uint8)(unsafe.Pointer((*DbPath)(unsafe.Pointer(pPath)).FzOut + uintptr(libc.PreDecInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnUsed, 1))))) != '/' { + } } return } @@ -17319,18 +17394,18 @@ func appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName int zIn = (*DbPath)(unsafe.Pointer(pPath)).FzOut if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*12 + 4)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__error(tls))) != ENOENT { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43154), ts+3452, zIn, 43154) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43443), ts+3452, zIn, 43443) } } else if int32((*stat)(unsafe.Pointer(bp)).Fst_mode)&0170000 == 0120000 { var got Ssize_t if libc.PostIncInt32(&(*DbPath)(unsafe.Pointer(pPath)).FnSymlink, 1) > SQLITE_MAX_SYMLINK { - (*DbPath)(unsafe.Pointer(pPath)).Frc = Xsqlite3CantopenError(tls, 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*12 + 4)))(tls, zIn, bp+224, uint32(unsafe.Sizeof([1026]uint8{}))-uint32(2)) if got <= 0 || got >= Ssize_t(unsafe.Sizeof([1026]uint8{}))-2 { - (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43165), ts+3443, zIn, 43165) + (*DbPath)(unsafe.Pointer(pPath)).Frc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43454), ts+3443, zIn, 43454) return } *(*uint8)(unsafe.Pointer(bp + 224 + uintptr(got))) = uint8(0) @@ -17370,14 +17445,14 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO (*DbPath)(unsafe.Pointer(bp + 1028)).FzOut = zOut if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, bp, uint32(unsafe.Sizeof([1026]uint8{}))-uint32(2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43223), ts+3272, zPath, 43223) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 43512), ts+3272, zPath, 43512) } appendAllPathElements(tls, bp+1028, bp) } appendAllPathElements(tls, bp+1028, zPath) *(*uint8)(unsafe.Pointer(zOut + uintptr((*DbPath)(unsafe.Pointer(bp+1028)).FnUsed))) = uint8(0) if (*DbPath)(unsafe.Pointer(bp+1028)).Frc != 0 || (*DbPath)(unsafe.Pointer(bp+1028)).FnUsed < 2 { - return Xsqlite3CantopenError(tls, 43229) + return Xsqlite3CantopenError(tls, 43518) } if (*DbPath)(unsafe.Pointer(bp+1028)).FnSymlink != 0 { return SQLITE_OK | int32(2)<<8 @@ -17472,7 +17547,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for __ccgo := true; __ccgo; __ccgo = got < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == EINTR { got = (*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*12 + 4)))(tls, fd, zBuf, uint32(nBuf)) } - robust_close(tls, uintptr(0), fd, 43330) + robust_close(tls, uintptr(0), fd, 43619) } } @@ -21391,7 +21466,7 @@ __26: goto __27 } - libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint32(4)) + libc.Xmemset(tls, (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace, 0, uint32(4)) rc = pager_delsuper(tls, pPager, zSuper) __27: @@ -22443,7 +22518,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 @@ -22460,7 +22534,6 @@ func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u *(*U32)(unsafe.Pointer(bp + 8)) = U32(SQLITE_DEFAULT_PAGE_SIZE) zUri = uintptr(0) nUriByte = 1 - nUri = 0 journalFileSize = (Xsqlite3JournalSize(tls, pVfs) + 7) & libc.CplInt32(7) @@ -22526,7 +22599,6 @@ __10: } z += uintptr(libc.Xstrlen(tls, z) + Size_t(1)) z += uintptr(libc.Xstrlen(tls, z) + Size_t(1)) - nUri++ goto __10 __11: ; @@ -22536,7 +22608,7 @@ __11: goto __12 } - rc = Xsqlite3CantopenError(tls, 59950) + rc = Xsqlite3CantopenError(tls, 60235) __12: ; if !(rc != SQLITE_OK) { @@ -22727,36 +22799,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))) @@ -22928,7 +22989,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: ; @@ -23052,7 +23113,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) @@ -23091,7 +23152,7 @@ __5: if !(pgno == (*Pager)(unsafe.Pointer(pPager)).FlckPgno) { goto __7 } - rc = Xsqlite3CorruptError(tls, 60725) + rc = Xsqlite3CorruptError(tls, 60999) goto pager_acquire_err __7: ; @@ -23168,7 +23229,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 60804) + return Xsqlite3CorruptError(tls, 61078) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { @@ -24080,10 +24141,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]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} @@ -24169,7 +24232,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 + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -24923,7 +24986,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 @@ -25022,7 +25085,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 64241) + rc = Xsqlite3CantopenError(tls, 64519) goto finished __7: ; @@ -25607,7 +25670,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) @@ -25882,7 +25945,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 { @@ -26355,7 +26418,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) } @@ -26860,7 +26923,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) } @@ -27095,8 +27158,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 @@ -27104,23 +27167,24 @@ 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 + 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 @@ -27516,7 +27580,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) } @@ -27653,7 +27717,7 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69151) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69430) return __2: ; @@ -27670,7 +27734,7 @@ __3: goto __4 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69164) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 69443) goto ptrmap_exit __4: ; @@ -27678,7 +27742,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: ; @@ -27721,7 +27785,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))) @@ -27731,7 +27795,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 } @@ -27981,7 +28045,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)) @@ -28028,7 +28092,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) { @@ -28038,7 +28102,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) { @@ -28051,7 +28115,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 69683) + return Xsqlite3CorruptError(tls, 69962) __6: ; if !(iFree2 != 0) { @@ -28060,14 +28124,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), uint32(iFree2-(iFree+sz))) @@ -28077,7 +28141,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 69692) + return Xsqlite3CorruptError(tls, 69971) __11: ; __8: @@ -28141,7 +28205,7 @@ __19: if !(pc < iCellStart || pc > iCellLast) { goto __22 } - return Xsqlite3CorruptError(tls, 69725) + return Xsqlite3CorruptError(tls, 70004) __22: ; size = int32((*struct { @@ -28151,7 +28215,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) @@ -28173,7 +28237,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) @@ -28208,7 +28272,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) @@ -28221,13 +28285,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) } @@ -28252,7 +28316,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) } } @@ -28263,7 +28327,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, (int32(pSpace)-int32(data))/1) if g2 <= gap { - return Xsqlite3CorruptError(tls, 69891) + return Xsqlite3CorruptError(tls, 70170) } else { return SQLITE_OK } @@ -28315,22 +28379,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)))) @@ -28340,7 +28404,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)) @@ -28348,7 +28412,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)) } @@ -28356,10 +28420,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) @@ -28383,13 +28447,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 @@ -28397,7 +28460,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 @@ -28405,32 +28507,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 } @@ -28458,11 +28549,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)))) @@ -28473,15 +28564,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 @@ -28509,14 +28600,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 @@ -28530,7 +28621,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)) @@ -28542,7 +28633,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 @@ -28645,7 +28736,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: ; @@ -28673,7 +28764,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: ; @@ -28712,7 +28803,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 { @@ -29595,7 +29686,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: @@ -30010,7 +30101,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 { @@ -30036,7 +30127,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) @@ -30045,7 +30136,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) @@ -30056,7 +30147,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) } @@ -30072,7 +30163,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) @@ -30133,7 +30224,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 { @@ -30168,7 +30259,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) if *(*Pgno)(unsafe.Pointer(bp + 24)) > dbSize { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) - return Xsqlite3CorruptError(tls, 72084) + return Xsqlite3CorruptError(tls, 72368) } } @@ -30228,7 +30319,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 { @@ -30267,7 +30358,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) @@ -30298,7 +30389,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)) @@ -30639,7 +30730,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) } @@ -30883,14 +30974,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((int32(aPayload)-int32((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > (*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) { @@ -30935,7 +31026,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)) @@ -30984,7 +31075,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 } @@ -31064,7 +31155,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)) @@ -31155,7 +31246,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: @@ -31175,7 +31266,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)) @@ -31239,18 +31330,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) @@ -31266,6 +31347,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. // @@ -31387,7 +31476,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 73793) + return Xsqlite3CorruptError(tls, 74077) __21: ; goto __19 @@ -31591,7 +31680,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 @@ -31656,7 +31745,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: ; @@ -31704,7 +31793,7 @@ __22: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __24 } - rc = Xsqlite3CorruptError(tls, 74108) + rc = Xsqlite3CorruptError(tls, 74392) __24: ; goto moveto_index_finish @@ -31823,7 +31912,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) { @@ -31983,7 +32072,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)) { @@ -32048,7 +32137,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+4, 0) @@ -32084,7 +32173,7 @@ __19: goto __22 } - rc = Xsqlite3CorruptError(tls, 74489) + rc = Xsqlite3CorruptError(tls, 74773) goto end_allocate_page goto __23 __22: @@ -32128,7 +32217,7 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 74523) + rc = Xsqlite3CorruptError(tls, 74807) goto end_allocate_page __32: ; @@ -32240,7 +32329,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 74588) + rc = Xsqlite3CorruptError(tls, 74872) goto end_allocate_page __51: ; @@ -32398,7 +32487,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) { @@ -32455,7 +32544,7 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74762) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 75046) goto freepage_out __10: ; @@ -32471,7 +32560,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 74773) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 75057) goto freepage_out __12: ; @@ -32545,7 +32634,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 @@ -32557,7 +32646,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt *(*Pgno)(unsafe.Pointer(bp + 4)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 74879) + return Xsqlite3CorruptError(tls, 75163) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) @@ -32568,7 +32657,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) } @@ -32733,7 +32822,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)) @@ -32757,9 +32846,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 @@ -32782,16 +32871,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)) @@ -32812,9 +32899,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 @@ -32947,11 +33040,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)*4))) + })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pRef)).FxCellSize})).f(tls, pRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*4))) } else { } idx++ @@ -33004,12 +33100,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((int32(pCell)-int32(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) @@ -33017,7 +33113,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int32(pData) - int32(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 75464) + return Xsqlite3CorruptError(tls, 75748) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -33077,7 +33173,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 75549) + Xsqlite3CorruptError(tls, 75833) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -33166,7 +33262,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), uint32(nCell*2)) @@ -33282,7 +33378,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 + 80)) = allocateBtreePage(tls, pBt, bp, bp+4, uint32(0), uint8(0)) @@ -33325,8 +33421,8 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr } if *(*int32)(unsafe.Pointer(bp + 80)) == SQLITE_OK { - insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, (int32(pOut)-int32(pSpace))/1, - uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+80) + *(*int32)(unsafe.Pointer(bp + 80)) = insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, (int32(pOut)-int32(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 + 4))) @@ -33408,6 +33504,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 @@ -33600,7 +33698,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76194) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76481) goto balance_cleanup __25: ; @@ -33611,7 +33709,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76218) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76505) goto balance_cleanup __27: ; @@ -33769,7 +33867,7 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76319) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76606) goto balance_cleanup __55: ; @@ -33843,7 +33941,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76352) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76639) goto balance_cleanup __67: ; @@ -33869,9 +33967,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 } @@ -33882,8 +33981,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 + 136 + uintptr(i-1)*4)) = r r-- d-- @@ -33905,7 +34004,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76394) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76683) goto balance_cleanup __75: ; @@ -33933,7 +34032,7 @@ __76: *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76427) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76716) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -34194,11 +34293,11 @@ __120: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __121 } - *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76627) + *(*int32)(unsafe.Pointer(bp + 112)) = Xsqlite3CorruptError(tls, 76916) goto balance_cleanup __121: ; - insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+112) + *(*int32)(unsafe.Pointer(bp + 112)) = insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno) if !(*(*int32)(unsafe.Pointer(bp + 112)) != SQLITE_OK) { goto __122 } @@ -34386,7 +34485,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 @@ -34424,7 +34523,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 + 120 + uintptr(iPage-1)*4)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 72 + uintptr(iPage-1)*2))) @@ -34501,7 +34600,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(4) defer tls.Free(4) @@ -34513,19 +34612,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) @@ -34538,7 +34629,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) @@ -34557,6 +34648,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 @@ -34592,7 +34700,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 @@ -34601,13 +34708,12 @@ func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s *(*int32)(unsafe.Pointer(bp)) = seekResult *(*int32)(unsafe.Pointer(bp + 108)) = 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 + 104)) = saveAllCursors(tls, pBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) + *(*int32)(unsafe.Pointer(bp + 104)) = saveAllCursors(tls, (*Btree)(unsafe.Pointer(p)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __2 } @@ -34618,7 +34724,7 @@ __2: goto __3 } - return Xsqlite3CorruptError(tls, 77168) + return Xsqlite3CorruptError(tls, 77479) __3: ; __1: @@ -34731,7 +34837,7 @@ __7: goto __21 } - *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3CorruptError(tls, 77291) + *(*int32)(unsafe.Pointer(bp + 104)) = Xsqlite3CorruptError(tls, 77602) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 104)) = btreeComputeFreeSpace(tls, pPage) @@ -34745,20 +34851,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 + 104)) = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 108)) = (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize + *(*int32)(unsafe.Pointer(bp + 108)) = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPreformatSize if !(*(*int32)(unsafe.Pointer(bp + 108)) < 4) { goto __26 } *(*int32)(unsafe.Pointer(bp + 108)) = 4 __26: ; - if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 108)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { + if !((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 108)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { goto __27 } (*struct { @@ -34768,7 +34874,13 @@ __26: goto __28 } ovfl = Xsqlite3Get4byte(tls, newCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))-4)) - ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+104) + ptrmapPut(tls, (*Btree)(unsafe.Pointer(p)).FpBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+104) + if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { + goto __29 + } + goto end_insert +__29: + ; __28: ; __27: @@ -34776,100 +34888,100 @@ __27: goto __25 __24: *(*int32)(unsafe.Pointer(bp + 104)) = fillInCell(tls, pPage, newCell, pX, bp+108) -__25: - ; if !(*(*int32)(unsafe.Pointer(bp + 104)) != 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 + 104)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 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, uint32(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+112) if !(U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+112)).FnPayload) { - goto __35 + goto __36 } *(*int32)(unsafe.Pointer(bp + 104)) = clearCellOverflow(tls, pPage, oldCell, bp+112) - goto __36 -__35: - *(*int32)(unsafe.Pointer(bp + 104)) = SQLITE_OK + goto __37 __36: + *(*int32)(unsafe.Pointer(bp + 104)) = SQLITE_OK +__37: ; *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) if !(int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) == *(*int32)(unsafe.Pointer(bp + 108)) && U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) == (*CellInfo)(unsafe.Pointer(bp+112)).FnPayload && - (!(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) || *(*int32)(unsafe.Pointer(bp + 108)) < int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal))) { - goto __37 + (!(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FautoVacuum) != 0) || *(*int32)(unsafe.Pointer(bp + 108)) < 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 + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { - goto __39 + goto __40 } - return Xsqlite3CorruptError(tls, 77357) -__39: + return Xsqlite3CorruptError(tls, 77670) +__40: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 108)))) return SQLITE_OK -__37: +__38: ; dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize), bp+104) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 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: + ; +__32: ; - insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 108)), uintptr(0), uint32(0), bp+104) + *(*int32)(unsafe.Pointer(bp + 104)) = insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 108)), 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)) @@ -34878,30 +34990,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 + 104)) == 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 + 104)) = SQLITE_NOMEM - goto __47 -__46: - libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint32((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) + goto __48 __47: + libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint32((*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 + 104)) @@ -34924,7 +35036,6 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I bp := tls.Alloc(16) defer tls.Free(16) - *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK var pBt uintptr = (*BtCursor)(unsafe.Pointer(pDest)).FpBt var aOut uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace var aIn uintptr @@ -34943,13 +35054,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, nIn) (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(nIn + U32((int32(aOut)-int32((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace))/1)) + return SQLITE_OK } else { + *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK var pSrcPager uintptr = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpBt)).FpPager var pPgnoOut uintptr = uintptr(0) var ovflIn Pgno = Pgno(0) @@ -34966,7 +35079,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)) } @@ -35025,9 +35138,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 + 12)) } - - return *(*int32)(unsafe.Pointer(bp + 12)) + return int32(0) } // Delete the entry that the cursor is pointing to. @@ -35067,7 +35180,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) } } @@ -35075,11 +35188,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)) @@ -35154,7 +35267,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 @@ -35164,7 +35277,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 { @@ -35223,7 +35336,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))++ @@ -35252,7 +35365,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 24)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp)), bp+16, bp+20) if int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 77849) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3CorruptError(tls, 78162) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12))) @@ -35328,7 +35441,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) @@ -35342,7 +35455,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: ; @@ -35476,7 +35589,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 + 8)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) @@ -35651,12 +35764,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 + 312)) != 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 } @@ -35664,15 +35806,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+40, ts+4055, 1) + Xsqlite3_str_append(tls, pCheck+44, ts+4055, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { - Xsqlite3_str_appendf(tls, pCheck+40, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) + Xsqlite3_str_appendf(tls, pCheck+44, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) } - Xsqlite3_str_vappendf(tls, pCheck+40, zFormat, ap) + Xsqlite3_str_vappendf(tls, pCheck+44, zFormat, ap) _ = ap if int32((*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FaccError) == SQLITE_NOMEM { - (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 + checkOom(tls, pCheck) } } @@ -35696,9 +35838,6 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { checkAppendMsg(tls, pCheck, ts+4080, libc.VaList(bp+8, iPage)) return 1 } - if *(*int32)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb + 312)) != 0 { - return 1 - } setPageReferenced(tls, pCheck, iPage) return 0 } @@ -35712,7 +35851,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+4105, libc.VaList(bp, iChild)) return @@ -35786,7 +35925,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)) @@ -35871,48 +36012,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 + 4301 (*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+4311, 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+4349, 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+4387, 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) @@ -35927,29 +36075,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 + 4435 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 @@ -35957,28 +36105,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+4463, 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+4493, 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 { @@ -35986,97 +36134,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+4517, 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+4541, 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))) @@ -36086,48 +36234,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+4566, 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+4603, 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 @@ -36156,7 +36304,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr, pzOut uintptr) int32 { bp := tls.Alloc(216) defer tls.Free(216) @@ -36190,19 +36338,13 @@ __1: ; Xsqlite3BtreeEnter(tls, p) + libc.Xmemset(tls, bp+32, 0, uint32(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+40, uintptr(0), bp+104, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) + Xsqlite3StrAccumInit(tls, bp+32+44, uintptr(0), bp+108, int32(unsafe.Sizeof([100]uint8{})), 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 @@ -36214,7 +36356,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: ; @@ -36222,7 +36364,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: ; @@ -36350,22 +36492,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+40) - (*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+40) + Xsqlite3_str_reset(tls, bp+32+44) + *(*uintptr)(unsafe.Pointer(pzOut)) = uintptr(0) + goto __29 +__28: + *(*uintptr)(unsafe.Pointer(pzOut)) = Xsqlite3StrAccumFinish(tls, bp+32+44) __29: ; Xsqlite3BtreeLeave(tls, p) - return Xsqlite3StrAccumFinish(tls, bp+32+40) + return (*IntegrityCk)(unsafe.Pointer(bp + 32)).Frc } // Return the full pathname of the underlying database file. Return @@ -36592,8 +36731,8 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { } func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { - bp := tls.Alloc(292) - defer tls.Free(292) + bp := tls.Alloc(296) + defer tls.Free(296) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) @@ -37092,7 +37231,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { defer tls.Free(32) 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+4918, @@ -37104,6 +37243,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { }())) *(*uint8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+8)).FnChar))) = uint8(0) + (*Mem)(unsafe.Pointer(p)).Fn = int32((*StrAccum)(unsafe.Pointer(bp + 8)).FnChar) } } @@ -37291,7 +37431,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) & Size_t(0x3fffffff)) (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) *(*U16)(unsafe.Pointer(pMem + 16)) |= U16(MEM_Str | MEM_Term) if bForce != 0 { @@ -37465,16 +37604,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) + } } } @@ -37917,7 +38058,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) @@ -38153,43 +38294,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)*4))) + 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 @@ -38574,7 +38706,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++ { @@ -38589,14 +38721,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)) @@ -38966,7 +39098,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 @@ -38978,13 +39112,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. @@ -39061,6 +39197,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 } @@ -39992,7 +40131,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) @@ -40034,7 +40172,7 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(5)*40, 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 @@ -40787,7 +40925,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 } @@ -40895,7 +41033,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) @@ -41446,7 +41584,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 } @@ -41511,7 +41649,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 + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -41545,7 +41683,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 48)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 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) { @@ -41595,7 +41733,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 48))))) if idx1 >= *(*U32)(unsafe.Pointer(bp + 4)) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 86725)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 87136)) return 0 } } @@ -41741,7 +41879,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: ; @@ -41912,7 +42050,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 @@ -41938,7 +42076,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) @@ -42212,7 +42350,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) { @@ -42564,8 +42702,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) @@ -42575,15 +42716,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) { @@ -42771,6 +42912,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 } @@ -42823,7 +42965,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) @@ -42887,6 +43029,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(52) defer tls.Free(52) @@ -42898,9 +43049,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+5350) - 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) @@ -43134,7 +43286,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) @@ -43158,8 +43310,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)*40 + 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)*40 } else { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(pVm)).Fdb, SQLITE_RANGE) pOut = columnNullValue(tls) @@ -43333,15 +43485,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+5360, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 88783) + ts+5350, 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) @@ -43452,14 +43604,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 { @@ -43743,7 +43898,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: ; @@ -43887,7 +44042,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: ; @@ -44059,7 +44214,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { var zStart uintptr = zRawSql for int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*uint8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48, ts+5400, 3) + Xsqlite3_str_append(tls, bp+48, ts+5390, 3) Xsqlite3_str_append(tls, bp+48, zStart, (int32(zRawSql)-int32(zStart))/1) } @@ -44114,21 +44269,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 80 } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48, ts+5404, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5394, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+80) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48, ts+5411, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5401, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 - Xsqlite3_str_append(tls, bp+48, ts+5424, 2) + Xsqlite3_str_append(tls, bp+48, ts+5414, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+5427, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5417, libc.VaList(bp+40, int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48, ts+5432, 1) + Xsqlite3_str_append(tls, bp+48, ts+5422, 1) } } } @@ -44220,11 +44375,11 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, 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) } } @@ -44591,7 +44746,6 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { var nRoot int32 var aRoot uintptr - var z uintptr var pnErr uintptr var iSet int32 @@ -44692,594 +44846,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 + 164 + 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 + 312)) != 0) { - goto __4 + goto __5 } goto abort_due_to_interrupt -__4: +__5: ; pOp = aOp + uintptr((*Vdbe)(unsafe.Pointer(p)).Fpc)*20 -__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)*20 check_for_interrupt: if !(*(*int32)(unsafe.Pointer(db + 312)) != 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)*40 @@ -45288,56 +45446,56 @@ __10: goto jump_to_p2_and_check_for_interrupt -__11: +__12: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 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)))*20 - 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)*40 *(*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)*20 - goto __8 + goto __9 -__13: +__14: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pCaller = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*20 pOp = aOp + uintptr((*VdbeOp)(unsafe.Pointer(pCaller)).Fp2-1)*20 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Undefined) - goto __8 + goto __9 -__14: +__15: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Int) @@ -45345,19 +45503,20 @@ __14: *(*I64)(unsafe.Pointer(pIn1)) = I64((int32(pOp) - int32(aOp)) / 20) pOp = aOp + uintptr(pcDest)*20 - goto __8 + goto __9 -__15: +__16: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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 @@ -45366,124 +45525,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)*20)).Fp2 - 1 -__202: +__203: ; aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem pOp = aOp + uintptr(pcx)*20 - 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+5434, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5424, 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+5455, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) -__206: + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5445, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) +__207: ; - goto __205 -__204: - Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + goto __206 __205: + Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) +__206: ; pcx = (int32(pOp) - int32(aOp)) / 20 - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5462, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) -__203: + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5452, 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 + 16)) |= 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 + 120))) { - 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) @@ -45491,10 +45650,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 @@ -45505,9 +45664,9 @@ __23: return uint16(MEM_Null) }()) (*Mem)(unsafe.Pointer(pOut)).Fn = 0 -__214: +__215: if !(cnt > 0) { - goto __215 + goto __216 } pOut += 40 @@ -45515,171 +45674,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)*40 (*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)*40 if !(Xsqlite3VdbeMemTooBig(tls, pVar) != 0) { - goto __219 + goto __220 } goto too_big -__219: +__220: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 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, uint32(uintptr(0)+20)) *(*U16)(unsafe.Pointer(pOut + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Ephem)) *(*U16)(unsafe.Pointer(pOut + 16)) |= 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)*40 pOut = aMem + uintptr(p2)*40 -__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 += 40 pOut += 40 - 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)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 -__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 + 16)) &= 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 += 40 pIn1 += 40 - goto __225 -__226: + goto __226 +__227: ; - goto __8 + goto __9 -__29: +__30: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) - goto __8 + goto __9 -__30: +__31: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 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)*40 + (*Vdbe)(unsafe.Pointer(p)).FpResultRow = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 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 + 216))})).f(tls, uint32(SQLITE_TRACE_ROW), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, uintptr(0)) -__232: +__233: ; (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp)-int32(aOp))/20 + 1 rc = SQLITE_ROW goto vdbe_return -__33: +__34: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -45687,95 +45846,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 + 120)))) { - 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, uint32((*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, uint32((*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: ; *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte))) = uint8(0) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte+int64(1)))) = uint8(0) @@ -45783,231 +45942,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)*40 type1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 type2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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)*40, int64(0)) -__276: +__277: ; - goto __8 + goto __9 -__40: __41: __42: __43: +__44: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { - goto __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)) @@ -46016,95 +46175,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, uint32(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, uint32(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)*40 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)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { - goto __289 + goto __290 } applyAffinity(tls, pIn1, uint8(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)*40 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)*40 @@ -46115,188 +46274,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)*40 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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 = uint8(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 @@ -46305,38 +46468,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)*20 + 16)) + uintptr(1)*4 -__327: +__328: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) @@ -46344,9 +46507,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)) @@ -46357,298 +46520,299 @@ __328: pColl = *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*40, aMem+uintptr(U32(p21)+idx)*40, pColl) + if !(iCompare != 0) { - goto __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)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*40)).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)*20 - goto __335 -__334: + goto __336 +__335: if !(iCompare == 0) { - goto __336 + goto __337 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*20 - goto __337 -__336: + goto __338 +__337: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*20 -__337: +__338: ; -__335: +__336: ; - goto __8 + goto __9 -__58: __59: +__60: v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { - goto __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)*40 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)*40, int64(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40, (*Op)(unsafe.Pointer(pOp)).Fp3)^*(*int32)(unsafe.Pointer(pOp + 16)))) - goto __8 + goto __9 -__61: +__62: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __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)*40 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 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(pOp) - int32((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 20) if !(int32(*(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))))&(int32(1)<<(iAddr&U32(7))) != 0) { - goto __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)*40, (*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)*40, 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)*40 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)*4)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 < int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed)) { - goto __354 + goto __355 } serialType = *(*U32)(unsafe.Pointer(pC + 80 + 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)*40) - 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)*40)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fflags)&MEM_Null != 0) { - goto __361 + goto __362 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) - goto __362 -__361: - Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, int64(0)) + goto __363 __362: + Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40, int64(0)) +__363: ; - goto __8 + goto __9 -__69: +__70: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 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)*4)) if !(pC1 != 0 && (*VdbeCursor)(unsafe.Pointer(pC1)).FnullRow != 0) { - goto __364 + goto __365 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40) 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)*4)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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 + 36))) != 0) { - goto __369 + goto __370 } Xsqlite3VdbeMemSetNull(tls, pOut) - goto __370 -__369: - Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36)))) + goto __371 __370: + Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC2 + 36)))) +__371: ; -__366: +__367: ; - goto __8 + goto __9 -__72: +__73: ; pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) p22 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) @@ -46658,144 +46822,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)*40 (*VdbeCursor)(unsafe.Pointer(pC3)).FpayloadSize = libc.AssignPtrUint32(pC3+76, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(pC3)).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz - goto __376 -__375: + goto __377 +__376: pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out -__376: +__377: ; - goto __374 -__373: + goto __375 +__374: pCrsr = *(*uintptr)(unsafe.Pointer(pC3 + 36)) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto != 0) { - goto __377 + goto __378 } if !(*(*uintptr)(unsafe.Pointer(pC3 + 12)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC3 + 12)) + uintptr(U32(1)+p22)*4))) > U32(0)) { - goto __379 + 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+76) -__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 + 36))) != 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, uint32(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*U32)(unsafe.Pointer(aOffset)), bp+232) if !(rc != SQLITE_OK) { - goto __396 + goto __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) @@ -46803,353 +46967,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+80+uintptr(i1)*4, libc.AssignPtrUint32(bp+272, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { - goto __400 + goto __401 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272))))) - goto __401 -__400: + goto __402 +__401: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272)) *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(i1)*4)) = *(*U32)(unsafe.Pointer(bp + 272)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272)))) -__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((int32(zHdr) - int32(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 + 272)) = U32(0) + goto __394 __393: + *(*U32)(unsafe.Pointer(bp + 272)) = U32(0) +__394: ; if !(U32((*VdbeCursor)(unsafe.Pointer(pC3)).FnHdrParsed) <= p22) { - goto __407 + goto __408 } pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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 + 272)) = *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(p22)*4)) + goto __392 __391: + *(*U32)(unsafe.Pointer(bp + 272)) = *(*U32)(unsafe.Pointer(pC3 + 80 + uintptr(p22)*4)) +__392: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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 + 272)) < U32(12)) { - goto __413 + goto __414 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __414 -__413: + goto __415 +__414: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 272))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { - goto __415 + goto __416 } if !(len > *(*int32)(unsafe.Pointer(db + 120))) { - 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, uint32(len)) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = uint8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 272))&U32(1)] -__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 + 272)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 272))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272))))) == 0) { - goto __419 + goto __420 } Xsqlite3VdbeSerialGet(tls, uintptr(unsafe.Pointer(&Xsqlite3CtypeMap)), *(*U32)(unsafe.Pointer(bp + 272)), pDest) - goto __420 -__419: + goto __421 +__420: if !(len > *(*int32)(unsafe.Pointer(db + 120))) { - goto __421 + goto __422 } goto too_big -__421: +__422: ; rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(pC3 + 36)), *(*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 + 272)), pDest) *(*U16)(unsafe.Pointer(pDest + 16)) &= 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)*20 - 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)*40 i2 = 0 -__425: +__426: if !(i2 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { - goto __427 + goto __428 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __428 + goto __429 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).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 += 40 - goto __426 -__430: + goto __427 +__431: ; -__428: +__429: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { - goto __431 + goto __432 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4)) & 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 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= 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 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= 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 += 40 - 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+5486, + Xsqlite3VdbeError(tls, p, ts+5476, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i2)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 goto abort_due_to_error -__74: +__75: zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__447: +__448: if !(1 != 0) { - goto __448 + goto __449 } applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { - goto __449 + goto __450 } if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { - goto __450 + goto __451 } *(*U16)(unsafe.Pointer(pIn1 + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= 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 + 16)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__451: +__452: ; -__449: +__450: ; zAffinity++ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) { - goto __452 + goto __453 } - goto __448 -__452: + goto __449 +__453: ; pIn1 += 40 - goto __447 -__448: + goto __448 +__449: ; - goto __8 + goto __9 -__75: +__76: nData = uint64(0) nHdr = 0 nZero = int64(0) @@ -47163,787 +47327,787 @@ __75: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 if !(zAffinity1 != 0) { - goto __453 + goto __454 } pRec = pData0 -__454: +__455: applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { - goto __457 + goto __458 } *(*U16)(unsafe.Pointer(pRec + 16)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) -__457: +__458: ; zAffinity1++ pRec += 40 - goto __455 -__455: - if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 { - goto __454 - } goto __456 __456: + if *(*uint8)(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 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 16)) |= 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 -= 40 - 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 + 120)))) { - 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 + 16)) |= 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+280, pRec, uint32(unsafe.Sizeof(U64(0)))) - goto __507 -__506: - *(*U64)(unsafe.Pointer(bp + 280)) = U64(*(*I64)(unsafe.Pointer(pRec))) + goto __508 __507: + *(*U64)(unsafe.Pointer(bp + 280)) = 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 + 280)) & uint64(0xFF)) if !(i4 == U32(0)) { - goto __510 + goto __511 } - goto __509 -__510: + goto __510 +__511: ; *(*U64)(unsafe.Pointer(bp + 280)) >>= 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, uint32((*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, uint32((*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 += 40 - 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)*4)) + 36)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __516 + goto __517 } *(*I64)(unsafe.Pointer(bp + 288)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) - goto __517 -__516: + goto __518 +__517: *(*I64)(unsafe.Pointer(bp + 288)) = int64(0) rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+288) 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 + 288)) 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+5527, 0) + Xsqlite3VdbeError(tls, p, ts+5517, 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(uint32(unsafe.Sizeof(Savepoint{}))+uint32(nName)+uint32(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, uint32(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+5578, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5568, 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+5600, 0) + ts+5590, 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(pOp) - int32(aOp)) / 20 (*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)*16)).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)*16)).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 + 24)) |= 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+5654, 0) + ts+5644, 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(pOp) - int32(aOp)) / 20 (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return -__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 + 5709 + return ts + 5699 } return func() uintptr { if iRollback != 0 { - return ts + 5757 + return ts + 5747 } - return ts + 5800 + return ts + 5790 }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error -__562: +__563: ; -__79: +__80: *(*int32)(unsafe.Pointer(bp + 296)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|uint64(0x00002)<<32) != uint64(0)) { - goto __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)*16 pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !(pBt != 0) { - goto __575 + goto __576 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+296) if !(rc != SQLITE_OK) { - goto __576 + goto __577 } if !(rc&0xff == SQLITE_BUSY) { - goto __577 + goto __578 } (*Vdbe)(unsafe.Pointer(p)).Fpc = (int32(pOp) - int32(aOp)) / 20 (*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 + 152))&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 + 296)) != (*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+5841) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5831) if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 296))) { - goto __582 + goto __583 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) -__582: +__583: ; libc.SetBitFieldPtr8Uint32(p+152, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA libc.SetBitFieldPtr8Uint32(p+152, 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 @@ -47951,67 +48115,67 @@ __80: Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpBt, iCookie, bp+300) pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 300))) - goto __8 + goto __9 -__81: +__82: ; pDb1 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16 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 + 24)) |= 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+152, 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)*4)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { - goto __589 + goto __590 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 36))) goto open_cursor_set_hints -__589: +__590: ; -__83: __84: +__85: ; if !(int32(*(*uint8)(unsafe.Pointer(p + 152))&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) @@ -48022,24 +48186,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)*40 @@ -48047,30 +48211,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) @@ -48086,22 +48250,22 @@ open_cursor_set_hints: Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 36)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { - goto __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)*4)) 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) @@ -48115,133 +48279,133 @@ __600: rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx + 12)), (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot, BTREE_WRCSR, (*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo, *(*uintptr)(unsafe.Pointer(pCx + 36))) - 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)*40)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1547 -__601: +__602: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { - goto __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 + 12)), 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+12, 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 + 12)), 1, uintptr(0)) if !(rc == SQLITE_OK) { - goto __606 + goto __607 } if !(libc.AssignPtrUintptr(pCx1+40, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { - goto __607 + goto __608 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), pCx1+48, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { - goto __609 + goto __610 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 12)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 36))) -__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 + 12)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 36))) (*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 + 12))) -__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)*4)) 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 @@ -48249,18 +48413,18 @@ __615: *(*uintptr)(unsafe.Pointer(pCx3 + 36)) = 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)*4))) *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) = 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)*4)) @@ -48271,92 +48435,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)*40 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 + 36)), bp+304) 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 + 36)), int64(U64(iKey)), 0, bp+304) (*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 + 36)), uint32(BTREE_SEEK_EQ)) != 0) { - goto __630 + goto __631 } eqOnly = 1 -__630: +__631: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) @@ -48374,106 +48538,106 @@ __630: (*UnpackedRecord)(unsafe.Pointer(bp + 312)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), bp+312, bp+304) if !(rc != SQLITE_OK) { - goto __631 + goto __632 } goto abort_due_to_error -__631: +__632: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+312)).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 + 304)) < 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekGT) { - goto __635 + goto __636 } *(*int32)(unsafe.Pointer(bp + 304)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __637 + goto __638 } if !(rc == SQLITE_DONE) { - goto __638 + goto __639 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304)) = 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 + 304)) = 0 + goto __637 __636: + *(*int32)(unsafe.Pointer(bp + 304)) = 0 +__637: ; - goto __634 -__633: + goto __635 +__634: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) > 0 || *(*int32)(unsafe.Pointer(bp + 304)) == 0 && oc == OP_SeekLT) { - goto __640 + goto __641 } *(*int32)(unsafe.Pointer(bp + 304)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36)), 0) if !(rc != SQLITE_OK) { - goto __642 + goto __643 } if !(rc == SQLITE_DONE) { - goto __643 + goto __644 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 304)) = 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 + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) + goto __642 __641: + *(*int32)(unsafe.Pointer(bp + 304)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC5 + 36))) +__642: ; -__634: +__635: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 304)) != 0) { - goto __645 + goto __646 } goto jump_to_p2 - goto __646 -__645: + goto __647 +__646: if !(eqOnly != 0) { - goto __647 + goto __648 } pOp += 20 -__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*20)).Fp1)*4)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC6 + 36))) != 0) { - goto __648 + goto __649 } - goto __8 -__648: + goto __9 +__649: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 @@ -48482,108 +48646,108 @@ __648: (*UnpackedRecord)(unsafe.Pointer(bp + 344)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 344)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*20)).Fp3)*40 *(*int32)(unsafe.Pointer(bp + 376)) = 0 -__649: +__650: if !(1 != 0) { - goto __650 + goto __651 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC6, bp+344, bp+376) if !(rc != 0) { - goto __651 + goto __652 } goto abort_due_to_error -__651: +__652: ; if !(*(*int32)(unsafe.Pointer(bp + 376)) > 0 && int32((*Op)(unsafe.Pointer(pOp)).Fp5) == 0) { - goto __652 + goto __653 } seekscan_search_fail: ; pOp += 20 goto jump_to_p2 -__652: +__653: ; if !(*(*int32)(unsafe.Pointer(bp + 376)) >= 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 + 36)), 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)*4)) 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)*4)) 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)*4)) 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)*4)) @@ -48591,14 +48755,14 @@ __102: (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*UnpackedRecord)(unsafe.Pointer(bp+384)).FnField) > 0) { - goto __663 + goto __664 } (*UnpackedRecord)(unsafe.Pointer(bp + 384)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC9)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 384)).Fdefault_rc = int8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), bp+384, pC9+28) - goto __664 -__663: + goto __665 +__664: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fflags)&MEM_Zero != 0 { @@ -48608,108 +48772,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+384)).FaMem)).Fn, (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem)).Fz, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 36)), pIdxKey, pC9+28) 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+384)).FnField)) { - goto __675 + goto __676 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(bp+384)).FaMem+uintptr(ii1)*40)).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)*40 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { - goto __678 + goto __679 } *(*Mem)(unsafe.Pointer(bp + 416)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+416, uint8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+416)).Fflags)&MEM_Int == 0) { - goto __679 + goto __680 } goto jump_to_p2 -__679: +__680: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 416))) goto notExistsWithKey -__678: +__679: ; -__104: +__105: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) @@ -48728,35 +48892,35 @@ notExistsWithKey: (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 456)) if !(*(*int32)(unsafe.Pointer(bp + 456)) != 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)*4)))).FseqCount, 1) - goto __8 + goto __9 -__106: +__107: *(*I64)(unsafe.Pointer(bp + 464)) = int64(0) *(*int32)(unsafe.Pointer(bp + 460)) = 0 pOut = out2Prerelease(tls, p, pOp) @@ -48764,123 +48928,123 @@ __106: pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !!(int32(*(*uint8)(unsafe.Pointer(pC11 + 8))&0x2>>1) != 0) { - goto __684 + goto __685 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), bp+460) if !(rc != SQLITE_OK) { - goto __685 + goto __686 } goto abort_due_to_error -__685: +__686: ; if !(*(*int32)(unsafe.Pointer(bp + 460)) != 0) { - goto __686 + goto __687 } *(*I64)(unsafe.Pointer(bp + 464)) = int64(1) - goto __687 -__686: + goto __688 +__687: ; *(*I64)(unsafe.Pointer(bp + 464)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36))) if !(*(*I64)(unsafe.Pointer(bp + 464)) >= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff))) { - goto __688 + goto __689 } libc.SetBitFieldPtr8Uint32(pC11+8, Bool(1), 1, 0x2) - goto __689 -__688: - *(*I64)(unsafe.Pointer(bp + 464))++ + goto __690 __689: + *(*I64)(unsafe.Pointer(bp + 464))++ +__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)*40 - goto __692 -__691: + goto __693 +__692: ; pMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__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 + 464)) < *(*I64)(unsafe.Pointer(pMem))+int64(1)) { - goto __697 + goto __698 } *(*I64)(unsafe.Pointer(bp + 464)) = *(*I64)(unsafe.Pointer(pMem)) + int64(1) -__697: +__698: ; *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp + 464)) -__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+464) *(*I64)(unsafe.Pointer(bp + 464)) &= int64(uint64(0x7fffffff)<<32|uint64(0xffffffff)) >> 1 *(*I64)(unsafe.Pointer(bp + 464))++ - goto __700 -__700: + goto __701 +__701: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC11 + 36)), int64(U64(*(*I64)(unsafe.Pointer(bp + 464)))), 0, bp+460)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 460)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { - goto __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 + 460)) == 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 + 464)) - goto __8 + goto __9 -__107: +__108: pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -48890,52 +49054,52 @@ __107: (*BtreePayload)(unsafe.Pointer(bp + 472)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -5 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { - goto __704 + goto __705 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC12)).FiDb)*16)).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+472)).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 + 472)).FnKey +__712: + ; __711: ; (*BtreePayload)(unsafe.Pointer(bp + 472)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz @@ -48947,15 +49111,16 @@ __711: return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { - goto __712 + goto __713 } (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = *(*int32)(unsafe.Pointer(pData)) - goto __713 -__712: - (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = 0 + goto __714 __713: + (*BtreePayload)(unsafe.Pointer(bp + 472)).FnZero = 0 +__714: ; (*BtreePayload)(unsafe.Pointer(bp + 472)).FpKey = uintptr(0) + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC12 + 36)), bp+472, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), seekResult) @@ -48963,13 +49128,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 { @@ -48982,11 +49147,11 @@ __714: return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+472)).FnKey) -__715: +__716: ; - goto __8 + goto __9 -__108: +__109: ; pDest1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) pSrc = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*4)) @@ -48997,38 +49162,38 @@ __108: } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 36)), *(*uintptr)(unsafe.Pointer(pSrc + 36)), 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)*4)) 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)*16)).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 + 36))) -__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, @@ -49040,47 +49205,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 + 36)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) (*VdbeCursor)(unsafe.Pointer(pC13)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC13)).FseekResult = 0 if !(rc != 0) { - goto __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)*4)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -49089,35 +49254,35 @@ __111: rc = Xsqlite3VdbeSorterCompare(tls, pC14, pIn3, nKeyCol, bp+512) if !(rc != 0) { - goto __725 + goto __726 } goto abort_due_to_error -__725: +__726: ; if !(*(*int32)(unsafe.Pointer(bp + 512)) != 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)*40 pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) 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)*4)))).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)*4)) @@ -49126,51 +49291,51 @@ __113: n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 120)))) { - 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)*4)) 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 + 520)) = (*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 + 36)))).FpVtab @@ -49181,71 +49346,71 @@ __734: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36)), bp+520) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { - goto __738 + goto __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 + 520)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC17 + 36))) -__737: +__738: ; -__735: +__736: ; -__733: +__734: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 520)) - goto __8 + goto __9 -__115: +__116: ; pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) 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 + 36)) = 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 + 36))) -__743: +__744: ; - goto __8 + goto __9 -__116: __117: +__118: ; pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -49253,43 +49418,43 @@ __117: *(*int32)(unsafe.Pointer(bp + 528)) = 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+528) (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528))) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { - goto __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 + 528)) != 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)*4)) @@ -49297,84 +49462,89 @@ __118: rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+532) if !(rc != 0) { - goto __749 + goto __750 } goto abort_due_to_error -__749: +__750: ; if !(*(*int32)(unsafe.Pointer(bp + 532)) == 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 + 532)) = 1 -__751: +__752: ; -__750: +__751: ; if !(*(*int32)(unsafe.Pointer(bp + 532)) != 0) { - goto __752 + goto __753 } goto jump_to_p2 -__752: +__753: ; - goto __8 + goto __9 -__119: __120: +__121: *(*U32)(unsafe.Pointer(p + 164 + 2*4))++ -__121: +__122: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) *(*int32)(unsafe.Pointer(bp + 536)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC21)).FeCurType) == CURTYPE_SORTER) { - goto __753 + goto __754 } rc = Xsqlite3VdbeSorterRewind(tls, pC21, bp+536) - goto __754 -__753: + goto __755 +__754: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC21 + 36)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536) (*VdbeCursor)(unsafe.Pointer(pC21)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) -__754: +__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 + 536))) + if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { + goto __757 + } if !(*(*int32)(unsafe.Pointer(bp + 536)) != 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)*4)) 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)*4)) rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC22 + 36)), (*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)*4)) @@ -49384,34 +49554,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 + 164 + 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)*4)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 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 { @@ -49420,10 +49590,10 @@ __759: return 0 }() if !(rc != 0) { - goto __760 + goto __762 } goto abort_due_to_error -__760: +__762: ; (*BtreePayload)(unsafe.Pointer(bp + 544)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 544)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz @@ -49440,14 +49610,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)*4)) @@ -49460,21 +49630,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)*4)) @@ -49486,62 +49656,62 @@ __127: (*UnpackedRecord)(unsafe.Pointer(bp + 584)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+584, bp+616) if !(rc != 0) { - goto __764 + goto __766 } goto abort_due_to_error -__764: +__766: ; if !(*(*int32)(unsafe.Pointer(bp + 616)) == 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+5869) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 96635, ts+5859) 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)*4)) 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 + 624)) = int64(0) rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC26 + 36)), bp+624) 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)*4)) @@ -49554,56 +49724,56 @@ __772: *(*uintptr)(unsafe.Pointer(pTabCur + 12)) = *(*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 + 624)) -__774: +__776: ; - goto __771 -__770: + goto __773 +__772: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) -__771: +__773: ; - goto __8 + goto __9 -__130: +__131: ; pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) if !((*VdbeCursor)(unsafe.Pointer(pC27)).FdeferredMoveto != 0) { - goto __775 + 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)*4)) (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC28)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { - goto __777 + goto __779 } (*UnpackedRecord)(unsafe.Pointer(bp + 672)).Fdefault_rc = int8(-1) - goto __778 -__777: + goto __780 +__779: ; (*UnpackedRecord)(unsafe.Pointer(bp + 672)).Fdefault_rc = int8(0) -__778: +__780: ; (*UnpackedRecord)(unsafe.Pointer(bp + 672)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 @@ -49614,54 +49784,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+632, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur2, U32(nCellKey), bp+632) if !(rc != 0) { - goto __780 + goto __782 } goto abort_due_to_error -__780: +__782: ; res11 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+632)).Fn, (*Mem)(unsafe.Pointer(bp+632)).Fz, bp+672, 0) Xsqlite3VdbeMemReleaseMalloc(tls, bp+632) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { - goto __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 + 704)) = 0 @@ -49669,72 +49839,72 @@ __784: (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 704))) if !(rc != 0) { - goto __786 + goto __788 } goto abort_due_to_error -__786: +__788: ; if !(*(*int32)(unsafe.Pointer(bp + 704)) != 0) { - goto __787 + goto __789 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 704))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) resetSchemaOnFault = U8(iDb2 + 1) -__787: +__789: ; -__785: +__787: ; - goto __8 + goto __9 -__136: +__137: ; *(*I64)(unsafe.Pointer(bp + 712)) = int64(0) rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*16)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+712) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __788 + goto __790 } *(*I64)(unsafe.Pointer(p + 40)) += *(*I64)(unsafe.Pointer(bp + 712)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { - goto __789 + goto __791 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)) += *(*I64)(unsafe.Pointer(bp + 712)) -__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)*4)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC29)).FeCurType) == CURTYPE_SORTER) { - goto __791 + goto __793 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC29 + 36))) - goto __792 -__791: + goto __794 +__793: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC29 + 36))) 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 + 720)) = Pgno(0) @@ -49743,55 +49913,55 @@ __138: rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb3)).FpBt, bp+720, (*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 + 720))) - 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)*16)).FpSchema) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+124, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) - goto __797 -__796: - zSchema = ts + 5886 + goto __799 +__798: + zSchema = ts + 5876 (*InitData)(unsafe.Pointer(bp + 724)).Fdb = db (*InitData)(unsafe.Pointer(bp + 724)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 724)).FpzErrMsg = p + 124 (*InitData)(unsafe.Pointer(bp + 724)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 724)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5900, + ts+5890, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { - goto __798 + goto __800 } rc = SQLITE_NOMEM - goto __799 -__798: + goto __801 +__800: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 724)).Frc = SQLITE_OK @@ -49801,66 +49971,66 @@ __798: f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+724, uintptr(0)) if !(rc == SQLITE_OK) { - goto __800 + goto __802 } rc = (*InitData)(unsafe.Pointer(bp + 724)).Frc -__800: +__802: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+724)).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)) @@ -49869,151 +50039,152 @@ __145: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 - z = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*16)).FpBt, aRoot+1*4, nRoot, - int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+752) + rc = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*16)).FpBt, aRoot+1*4, nRoot, + int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+752, bp+756) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 752)) == 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 + 756))) + goto abort_due_to_error + goto __810 +__809: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 752)) - 1) - Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) -__808: + Xsqlite3VdbeMemSetStr(tls, pIn1, *(*uintptr)(unsafe.Pointer(bp + 756)), 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)*40 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 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)*40 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+760) == 0) { - goto __811 + 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)*40, *(*I64)(unsafe.Pointer(bp + 760))) -__812: +__814: ; goto check_for_interrupt -__148: +__149: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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)*40 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 + 120 + 10*4))) { - goto __823 + goto __825 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5943, 0) + Xsqlite3VdbeError(tls, p, ts+5933, 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((uint32(unsafe.Sizeof(VdbeFrame{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(nMem)*uint32(unsafe.Sizeof(Mem{})) + @@ -50021,10 +50192,10 @@ __826: uint32(((*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) @@ -50046,24 +50217,24 @@ __827: pEnd = pFrame2 + 88 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*40 pMem1 = pFrame2 + 88 -__828: +__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 += 40 - 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 @@ -50086,103 +50257,103 @@ __825: pOp = aOp + libc.UintptrFromInt32(-1)*20 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)*20)).Fp1)*40 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 + 536)) += 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 + 528)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) - goto __834 -__833: + goto __836 +__835: *(*I64)(unsafe.Pointer(p + 64)) += 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)*40 - goto __840 -__839: + goto __842 +__841: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 -__840: +__842: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { - goto __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)*40 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)*40 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pOut = out2Prerelease(tls, p, pOp) @@ -50194,62 +50365,62 @@ __155: } return int64(0) }()) != 0) { - goto __846 + goto __848 } *(*I64)(unsafe.Pointer(pOut)) = int64(-1) - goto __847 -__846: + goto __849 +__848: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 768)) -__847: +__849: ; - goto __8 + goto __9 -__156: +__157: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 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)*40 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(uint32(n4)*uint32(unsafe.Sizeof(uintptr(0)))+(uint32(unsafe.Sizeof(Sqlite3_context{}))+uint32(unsafe.Sizeof(Mem{}))-uint32(unsafe.Sizeof(uintptr(0)))))) if !(pCtx == uintptr(0)) { - goto __852 + goto __854 } goto no_mem -__852: +__854: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 28 + uintptr(n4)*4 @@ -50266,146 +50437,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)*40 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 + 28 + uintptr(i5)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*40 - 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+28) - 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+28) -__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+3656, 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)*20)).Fp1 if !(i5 != 0) { - goto __862 + goto __864 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*40, 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)*40 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { - goto __864 + goto __866 } rc = Xsqlite3VdbeMemAggValue(tls, pMem3, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 - goto __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+3656, 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 + 776)) = 0 *(*int32)(unsafe.Pointer(bp + 776 + 1*4)) = libc.AssignPtrInt32(bp+776+2*4, -1) rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+776+1*4, bp+776+2*4) if !(rc != 0) { - goto __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 + 776)) = 1 -__867: +__869: ; i6 = 0 pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 -__869: +__871: if !(i6 < 3) { - goto __871 + goto __873 } Xsqlite3VdbeMemSetInt64(tls, pMem4, I64(*(*int32)(unsafe.Pointer(bp + 776 + uintptr(i6)*4)))) - goto __870 -__870: + goto __872 +__872: i6++ pMem4 += 40 - 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 @@ -50413,70 +50584,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+5980, + ts+5970, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 6032 + return ts + 6022 } - return ts + 6037 + return ts + 6027 }())) 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 { @@ -50484,17 +50655,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) @@ -50504,14 +50675,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+124, db, (*Op)(unsafe.Pointer(pOp)).Fp1, func() uintptr { @@ -50521,103 +50692,103 @@ __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)*16)).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+152, 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)*4)) Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC30 + 36))) - goto __8 + goto __9 -__169: +__170: ; pC31 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC31 + 36))) - 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)*16)).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+6044, libc.VaList(bp+144, z1)) -__892: + Xsqlite3VdbeError(tls, p, ts+6034, 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: +__173: libc.Xmemset(tls, bp+792, 0, uint32(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 792)).Fdb = db @@ -50626,44 +50797,44 @@ __172: zTab = Xsqlite3_value_text(tls, bp+792) if !(zTab != 0) { - goto __895 + goto __897 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+124) -__895: +__897: ; Xsqlite3VdbeMemRelease(tls, bp+792) 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 + 832)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { - goto __898 + goto __900 } rc = SQLITE_LOCKED goto abort_due_to_error -__898: +__900: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { @@ -50671,47 +50842,47 @@ __898: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+832) 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 + 832)))).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 + 36)) = *(*uintptr)(unsafe.Pointer(bp + 832)) (*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 + 832))) 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)*4)) 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 + 36)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) - Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+5350, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) - goto __8 + Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+6063, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3VdbeValueListFree}))) + goto __9 -__176: +__177: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 pArgc = pQuery + 1*40 pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -50725,27 +50896,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)*4)) = pArgc + uintptr(i7+1)*40 - 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 @@ -50753,24 +50924,24 @@ __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)*4)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 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 + 36)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule @@ -50780,45 +50951,45 @@ __908: (*Sqlite3_context)(unsafe.Pointer(bp + 836)).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 + 36)), bp+836, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+836)).FisError > 0) { - goto __911 + goto __913 } Xsqlite3VdbeError(tls, p, ts+3656, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 836)).FisError -__911: +__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)*4)) 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 + 36)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule @@ -50828,25 +50999,25 @@ __913: })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur6 + 36))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { - goto __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 + 36))) 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 + 32)) |= uint64(SQLITE_LegacyAlter) pVtab5 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab @@ -50854,70 +51025,70 @@ __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 + 32)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) -__917: +__919: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr8Uint32(p+152, Bft(0), 0, 0x3) if !(rc != 0) { - goto __918 + goto __920 } goto abort_due_to_error -__918: +__920: ; - goto __8 + goto __9 -__180: +__181: *(*Sqlite_int64)(unsafe.Pointer(bp + 872)) = 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)*40 i8 = 0 -__922: +__924: if !(i8 < nArg1) { - goto __924 + goto __926 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*4)) = pX1 pX1 += 40 - 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 { @@ -50926,94 +51097,94 @@ __924: (*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 + 872)) -__925: +__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)*16)).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)*16)).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)*40 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 + 28 + uintptr(i9)*4)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*40 - 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) @@ -51022,63 +51193,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+28) 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+3656, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError -__938: +__940: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+228, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { - goto __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)*40 *(*U16)(unsafe.Pointer(pIn1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Subtype)) - goto __8 + goto __9 -__186: +__187: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 h = filterHash(tls, aMem, pOp) h = h % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h/uint64(8)))) |= uint8(int32(1) << (h & uint64(7))) - goto __8 + goto __9 -__187: +__188: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { - goto __940 + goto __942 } *(*U32)(unsafe.Pointer(p + 164 + 8*4))++ goto jump_to_p2 - goto __941 -__940: + goto __943 +__942: *(*U32)(unsafe.Pointer(p + 164 + 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 && @@ -51088,104 +51259,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 + 216))})).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+6073, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) - goto __946 -__945: + goto __948 +__947: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 216))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) +__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)*20)).Fopcode) == OP_Once) { - goto __952 + goto __954 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*20)).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 + 164 + 6*4))++ goto jump_to_p2 -__190: +__191: ; - goto __8 + goto __9 -__8: +__9: ; - goto __6 -__6: - pOp += 20 - goto __5 goto __7 __7: + pOp += 20 + 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+3656, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) -__956: +__958: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) @@ -51193,52 +51364,56 @@ __956: Xsqlite3_log(tls, rc, ts+6079, libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) if !(int32((*Vdbe)(unsafe.Pointer(p)).FeVdbeState) == VDBE_RUN_STATE) { - goto __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 + 32)) |= 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 + 164 + 4*4)) += U32(int32(nVmStep)) + if !((*Vdbe)(unsafe.Pointer(p)).FlockMask != YDbMask(0)) { + goto __966 + } Xsqlite3VdbeLeave(tls, p) - +__966: + ; return rc too_big: @@ -51357,8 +51532,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(328) - defer tls.Free(328) + bp := tls.Alloc(332) + defer tls.Free(332) var nAttempt int32 var iCol int32 @@ -51378,7 +51553,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 + 324)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 328)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -51398,8 +51573,8 @@ __1: goto blob_open_out __3: ; - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) - *(*uintptr)(unsafe.Pointer(bp + 324)) = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 328))) + *(*uintptr)(unsafe.Pointer(bp + 328)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) @@ -51430,8 +51605,8 @@ __6: if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) - *(*uintptr)(unsafe.Pointer(bp + 324)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 328))) + *(*uintptr)(unsafe.Pointer(bp + 328)) = (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48)).FzErrMsg = uintptr(0) __8: ; @@ -51464,8 +51639,8 @@ __11: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) - *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6299, libc.VaList(bp+24, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 328))) + *(*uintptr)(unsafe.Pointer(bp + 328)) = Xsqlite3MPrintf(tls, db, ts+6299, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51545,8 +51720,8 @@ __25: if !(zFault != 0) { goto __30 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) - *(*uintptr)(unsafe.Pointer(bp + 324)) = Xsqlite3MPrintf(tls, db, ts+6340, libc.VaList(bp+32, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 328))) + *(*uintptr)(unsafe.Pointer(bp + 328)) = Xsqlite3MPrintf(tls, db, ts+6340, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -51615,7 +51790,7 @@ __31: goto blob_open_out __35: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+324) + rc = blobSeekToRow(tls, pBlob, iRow, bp+328) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } @@ -51643,12 +51818,12 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 324)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 328)) != 0 { return ts + 3656 } return uintptr(0) - }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 324)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 324))) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 328)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 328))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -51692,7 +51867,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) @@ -51775,7 +51950,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) @@ -54312,6 +54487,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+6374, 7) != 0 { + return 0 + } + zLegacy = (*Table)(unsafe.Pointer(pTab)).FzName + if libc.Xstrcmp(tls, zLegacy+uintptr(7), ts+6382+7) == 0 { + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+6401+7) == 0 { + return 1 + } + if pSchema == uintptr(0) { + return 0 + } + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+5876+7) == 0 { + return 1 + } + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+6420+7) == 0 { + return 1 + } + } else { + if Xsqlite3StrICmp(tls, zTab+uintptr(7), ts+6420+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(100) defer tls.Free(100) @@ -54331,7 +54534,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 @@ -54386,7 +54588,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6374, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6434, zDb) == 0) { goto __8 } @@ -54507,7 +54709,7 @@ __16: goto __14 __32: ; - if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6379) != 0) { + if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+6439) != 0) { goto __33 } goto __14 @@ -54515,73 +54717,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+44) -__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 + 36 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pItem + 48)), 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 @@ -54593,28 +54813,28 @@ __40: return I16(j) }() if !(uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 36 + 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 += 16 - 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: @@ -54625,160 +54845,161 @@ __14: __15: ; if !(pMatch != 0) { - goto __49 + goto __54 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pMatch)).FiCursor *(*uintptr)(unsafe.Pointer(pExpr + 44)) = (*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 + 44)))).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+6381, zTab) == 0) { - goto __56 + goto __59 +__58: + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6441, 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+6385, zTab) == 0) { - goto __58 + goto __62 +__61: + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6445, 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 + 8)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6389, zTab) == 0) { - goto __60 + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6449, 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 += 16 - 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 + 44)) = pTab eNewExprOp = TK_COLUMN - goto __72 -__71: + goto __77 +__76: (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*Upsert)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNC + 8)))).FregData + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) eNewExprOp = TK_REGISTER -__72: +__77: ; - goto __70 -__69: + goto __75 +__74: ; *(*uintptr)(unsafe.Pointer(pExpr + 44)) = 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 + 8)) + (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 = uint8(SQLITE_AFF_INTEGER) - goto __76 -__75: + goto __81 +__80: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == 0) { - goto __77 + goto __82 } *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { @@ -54787,8 +55008,8 @@ __75: } return U32(1) << iCol }() - goto __78 -__77: + goto __83 +__82: ; *(*U32)(unsafe.Pointer(pParse + 148)) |= func() uint32 { if iCol >= 32 { @@ -54796,19 +55017,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 && @@ -54816,81 +55037,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 = uint8(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 + 8)) j = 0 -__81: +__86: if !(j < (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { - goto __83 + goto __88 } zAs = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*20)).FzEName if !(int32(*(*uint16)(unsafe.Pointer(pEList + 8 + uintptr(j)*20 + 8 + 4))&0x3>>0) == ENAME_NAME && Xsqlite3_stricmp(tls, zAs, zCol) == 0) { - goto __84 + goto __89 } pOrig = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*20)).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+6398, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6458, 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+6429, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6489, libc.VaList(bp+8, zAs)) return WRC_Abort -__86: +__91: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { - goto __87 + goto __92 } - Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6526, 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++ @@ -54903,144 +55124,144 @@ __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+6484, libc.VaList(bp+16, zCol)) + ts+6544, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+44, 0, uint32(unsafe.Sizeof(struct { FpTab uintptr F__ccgo_pad1 [4]byte }{}))) 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 + 6519 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6579 *(*uintptr)(unsafe.Pointer(pExpr + 20)) = *(*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 + 6528 + zErr = ts + 6588 } else { - zErr = ts + 6543 + zErr = ts + 6603 } if !(zDb != 0) { - goto __99 + goto __104 } - Xsqlite3ErrorMsg(tls, pParse, ts+6565, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) - goto __100 -__99: + Xsqlite3ErrorMsg(tls, pParse, ts+6625, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + goto __105 +__104: if !(zTab != 0) { - goto __101 + goto __106 } - Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp+56, zErr, zTab, zCol)) - goto __102 -__101: - Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+80, zErr, zCol)) -__102: + Xsqlite3ErrorMsg(tls, pParse, ts+6638, libc.VaList(bp+56, zErr, zTab, zCol)) + goto __107 +__106: + Xsqlite3ErrorMsg(tls, pParse, ts+6648, 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 + 56)) |= 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) } @@ -55084,15 +55305,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 + 6595 + var zIn uintptr = ts + 6655 if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6623 + zIn = ts + 6683 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6641 + zIn = ts + 6701 } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6659 + zIn = ts + 6719 } - Xsqlite3ErrorMsg(tls, pParse, ts+6677, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6737, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -55171,10 +55392,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 + 6697 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6757 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6702 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6762 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -55221,7 +55442,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+6708, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6768, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -55285,7 +55506,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*20)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6725, libc.VaList(bp, pExpr)) + ts+6785, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -55301,7 +55522,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+6789, + Xsqlite3ErrorMsg(tls, pParse, ts+6849, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55315,7 +55536,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+6825, uintptr(0), pExpr) + notValidImpl(tls, pParse, pNC, ts+6885, uintptr(0), pExpr) } } else { @@ -55338,30 +55559,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+6853, libc.VaList(bp+16, pExpr)) + ts+6913, 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 + 6896 + zType = ts + 6956 } else { - zType = ts + 6903 + zType = ts + 6963 } - Xsqlite3ErrorMsg(tls, pParse, ts+6913, libc.VaList(bp+24, zType, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+6973, 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+6941, libc.VaList(bp+40, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7001, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6963, + Xsqlite3ErrorMsg(tls, pParse, ts+7023, 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+7007, + ts+7067, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -55433,7 +55654,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+7055, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7115, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20))) } @@ -55449,7 +55670,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+7066, pExpr, pExpr) + notValidImpl(tls, pParse, pNC, ts+7126, pExpr, pExpr) } break @@ -55505,7 +55726,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+6466, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6526, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -55580,7 +55801,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7077, libc.VaList(bp, i, zType, mx)) + ts+7137, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -55600,7 +55821,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7133, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7193, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -55635,7 +55856,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+7167, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + resolveOutOfRangeError(tls, pParse, ts+7227, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { @@ -55692,7 +55913,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 8 + 4))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7173, libc.VaList(bp, i+1)) + ts+7233, libc.VaList(bp, i+1)) return 1 } } @@ -55720,7 +55941,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7234, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7294, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -55934,7 +56155,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7265, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7325, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -55974,7 +56195,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+7167) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7227) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -55985,7 +56206,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7304) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7364) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -55997,7 +56218,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+7310, 0) + ts+7370, 0) return WRC_Abort } @@ -56097,12 +56318,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 224)) += (*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 + 220)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 224)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg @@ -56138,12 +56359,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 220)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 224)) += (*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 + 220)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 224)) -= (*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)) @@ -56253,33 +56474,134 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 // SELECT * FROM t1 WHERE (select a from t1); func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { 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 + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) - } - if op == TK_SELECT { - return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList+8)).FpExpr) - } - 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 + 20)))).FpEList+8+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*20)).FpExpr) - } - if op == TK_VECTOR { - return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20))+8)).FpExpr) + for 1 != 0 { + if op == TK_COLUMN || op == TK_AGG_COLUMN && *(*uintptr)(unsafe.Pointer(pExpr + 44)) != uintptr(0) { + return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) + } + if op == TK_SELECT { + return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList+8)).FpExpr) + } + 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 + 20)))).FpEList+8+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*20)).FpExpr) + } + if op == TK_VECTOR { + return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20))+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 + 20)) + + for ii = 1; ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr; ii = ii + 2 { + res = res | Xsqlite3ExprDataType(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*20)).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)*20)).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. @@ -56349,7 +56671,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 + 44)) != uintptr(0) || + op == TK_COLUMN || op == TK_TRIGGER { var j int32 if libc.AssignInt32(&j, int32((*Expr)(unsafe.Pointer(p)).FiColumn)) >= 0 { @@ -56684,7 +57007,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6526, 0) return } @@ -56759,7 +57082,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7369, libc.VaList(bp, mxHeight)) + ts+7429, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -57008,10 +57331,10 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7417, + Xsqlite3ErrorMsg(tls, pParse, ts+7477, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7461 + return ts + 7521 } return ts + 1547 }(), nElem)) @@ -57052,7 +57375,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+7463) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7523) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -57078,7 +57401,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7465, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7525, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 20)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -57106,7 +57429,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+7499, libc.VaList(bp, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+7559, libc.VaList(bp, pExpr)) } } } @@ -57153,7 +57476,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 120 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7519, + Xsqlite3ErrorMsg(tls, pParse, ts+7579, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return @@ -57178,7 +57501,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 120 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7562, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7622, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -57753,7 +58076,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+7585, + Xsqlite3ErrorMsg(tls, pParse, ts+7645, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -57876,7 +58199,7 @@ func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7615, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7675, libc.VaList(bp, zObject)) } } @@ -57932,10 +58255,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+6697) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6757) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6702) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6762) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -58366,13 +58689,13 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int3 // Return TRUE if the given string is a row-id column name. func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { - if Xsqlite3StrICmp(tls, z, ts+7638) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7698) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7646) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7706) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7652) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7712) == 0 { return 1 } return 0 @@ -58576,7 +58899,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+7656, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7716, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr @@ -58654,7 +58977,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+7703, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7763, 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) @@ -58748,7 +59071,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 + 7734 + var zFmt uintptr = ts + 7794 Xsqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp, nActual, nExpect)) } } @@ -58766,7 +59089,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 + 20)))).FpEList)).FnExpr, 1) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6526, 0) } } @@ -58807,7 +59130,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+7778, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7838, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselId)) } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 44 + 4)), @@ -58837,11 +59160,11 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 20)) var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7801, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7861, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 1547 } - return ts + 7820 + return ts + 7880 }(), (*Select)(unsafe.Pointer(pSelect)).FselId)) if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { @@ -58968,7 +59291,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { pSel = *(*uintptr)(unsafe.Pointer(pExpr + 20)) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7832, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7892, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 44 + 4)), *(*int32)(unsafe.Pointer(pExpr + 44))) @@ -58983,12 +59306,13 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7850, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7910, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 1547 } - return ts + 7820 + return ts + 7880 }(), (*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 { @@ -59009,7 +59333,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+7463) + pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7523) if pLimit != 0 { (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = uint8(SQLITE_AFF_NUMERIC) pLimit = Xsqlite3PExpr(tls, pParse, TK_NE, @@ -59018,7 +59342,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+7871) + pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7931) (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) } (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 @@ -59404,8 +59728,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+7873, 2) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7876, + if Xsqlite3_strnicmp(tls, z, ts+7933, 2) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7936, libc.VaList(bp, func() uintptr { if negFlag != 0 { return ts + 4925 @@ -59481,7 +59805,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)*16))).FcolFlags)&COLFLAG_VIRTUAL != 0 { var pParse uintptr = Xsqlite3VdbeParser(tls, v) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_BUSY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7903, + Xsqlite3ErrorMsg(tls, pParse, ts+7963, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else { var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab @@ -59567,8 +59891,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(72) - defer tls.Free(72) + bp := tls.Alloc(76) + defer tls.Free(76) var nFarg int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -59654,14 +59978,16 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI case INLINEFUNC_affinity: { - *(*[5]uintptr)(unsafe.Pointer(bp + 52)) = [5]uintptr{ts + 7933, ts + 7938, ts + 7943, ts + 6184, ts + 6179} + *(*[6]uintptr)(unsafe.Pointer(bp + 52)) = [6]uintptr{ts + 7993, ts + 7998, ts + 8003, ts + 6184, + ts + 6179, ts + 8011} var aff uint8 aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) + Xsqlite3VdbeLoadString(tls, v, target, func() uintptr { if int32(aff) <= SQLITE_AFF_NONE { - return ts + 7951 + return ts + 8019 } return *(*uintptr)(unsafe.Pointer(bp + 52 + uintptr(int32(aff)-SQLITE_AFF_BLOB)*4)) }()) @@ -59675,7 +60001,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 @@ -59698,10 +60024,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) @@ -59801,7 +60127,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 @@ -59931,12 +60257,13 @@ __2: __6: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo - pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20 + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*16 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) { @@ -59945,110 +60272,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)*16)).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 + 44)) == 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 + 44)), 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 + 44)) if !(iCol < 0) { - goto __70 + goto __73 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab -__70: +__73: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*16 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { - goto __71 + goto __74 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { - goto __73 + goto __76 } - Xsqlite3ErrorMsg(tls, pParse, ts+7903, + Xsqlite3ErrorMsg(tls, pParse, ts+7963, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 -__73: +__76: ; *(*U16)(unsafe.Pointer(pCol1 + 12)) |= 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 + 12)) &= 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 + 44)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, @@ -60091,13 +60431,13 @@ __14: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { - 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 @@ -60107,11 +60447,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)))) @@ -60134,11 +60474,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) @@ -60147,15 +60487,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 @@ -60182,20 +60522,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 @@ -60204,9 +60544,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 @@ -60244,14 +60584,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+7956, libc.VaList(bp+8, pExpr)) - goto __88 -__87: - return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem -__88: + Xsqlite3ErrorMsg(tls, pParse, ts+8024, 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 @@ -60262,17 +60604,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 + 44)))).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 + 20)) if pFarg != 0 { @@ -60284,128 +60626,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+7983, libc.VaList(bp+16, pExpr)) + Xsqlite3ErrorMsg(tls, pParse, ts+8051, 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)*20)).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)*20)).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 + 44)) += 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*20)).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 @@ -60413,42 +60755,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 + 20)))).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+7585, + Xsqlite3ErrorMsg(tls, pParse, ts+7645, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) -__119: +__122: ; return (*Expr)(unsafe.Pointer(pLeft2)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) @@ -60471,23 +60813,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: @@ -60504,42 +60846,44 @@ __53: Xsqlite3VdbeAddOp2(tls, v, OP_Param, p1, target) if !(iCol1 >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab2)).FaCol+uintptr(iCol1)*16)).Faffinity) == SQLITE_AFF_REAL) { - goto __123 + goto __126 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) -__123: +__126: ; goto __5 __54: - Xsqlite3ErrorMsg(tls, pParse, ts+6466, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6526, 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)*20)).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)*20)).FiSorterColumn), + int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo1)).FaCol+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*16)).FiSorterColumn), target) inReg = target goto __5 -__126: +__129: ; -__124: +__127: ; addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) @@ -60560,15 +60904,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)) @@ -60578,22 +60922,22 @@ __128: pTest = bp + 100 *(*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 + 100)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr - goto __133 -__132: + goto __136 +__135: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*20)).FpExpr -__133: +__136: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -60602,21 +60946,21 @@ __133: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*20)).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)*20)).FpExpr, target) - goto __135 -__134: + goto __138 +__137: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) -__135: +__138: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) @@ -60626,27 +60970,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+8007, 0) + ts+8075, 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 { @@ -60655,7 +60999,7 @@ __138: return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) -__139: +__142: ; goto __5 @@ -60666,7 +61010,7 @@ __5: return inReg } -var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 8057)) +var zAff = *(*[10]uint8)(unsafe.Pointer(ts + 8125)) // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -62041,18 +62385,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)*20)).FpCExpr == pExpr { + if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*16)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { - (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(iAgg)*20)).FpCExpr = pExpr + (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(iAgg)*16)).FpCExpr = pExpr Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) } } } else { - if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*20)).FpFExpr == pExpr { + if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*16)).FpFExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { - (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*20)).FpFExpr = pExpr + (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*16)).FpFExpr = pExpr Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) } } @@ -62082,7 +62426,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { db, (*AggInfo)(unsafe.Pointer(pInfo)).FaCol, int32(unsafe.Sizeof(AggInfo_col{})), - pInfo+32, + pInfo+24, bp) return *(*int32)(unsafe.Pointer(bp)) } @@ -62095,12 +62439,110 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { db, (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc, int32(unsafe.Sizeof(AggInfo_func{})), - pInfo+44, + pInfo+36, 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 += 16 + 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)*16 + + (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab = *(*uintptr)(unsafe.Pointer(pExpr + 44)) + (*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 += 20 + 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(52) + defer tls.Free(52) + var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -62108,6 +62550,46 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 8)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { + 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, uint32(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)*16)).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: @@ -62122,81 +62604,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 += 20 - 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)*20 - - (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab = *(*uintptr)(unsafe.Pointer(pExpr + 44)) - (*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 += 20 - 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 } @@ -62218,34 +62627,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 += 20 - goto __10 - goto __12 - __12: + pItem += 16 + 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)*20 + pItem = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*16 (*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)), @@ -62335,7 +62743,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 + 156 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 160 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other @@ -62343,7 +62751,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 156 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 160 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } @@ -62394,11 +62802,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+8065, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6374, 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+8073, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8135, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -62410,13 +62818,13 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8101, + ts+8163, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8276, + ts+8338, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -62426,10 +62834,10 @@ func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8450, libc.VaList(bp, zDb, zDb)) + ts+8512, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8597, 0) + ts+8659, 0) } } @@ -62493,7 +62901,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8748, libc.VaList(bp, zName)) + ts+8810, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -62503,7 +62911,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8807, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8869, zName)) { goto __6 } goto exit_rename_table @@ -62512,7 +62920,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8813, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8875, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -62553,19 +62961,19 @@ __12: nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) Xsqlite3NestedParse(tls, pParse, - ts+8840, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8902, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) Xsqlite3NestedParse(tls, pParse, - ts+9024, + ts+9086, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) - if !(Xsqlite3FindTable(tls, db, ts+9329, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9391, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9345, + ts+9407, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -62573,7 +62981,7 @@ __13: goto __14 } Xsqlite3NestedParse(tls, pParse, - ts+9403, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9465, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; if !(pVTab != 0) { @@ -62585,7 +62993,7 @@ __14: __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9668, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9730, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -62597,7 +63005,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9681, + ts+9743, libc.VaList(bp, zErr, zDb, zTab)) } @@ -62643,12 +63051,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9719, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9781, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9751, 0) + ts+9813, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -62658,11 +63066,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 44 + 4)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9778) + ts+9840) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9837) + ts+9899) } if pDflt != 0 { @@ -62675,12 +63083,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9890) + ts+9952) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9936) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9998) } zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) @@ -62691,7 +63099,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } Xsqlite3NestedParse(tls, pParse, - ts+9963, + ts+10025, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 44)), zCol, *(*int32)(unsafe.Pointer(pNew + 44)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -62713,7 +63121,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10109, + ts+10171, libc.VaList(bp+40, zTab, zDb)) } } @@ -62761,14 +63169,14 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10339, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10401, 0) goto exit_begin_add_column __3: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10373, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10435, 0) goto exit_begin_add_column __4: ; @@ -62796,7 +63204,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nAlloc))) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10403, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10465, 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 } @@ -62836,18 +63244,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 + 10422 + zType = ts + 10484 } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10427 + zType = ts + 10489 } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10441, + Xsqlite3ErrorMsg(tls, pParse, ts+10503, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10459 + return ts + 10521 } - return ts + 10476 + return ts + 10538 }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -62931,7 +63339,7 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+10556, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; @@ -62948,17 +63356,17 @@ __11: ; bQuote = int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10515, + ts+10577, 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+10697, + ts+10759, 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+9668, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9730, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -63153,7 +63561,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) if pPtr == uintptr(0) { return uintptr(0) } - for pp = pParse + 272; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { + for pp = pParse + 276; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 12 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { @@ -63216,10 +63624,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+10828, + zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10890, libc.VaList(bp, zT, zN, func() uintptr { if *(*uint8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10851 + return ts + 10913 } return ts + 1547 }(), zWhen, @@ -63261,8 +63669,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+10853, 7) != 0 { - return Xsqlite3CorruptError(tls, 112777) + if Xsqlite3_strnicmp(tls, zSql, ts+10915, 7) != 0 { + return Xsqlite3CorruptError(tls, 113494) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { @@ -63279,7 +63687,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) @@ -63301,7 +63709,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+10861, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10923, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -63341,10 +63749,10 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn) *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10867, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10929, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { - return ts + 10851 + return ts + 10913 } return ts + 1547 }())) @@ -63520,8 +63928,8 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { } func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(324) - defer tls.Free(324) + bp := tls.Alloc(328) + defer tls.Free(328) var db uintptr @@ -63604,15 +64012,15 @@ __5: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+20, zDb, db, zSql, bTemp) - libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp + 20 - (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+300, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 300)).FpParse = bp + 20 + (*Walker)(unsafe.Pointer(bp + 300)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) - (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 300)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp + *(*uintptr)(unsafe.Pointer(bp + 300 + 24)) = bp (*RenameCtx)(unsafe.Pointer(bp)).FpTab = pTab if !(rc != SQLITE_OK) { @@ -63640,7 +64048,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+296, pSelect) + Xsqlite3WalkSelect(tls, bp+300, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -63673,13 +64081,13 @@ __15: renameTokenFind(tls, bp+20, bp, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) __16: ; - Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+300, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 20)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+300, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63692,7 +64100,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+300, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -63707,7 +64115,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FaCol+uintptr(i)*16) - Xsqlite3WalkExpr(tls, bp+296, pExpr) + Xsqlite3WalkExpr(tls, bp+300, pExpr) goto __24 __24: i++ @@ -63763,8 +64171,8 @@ __7: if !((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+300, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+300, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+20) @@ -63812,7 +64220,7 @@ __39: renameColumnIdlistNames(tls, bp+20, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger)).FpColumns, zOld) __43: ; - renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) + renameWalkTrigger(tls, bp+300, (*Parse)(unsafe.Pointer(bp+20)).FpNewTrigger) __35: ; __8: @@ -63880,8 +64288,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(356) - defer tls.Free(356) + bp := tls.Alloc(360) + defer tls.Free(360) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -63923,11 +64331,11 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 44)) - libc.Xmemset(tls, bp+324, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 324)).FpParse = bp + 48 + libc.Xmemset(tls, bp+328, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 328)).FpParse = bp + 48 *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+324) + Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+328) if (*Parse)(unsafe.Pointer(bp+48)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 48)).Frc } else { @@ -64020,8 +64428,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(324) - defer tls.Free(324) + bp := tls.Alloc(328) + defer tls.Free(328) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64039,16 +64447,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+276, 0, uint32(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+296, 0, uint32(unsafe.Sizeof(Walker{}))) - (*Walker)(unsafe.Pointer(bp + 296)).FpParse = bp - (*Walker)(unsafe.Pointer(bp + 296)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + libc.Xmemset(tls, bp+280, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+300, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp + 300)).FpParse = bp + (*Walker)(unsafe.Pointer(bp + 300)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) - (*Walker)(unsafe.Pointer(bp + 296)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { + (*Walker)(unsafe.Pointer(bp + 300)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) - *(*uintptr)(unsafe.Pointer(bp + 296 + 24)) = bp + 276 + *(*uintptr)(unsafe.Pointer(bp + 300 + 24)) = bp + 280 if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { @@ -64063,31 +64471,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+296, pSelect) + Xsqlite3WalkSelect(tls, bp+300, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+296, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+300, (*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+296, + Xsqlite3WalkExpr(tls, bp+300, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*16)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+296, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+300, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+300, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+296, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) + renameWalkTrigger(tls, bp+300, (*Parse)(unsafe.Pointer(bp)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+276, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+280, zInput, uintptr(0), 0) } - renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+276)).FpList) + renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+280)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { @@ -64105,8 +64513,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(308) - defer tls.Free(308) + bp := tls.Alloc(312) + defer tls.Free(312) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -64132,9 +64540,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr *(*U64)(unsafe.Pointer(db + 32)) |= U64(flags & (SQLITE_DqsDML | SQLITE_DqsDDL)) if rc == SQLITE_OK { if isLegacy == 0 && (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 && int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { - libc.Xmemset(tls, bp+276, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 276)).FpParse = bp - Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+276) + libc.Xmemset(tls, bp+280, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 280)).FpParse = bp + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+280) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp)).Frc } @@ -64162,8 +64570,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(300) - defer tls.Free(300) + bp := tls.Alloc(304) + defer tls.Free(304) var db uintptr var iSchema int32 @@ -64200,7 +64608,7 @@ __1: goto __2 } - rc = Xsqlite3CorruptError(tls, 113724) + rc = Xsqlite3CorruptError(tls, 114441) goto drop_column_done __2: ; @@ -64224,7 +64632,7 @@ __6: ; __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10872, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10934, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) @@ -64305,17 +64713,17 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+10494, libc.VaList(bp, pName)) + Xsqlite3ErrorMsg(tls, pParse, ts+10556, libc.VaList(bp, pName)) goto exit_drop_column __6: ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10879, + Xsqlite3ErrorMsg(tls, pParse, ts+10941, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10907 + return ts + 10969 } return ts + 6120 }(), @@ -64326,7 +64734,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10919, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10981, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -64343,10 +64751,10 @@ __9: renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1547, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10967, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11029, 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+11088, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11150, 1) if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 @@ -64464,11 +64872,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 + 11106}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11127}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11147}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11166}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11185}} + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11168}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11189}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11209}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11228}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11247}} func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { bp := tls.Alloc(88) @@ -64502,7 +64910,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+11208, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + ts+11270, 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) } @@ -64511,10 +64919,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+11231, + ts+11293, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11261, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11323, 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) } @@ -64532,9 +64940,9 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11279, FzCols: ts + 11292}, - {FzName: ts + 11305, FzCols: ts + 11318}, - {FzName: ts + 11346}, + {FzName: ts + 11341, FzCols: ts + 11354}, + {FzName: ts + 11367, FzCols: ts + 11380}, + {FzName: ts + 11408}, } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64542,13 +64950,14 @@ var aTable = [3]struct { // information. type StatAccum1 = struct { Fdb uintptr + F__ccgo_pad1 [4]byte FnEst TRowcnt FnRow TRowcnt FnLimit int32 FnCol int32 FnKeyCol int32 FnSkipAhead U8 - F__ccgo_pad1 [7]byte + F__ccgo_pad2 [3]byte Fcurrent StatSample FnPSample TRowcnt FmxSample int32 @@ -64559,7 +64968,6 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr - F__ccgo_pad2 [4]byte } // Three SQL functions - stat_init(), stat_push(), and stat_get() - @@ -64633,7 +65041,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)*40) } - 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) } @@ -64679,13 +65087,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*4)))) - (*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*4)))) (*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*112 - (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(nColUp)*4 + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt = p + 1*120 + (*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 { @@ -64698,11 +65106,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*4)))) - (*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)*40 pSpace = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample+nCol)*40 for i = 0; i < mxSample+nCol; i++ { @@ -64726,17 +65134,17 @@ var statInitFuncdef = FuncDef{ FnArg: int8(4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11359} + FzName: ts + 11421} 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 } } @@ -64747,8 +65155,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 @@ -64791,7 +65199,7 @@ __3: goto __5 } pOld = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*40 - 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) { @@ -64819,7 +65227,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: ; @@ -64886,7 +65294,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)*40 - *(*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)*40) != 0 { sampleInsert(tls, p, pBest, i) } @@ -64902,8 +65310,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)*40)).FanEq + uintptr(j)*4)) == TRowcnt(0) { - *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*40)).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)*40)).FanEq + uintptr(j)*8)) == uint64(0) { + *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*40)).FanEq + uintptr(j)*8)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(j)*8)) } } } @@ -64920,9 +65328,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 { @@ -64930,14 +65338,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) } } @@ -64945,31 +65353,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*4))) == SQLITE_INTEGER { - sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4)))) + sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+40, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4)))) } else { - sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))), + sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+40, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))), Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4)))) } - (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiHash = libc.AssignPtrUint32(p+80, (*StatAccum)(unsafe.Pointer(p)).FiPrn*U32(1103515245)+U32(12345)) + (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiHash = libc.AssignPtrUint32(p+92, (*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)*40) != 0 { - sampleCopy(tls, p, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*40, p+32) + if i >= iChng || sampleIsBetterPost(tls, p, p+40, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*40) != 0 { + sampleCopy(tls, p, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*40, 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))) } } @@ -64977,7 +65385,7 @@ var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11369} + FzName: ts + 11431} func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(72) @@ -64991,20 +65399,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+11379, + Xsqlite3_str_appendf(tls, bp+24, ts+11441, 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+11384, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11446, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) @@ -65046,7 +65454,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+48, ts+11390, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11452, libc.VaList(bp+16, *(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*8)))) } if (*Sqlite3_str)(unsafe.Pointer(bp+48)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+48)).FnChar-- @@ -65060,7 +65468,7 @@ var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11396} + FzName: ts + 11458} 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) @@ -65104,7 +65512,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+11405, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11467, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { return } @@ -65121,7 +65529,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*64 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11279, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11341, uint32(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -6) @@ -65277,7 +65685,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+11415, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11477, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -5) @@ -65334,7 +65742,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+11415, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11477, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -65381,9 +65789,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 40)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11419) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11481) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11423) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11485) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -65469,16 +65877,16 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, z = ts + 1547 } for i = 0; *(*uint8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { - v = TRowcnt(0) + v = uint64(0) for libc.AssignInt32(&c, int32(*(*uint8)(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(*(*uint8)(unsafe.Pointer(z))) == ' ' { z++ @@ -65488,15 +65896,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 6, 0x40) for *(*uint8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11427, z) == 0 { + if Xsqlite3_strglob(tls, ts+11489, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11438, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11500, 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+11448, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11510, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*uint8)(unsafe.Pointer(z))) != 0 && int32(*(*uint8)(unsafe.Pointer(z))) != ' ' { @@ -65576,7 +65984,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) } @@ -65590,42 +65998,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)*20)).FanDLt + uintptr(iCol)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i+1)*20)).FanDLt + uintptr(iCol)*4)) { - sumEq = sumEq + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanEq + uintptr(iCol)*4)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanDLt + uintptr(iCol)*8)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i+1)*20)).FanDLt + uintptr(iCol)*8)) { + sumEq = sumEq + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).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 } } } @@ -65699,15 +66107,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui } pSpace = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(nSample)*20 (*Index)(unsafe.Pointer(pIdx)).FaAvgEq = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) *(*U32)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable + 28)) |= U32(TF_HasStat4) for i = 0; i < nSample; i++ { (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*20)).FanEq = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*20)).FanLt = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*20)).FanDLt = pSpace - pSpace += 4 * uintptr(nIdxCol) + pSpace += 8 * uintptr(nIdxCol) } } @@ -65772,11 +66180,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+11305, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11367, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11460, - ts+11514, + ts+11522, + ts+11576, zDb) } return rc @@ -65823,10 +66231,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { (*AnalysisInfo)(unsafe.Pointer(bp + 8)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11279, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11341, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11566, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) + ts+11628, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -65884,12 +66292,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)*16)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6374, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6434, zName) == 0) } func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { - bp := tls.Alloc(44) - defer tls.Free(44) + bp := tls.Alloc(48) + defer tls.Free(48) var i int32 var rc int32 @@ -65900,13 +66308,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 + 32)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 36)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) + pNew = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 44)) = uintptr(0) _ = NotUsed zFile = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -65927,128 +66338,151 @@ __2: goto __3 } - *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3_vfs_find(tls, ts+3828) - if !(*(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0)) { + *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, ts+3828) + if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } return __5: ; + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), ts+11669, 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)*16 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 + 28)), ts+11607, db, pNew+4, 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 + 120 + 7*4))+2) { - goto __7 + goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11610, + *(*uintptr)(unsafe.Pointer(bp + 44)) = Xsqlite3MPrintf(tls, db, ts+11672, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 120 + 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 + 40)) = Xsqlite3MPrintf(tls, db, ts+11647, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 44)) = Xsqlite3MPrintf(tls, db, ts+11709, 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+476) { - goto __12 + goto __16 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(Db{}))*uint32(3))) if !(aNew == uintptr(0)) { - goto __14 + goto __18 } return -__14: +__18: ; libc.Xmemcpy(tls, aNew, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint32(unsafe.Sizeof(Db{}))*uint32(2)) - goto __13 -__12: + goto __17 +__16: aNew = Xsqlite3DbRealloc(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(uint32(unsafe.Sizeof(Db{}))*uint32((*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)*16 libc.Xmemset(tls, pNew, 0, uint32(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+28, bp+32, bp+36) + *(*uint32)(unsafe.Pointer(bp + 28)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags + rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+28, bp+32, bp+36, bp+40) 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 + 36)), -1) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 40)), -1) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) return -__16: +__20: ; - *(*uint32)(unsafe.Pointer(bp + 24)) |= uint32(SQLITE_OPEN_MAIN_DB) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28)), *(*uintptr)(unsafe.Pointer(bp + 32)), db, pNew+4, 0, int32(*(*uint32)(unsafe.Pointer(bp + 24)))) + *(*uint32)(unsafe.Pointer(bp + 28)) |= uint32(SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), *(*uintptr)(unsafe.Pointer(bp + 36)), db, pNew+4, 0, int32(*(*uint32)(unsafe.Pointer(bp + 28)))) (*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 + 40)) = Xsqlite3MPrintf(tls, db, ts+11677, 0) - goto __19 -__18: + *(*uintptr)(unsafe.Pointer(bp + 44)) = Xsqlite3MPrintf(tls, db, ts+11739, 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 + 40)) = Xsqlite3MPrintf(tls, db, - ts+11706, 0) + *(*uintptr)(unsafe.Pointer(bp + 44)) = Xsqlite3MPrintf(tls, db, + ts+11768, 0) rc = SQLITE_ERROR -__23: +__27: ; -__22: +__26: ; Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) @@ -66058,89 +66492,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 + 32))) + Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) if !(rc == SQLITE_OK) { - goto __25 + goto __29 } Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) if !!(int32(*(*uint8)(unsafe.Pointer(db + 172 + 8))&0x4>>2) != 0) { - goto __26 + goto __30 } - rc = Xsqlite3Init(tls, db, bp+40) -__26: + rc = Xsqlite3Init(tls, db, bp+44) +__30: ; Xsqlite3BtreeLeaveAll(tls, db) -__25: +__29: ; if !(rc != 0) { - goto __27 + goto __31 } if !!(int32(*(*uint8)(unsafe.Pointer(db + 172 + 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)*16)).FpBt != 0) { - goto __29 + goto __33 } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpBt = uintptr(0) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).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 + 40))) - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) - goto __31 -__30: - if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { - goto __32 + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 44))) + *(*uintptr)(unsafe.Pointer(bp + 44)) = Xsqlite3MPrintf(tls, db, ts+1483, 0) + goto __35 +__34: + if !(*(*uintptr)(unsafe.Pointer(bp + 44)) == uintptr(0)) { + goto __36 } - *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3MPrintf(tls, db, ts+11774, libc.VaList(bp+16, zFile)) -__32: + *(*uintptr)(unsafe.Pointer(bp + 44)) = Xsqlite3MPrintf(tls, db, ts+11836, libc.VaList(bp+16, zFile)) +__36: ; -__31: +__35: ; -__28: +__32: ; goto attach_error -__27: +__31: ; return attach_error: - if !(*(*uintptr)(unsafe.Pointer(bp + 40)) != 0) { - goto __33 + if !(*(*uintptr)(unsafe.Pointer(bp + 44)) != 0) { + goto __37 } - Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 40)), -1) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40))) -__33: + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 44)), -1) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 44))) +__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) { @@ -66194,14 +66628,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11802, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11864, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11823, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11885, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -66209,7 +66643,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11849, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24, ts+11911, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -66251,42 +66685,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, uint32(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) @@ -66295,13 +66735,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) @@ -66320,7 +66760,7 @@ var detach_func = FuncDef{ FnArg: int8(1), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11871} + FzName: ts + 11933} // Called by the parser to compile an ATTACH statement. // @@ -66333,7 +66773,7 @@ var attach_func = FuncDef{ FnArg: int8(3), FfuncFlags: U32(SQLITE_UTF8), FxSFunc: 0, - FzName: ts + 11885} + FzName: ts + 11947} func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { bp := tls.Alloc(8) @@ -66347,7 +66787,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+11899, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11961, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -66379,7 +66819,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+11923, + ts+11985, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -66554,7 +66994,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+11969, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12031, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -66580,11 +67020,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+11992, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+12054, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11998, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12060, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+12004, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12066, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -66631,7 +67071,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName } else { - zCol = ts + 7646 + zCol = ts + 7706 } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -66655,7 +67095,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+12031, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12093, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -66880,6 +67320,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) @@ -66892,13 +67335,13 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+200)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+204)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+204)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+204)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+204)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+200)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+204)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+204)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -66923,25 +67366,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { - if Xsqlite3StrICmp(tls, zDatabase, ts+6374) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6434) == 0 { i = 0 } else { return uintptr(0) } } p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, zName) - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+6374, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6401+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6420+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5876+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12079) + ts+6382) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6420+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, - ts+5886) + ts+5876) } } } @@ -66962,12 +67405,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8065, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12065+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5886) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12046+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+6374, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6420+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5876) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6401+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+12079) + ts+6382) } } } @@ -66998,7 +67441,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+404, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12098, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12108, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -67016,14 +67459,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 + 12106 + zMsg = ts + 12116 } else { - zMsg = ts + 12119 + zMsg = ts + 12129 } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6578, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6638, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6588, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6648, libc.VaList(bp+24, zMsg, zName)) } } else { } @@ -67053,12 +67496,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+8065, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5886+7) == 0 { - return ts + 12065 + if Xsqlite3_strnicmp(tls, zName, ts+6374, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5876+7) == 0 { + return ts + 6420 } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12079+7) == 0 { - return ts + 12046 + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+6382+7) == 0 { + return ts + 6401 } } return zName @@ -67416,7 +67859,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+5886) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5876) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -67442,7 +67885,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { goto __3 } - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6374, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6434, zName) { goto __3 } @@ -67495,13 +67938,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+12133, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12143, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12150, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12160, libc.VaList(bp, pName1)) return -1 } } else { @@ -67543,9 +67986,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+8065, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+6374, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12170, + Xsqlite3ErrorMsg(tls, pParse, ts+12180, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -67705,9 +68148,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 + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }()) *(*uintptr)(unsafe.Pointer(bp + 24)) = pName1 goto __2 @@ -67723,7 +68166,7 @@ __3: goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+12212, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12222, 0) return __4: ; @@ -67751,9 +68194,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10422 + return ts + 10484 } - return ts + 8807 + return ts + 8869 }(), zName) != 0) { goto __8 } @@ -67769,9 +68212,9 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -67802,12 +68245,12 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12253, + Xsqlite3ErrorMsg(tls, pParse, ts+12263, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { - return ts + 10422 + return ts + 10484 } - return ts + 8807 + return ts + 8869 }(), *(*uintptr)(unsafe.Pointer(bp + 24)))) goto __16 __15: @@ -67822,7 +68265,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12274, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12284, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; @@ -67909,7 +68352,7 @@ var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0 func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12309, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12319, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -67933,7 +68376,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+12326, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12336, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) @@ -67953,7 +68396,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 + 12309 + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12319 (*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) @@ -67965,7 +68408,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - if Xsqlite3HashInsert(tls, pHash, ts+12309, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12319, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -67999,7 +68442,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12370, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -68007,13 +68450,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) } if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12383, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12393, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24)).Fn-- } if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12390, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12400, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24)).Fn-- @@ -68050,7 +68493,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12400, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12410, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -68214,10 +68657,10 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*16 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12426, + Xsqlite3ErrorMsg(tls, pParse, ts+12436, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12471, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12481, 0) } else { var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Expr{}))) @@ -68248,7 +68691,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12512, 0) + ts+12522, 0) } } @@ -68293,7 +68736,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12564, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12574, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -68382,7 +68825,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12605, 0) + ts+12615, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -68477,7 +68920,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12661, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12671, 0) goto generated_done __2: ; @@ -68490,13 +68933,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12704, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12714, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12712, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12722, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -68524,12 +68967,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+12719, + Xsqlite3ErrorMsg(tls, pParse, ts+12729, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -68651,12 +69101,12 @@ __3: n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1547 - zSep2 = ts + 12750 + zSep2 = ts + 12760 zEnd = ts + 4950 } else { - zSep = ts + 12752 - zSep2 = ts + 12756 - zEnd = ts + 12761 + zSep = ts + 12762 + zSep2 = ts + 12766 + zEnd = ts + 12771 } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -68664,7 +69114,7 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12764, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12774, 0) *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8)), 1)))) = uint8('(') @@ -68702,11 +69152,12 @@ __6: return zStmt } -var azType1 = [5]uintptr{ +var azType1 = [6]uintptr{ ts + 1547, - ts + 12778, - ts + 12784, - ts + 12789, + ts + 12788, + ts + 12794, + ts + 12799, + ts + 12804, ts + 12794, } @@ -69114,10 +69565,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12800, + ts+12810, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1547))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12833, + Xsqlite3ErrorMsg(tls, pParse, ts+12843, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -69136,11 +69587,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+12860, 0) + ts+12870, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12910, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12920, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -69174,7 +69625,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12942, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12952, 0) return } } @@ -69199,11 +69650,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 + 8807 - zType2 = ts + 12986 + zType = ts + 8869 + zType2 = ts + 12996 } else { - zType = ts + 10422 - zType2 = ts + 12992 + zType = ts + 10484 + zType2 = ts + 13002 } if pSelect != 0 { @@ -69265,7 +69716,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 200 + pEnd2 = pParse + 204 } else { pEnd2 = pEnd } @@ -69274,11 +69725,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+12997, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13007, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } Xsqlite3NestedParse(tls, pParse, - ts+13012, + ts+13022, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -69294,13 +69745,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+13110, + ts+13120, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13152, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13162, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { @@ -69315,7 +69766,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9329) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9391) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -69345,7 +69796,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+13186, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13196, 0) goto create_view_fail __1: ; @@ -69361,7 +69812,7 @@ __2: Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10422, *(*uintptr)(unsafe.Pointer(bp))) + Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10484, *(*uintptr)(unsafe.Pointer(bp))) if !(Xsqlite3FixSelect(tls, bp+4, pSelect) != 0) { goto __3 } @@ -69443,7 +69894,7 @@ func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { } if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13222, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13232, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -69471,8 +69922,7 @@ func viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { pTable+34, pTable+4) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Table)(unsafe.Pointer(pTable)).FnCol) == (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr { - Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTable, pSel, - uint8(SQLITE_AFF_NONE)) + Xsqlite3SubqueryColumnTypes(tls, pParse, pTable, pSel, uint8(SQLITE_AFF_NONE)) } } else { (*Table)(unsafe.Pointer(pTable)).FnCol = (*Table)(unsafe.Pointer(pSelTab)).FnCol @@ -69569,13 +70019,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+13252, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13262, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) Xsqlite3NestedParse(tls, pParse, - ts+13267, + ts+13277, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*16)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -69616,10 +70066,10 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16)).FzDbSName for i = 1; i <= 4; i++ { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13334, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40, ts+13344, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11231, + ts+11293, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } @@ -69651,12 +70101,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+13348, + ts+13358, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } Xsqlite3NestedParse(tls, pParse, - ts+13393, + ts+13403, 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) @@ -69684,11 +70134,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+8065, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6374, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3279, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7066, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7126, 10) == 0 { return 0 } return 1 @@ -69766,9 +70216,9 @@ __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zArg2 = uintptr(0) @@ -69827,21 +70277,21 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13460, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13470, 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+13488, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13498, 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+13522, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13532, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -69853,7 +70303,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11423, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11485, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -69917,7 +70367,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13554, + ts+13564, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -69929,7 +70379,7 @@ __2: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+13617, 0) + ts+13627, 0) goto fk_end goto __7 __6: @@ -70014,7 +70464,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13711, + ts+13721, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -70241,12 +70691,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 8 + 4))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).Ffg.FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13757, + Xsqlite3ErrorMsg(tls, pParse, ts+13767, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13785 + return ts + 13795 } - return ts + 13791 + return ts + 13801 }())) return 1 } @@ -70367,7 +70817,7 @@ __9: ; __8: ; - Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13796, *(*uintptr)(unsafe.Pointer(bp + 128))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13806, *(*uintptr)(unsafe.Pointer(bp + 128))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -70386,7 +70836,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13802, + ts+13812, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -70412,26 +70862,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6374, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13852, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13862, 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+13880, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13890, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13905, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13915, 0) goto exit_create_index __17: ; @@ -70445,7 +70895,7 @@ __17: goto exit_create_index __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13796, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13806, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -70460,7 +70910,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13939, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13949, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -70472,7 +70922,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13973, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13983, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -70501,7 +70951,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13997, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14007, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -70522,9 +70972,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -70563,7 +71013,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13796) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13806) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -70664,7 +71114,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+14020, 0) + ts+14030, 0) goto exit_create_index __56: ; @@ -70881,7 +71331,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14081, libc.VaList(bp+48, 0)) + ts+14091, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -70933,8 +71383,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14123, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121090) + Xsqlite3ErrorMsg(tls, pParse, ts+14133, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 121835) goto exit_create_index __101: ; @@ -70980,12 +71430,12 @@ __104: n1-- __107: ; - zStmt = Xsqlite3MPrintf(tls, db, ts+14140, + zStmt = Xsqlite3MPrintf(tls, db, ts+14150, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1547 } - return ts + 14160 + return ts + 14170 }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz)) goto __106 __105: @@ -70993,7 +71443,7 @@ __105: __106: ; Xsqlite3NestedParse(tls, pParse, - ts+14168, + ts+14178, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -71007,7 +71457,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14227, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14237, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -71168,7 +71618,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14254, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14264, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -71183,7 +71633,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14272, libc.VaList(bp+8, 0)) + ts+14282, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -71194,9 +71644,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -71222,9 +71672,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14345, + ts+14355, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11419, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11481, (*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) @@ -71359,7 +71809,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+14405, + Xsqlite3ErrorMsg(tls, pParse, ts+14415, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -71567,12 +72017,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+14441, + Xsqlite3ErrorMsg(tls, pParse, ts+14451, libc.VaList(bp, func() uintptr { if (*OnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - return ts + 14477 + return ts + 14487 } - return ts + 14480 + return ts + 14490 }())) goto append_from_error __1: @@ -71741,7 +72191,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14486, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14496, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -71777,9 +72227,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14492 + return ts + 14502 } - return ts + 14501 + return ts + 14511 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -71804,7 +72254,7 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14486, ts + 14508, ts + 14492} +var az = [3]uintptr{ts + 14496, ts + 14518, ts + 14502} // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. @@ -71819,7 +72269,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+14516, 0) + ts+14526, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -71956,14 +72406,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 + 120))) if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 { - Xsqlite3_str_appendf(tls, bp+8, ts+14586, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3_str_appendf(tls, bp+8, ts+14596, 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)))*16)).FzCnName if j != 0 { - Xsqlite3_str_append(tls, bp+8, ts+14597, 2) + Xsqlite3_str_append(tls, bp+8, ts+14607, 2) } Xsqlite3_str_appendall(tls, bp+8, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3_str_append(tls, bp+8, ts+1560, 1) @@ -71989,11 +72439,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+11992, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12054, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14600, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14610, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-6), @@ -72123,7 +72573,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14609, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14619, 0) } // Return a KeyInfo structure that is appropriate for the given Index. @@ -72219,7 +72669,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+12+uintptr(i)*24)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14655, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14665, libc.VaList(bp, zName)) } } } @@ -72412,7 +72862,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14685, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14695, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -72692,7 +73142,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 + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+14716, + Xsqlite3ErrorMsg(tls, pParse, ts+14726, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) } return 0 @@ -72724,11 +73174,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+14749, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14759, 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+14778, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14788, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -73232,7 +73682,7 @@ __61: if !(memCnt != 0) { goto __62 } - Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14816) + Xsqlite3CodeChangeCount(tls, v, memCnt, ts+14826) __62: ; delete_from_cleanup: @@ -73347,7 +73797,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+11279) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11341) { Xsqlite3VdbeAppendP4(tls, v, pTab, -5) } if int32(eMode) != ONEPASS_OFF { @@ -73577,7 +74027,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 + 6184, ts + 6179, ts + 7938, ts + 7933, ts + 6174} +var azType2 = [5]uintptr{ts + 6184, ts + 6179, ts + 7998, ts + 7993, ts + 6174} func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { _ = argc @@ -73636,7 +74086,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+14829, -1) + Xsqlite3_result_error(tls, context, ts+14839, -1) return } iVal = -iVal @@ -73940,7 +74390,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14846, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) + zBuf = Xsqlite3_mprintf(tls, ts+14856, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -74286,7 +74736,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 120 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14851, -1) + Xsqlite3_result_error(tls, context, ts+14861, -1) return } if argc == 3 { @@ -74296,7 +74746,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+14884, -1) + ts+14894, -1) return } escape = Xsqlite3Utf8Read(tls, bp) @@ -74395,7 +74845,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+14929, libc.VaList(bp+8, r1)) + Xsqlite3_str_appendf(tls, pStr, ts+14939, libc.VaList(bp+8, r1)) } } break @@ -74410,21 +74860,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++ { *(*uint8)(unsafe.Pointer(zText + uintptr(i*2+2))) = hexdigits[int32(*(*uint8)(unsafe.Pointer(zBlob + uintptr(i))))>>4&0x0F] *(*uint8)(unsafe.Pointer(zText + uintptr(i*2+3))) = hexdigits[int32(*(*uint8)(unsafe.Pointer(zBlob + uintptr(i))))&0x0F] } - *(*uint8)(unsafe.Pointer(zText + uintptr(nBlob*2+2))) = uint8('\'') - *(*uint8)(unsafe.Pointer(zText + uintptr(nBlob*2+3))) = uint8(0) + *(*uint8)(unsafe.Pointer(zText + uintptr(nBlob*int64(2)+int64(2)))) = uint8('\'') + *(*uint8)(unsafe.Pointer(zText + uintptr(nBlob*int64(2)+int64(3)))) = uint8(0) *(*uint8)(unsafe.Pointer(zText)) = uint8('X') *(*uint8)(unsafe.Pointer(zText + 1)) = uint8('\'') - (*StrAccum)(unsafe.Pointer(pStr)).FnChar = U32(nBlob*2 + 3) + (*StrAccum)(unsafe.Pointer(pStr)).FnChar = U32(nBlob*int64(2) + int64(3)) } break @@ -74432,7 +74882,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+14936, libc.VaList(bp+24, zArg)) + Xsqlite3_str_appendf(tls, pStr, ts+14946, libc.VaList(bp+24, zArg)) break } @@ -74546,6 +74996,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(4) + defer tls.Free(4) + + 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(4) + defer tls.Free(4) + + 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 + 1547 + 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*4))) + nPass = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) +__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(p)-int32(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 @@ -74748,7 +75311,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } var lenOne = [1]uint32{uint32(1)} -var azOne = [1]uintptr{ts + 10851} +var azOne = [1]uintptr{ts + 10913} func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(8) @@ -74784,7 +75347,7 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { *(*uint8)(unsafe.Pointer(bp + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { - Xsqlite3_result_text(tls, context, ts+14939, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14949, 4, uintptr(0)) } } @@ -74809,7 +75372,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+12031, -1) + Xsqlite3_result_error(tls, context, ts+12093, -1) return } @@ -74887,7 +75450,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+14829, -1) + Xsqlite3_result_error(tls, context, ts+14839, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -75149,7 +75712,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+14944, 2) + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14954, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -75169,14 +75732,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14950, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14960, 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+14950, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14960, 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+14950, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14950, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14960, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14960, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -75306,17 +75869,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 } } @@ -75375,6 +75938,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) } @@ -75415,108 +75979,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(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14955}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14975}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14988}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 15006}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15015}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15023}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15038}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15064}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15089}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15098}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15109}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15116}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15130}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15136}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15136}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15142}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15142}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15147}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15147}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15147}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15151}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15151}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15151}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15155}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15162}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15170}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15177}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15183}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15190}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15197}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15205}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15210}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15214}, +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(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14965}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14998}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 15016}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15025}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15033}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 15033}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15048}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15074}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15099}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15108}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15119}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_sqlite_offset), FxSFunc: 0, FzName: ts + 15126}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15140}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15140}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15146}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15146}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15152}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15152}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15157}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15157}, + {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 + 15157}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15161}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15161}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15161}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15165}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15172}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15180}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15187}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15193}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15200}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15207}, + {FnArg: int8(-1), 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 + 15220}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15226}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15232}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15236}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15243}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15250}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15261}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15268}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15283}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15300}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15311}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15317}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15335}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15343}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15357}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15365}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15374}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15381}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15391}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15395}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15401}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15405}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15405}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15230}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15236}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15242}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15246}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15246}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15252}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15259}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15266}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15277}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15284}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15299}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15316}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15327}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15333}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15351}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15359}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15373}, + {FnArg: int8(1), 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 + 15390}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15390}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15397}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15407}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15411}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15411}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15424}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14950}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6519}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15429}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15434}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15442}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15448}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15454}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15457}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15461}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15467}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15457}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15472}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15476}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15480}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15486}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15490}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15495}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15500}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15505}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15417}, + {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 + 15421}, + {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 + 15421}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15427}, + {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 + 15427}, + {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 + 15440}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14960}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14960}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6579}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 6579}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15445}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15450}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15458}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15464}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15470}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15473}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15477}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15483}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15473}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15488}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15492}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15496}, + {FnArg: int8(2), 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 + 15511}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15515}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15519}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15523}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15528}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15533}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15538}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15516}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15521}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15527}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15531}, + {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 + 15539}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15544}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15550}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15556}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15561}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15569}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15577}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15580}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6519}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15585}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15549}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15554}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15560}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15566}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15572}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15577}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15585}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15593}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15596}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 6579}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15601}} // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. @@ -75637,7 +76203,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+15589, + ts+15605, 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) @@ -76297,8 +76863,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6385, Fn: uint32(3)} - *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6381, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 24)) = Token{Fz: ts + 6445, Fn: uint32(3)} + *(*Token)(unsafe.Pointer(bp + 32)) = Token{Fz: ts + 6441, Fn: uint32(3)} var iFromCol int32 var pEq uintptr @@ -76798,7 +77364,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7903, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7963, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -77266,7 +77832,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15634, + ts+15650, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -77291,7 +77857,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15675, + Xsqlite3ErrorMsg(tls, pParse, ts+15691, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer(pColumn+8+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -77440,7 +78006,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15707, + ts+15723, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -77450,7 +78016,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15759, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15775, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -77502,7 +78068,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15784, + Xsqlite3ErrorMsg(tls, pParse, ts+15800, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -77510,7 +78076,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15830, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15846, 0) goto insert_cleanup __57: ; @@ -77922,7 +78488,7 @@ __124: if !(regRowCount != 0) { goto __125 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15851) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+15867) __125: ; insert_cleanup: @@ -78237,8 +78803,9 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+12054, 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) @@ -79327,7 +79894,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)) { @@ -79773,6 +80340,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 { @@ -79811,7 +80379,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12031, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+12093, 0) __3: ; return SQLITE_ERROR @@ -79820,7 +80388,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15865 + zEntry = ts + 15881 } if !(nMsg > uint64(FILENAME_MAX)) { @@ -79835,7 +80403,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11992, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+12054, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -79871,7 +80439,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15888, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15904, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -79885,7 +80453,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15897, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15913, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -79909,7 +80477,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15901, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15917, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -79927,7 +80495,7 @@ __10: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15907, libc.VaList(bp+16, zEntry, zFile)) + ts+15923, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __22: ; @@ -79954,7 +80522,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15950, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15966, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) @@ -79992,7 +80560,7 @@ extension_not_found: } Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56)), - ts+15982, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15998, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56))) __29: ; @@ -80002,7 +80570,7 @@ __28: } var azEndings = [1]uintptr{ - ts + 16019, + ts + 16035, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { @@ -80157,7 +80725,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+16022, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) + ts+16038, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -80166,62 +80734,62 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { var pragCName = [57]uintptr{ ts + 5050, - ts + 16061, - ts + 8807, - ts + 16065, - ts + 16070, - ts + 16073, - ts + 16083, - ts + 16093, - ts + 16099, - ts + 16103, - ts + 16108, - ts + 16113, - ts + 16121, - ts + 16132, - ts + 16135, - ts + 16142, - ts + 16103, - ts + 16108, - ts + 16149, - ts + 16154, - ts + 16157, - ts + 16164, + ts + 16077, + ts + 8869, + ts + 16081, + ts + 16086, + ts + 16089, ts + 16099, - ts + 16103, + ts + 16109, + ts + 16115, + ts + 16119, + ts + 16124, + ts + 16129, + ts + 16137, + ts + 16148, + ts + 16151, + ts + 16158, + ts + 16119, + ts + 16124, + ts + 16165, ts + 16170, - ts + 16175, + ts + 16173, ts + 16180, - ts + 16103, - ts + 16184, - ts + 16108, - ts + 16192, + ts + 16115, + ts + 16119, + ts + 16186, + ts + 16191, ts + 16196, - ts + 16201, - ts + 11423, - ts + 11419, - ts + 16207, + ts + 16119, + ts + 16200, + ts + 16124, + ts + 16208, ts + 16212, ts + 16217, - ts + 16061, - ts + 16103, - ts + 16222, - ts + 16229, - ts + 16236, - ts + 8807, - ts + 16244, - ts + 5053, - ts + 16250, - ts + 16061, - ts + 16103, - ts + 16255, + ts + 11485, + ts + 11481, + ts + 16223, + ts + 16228, + ts + 16233, + ts + 16077, + ts + 16119, + ts + 16238, + ts + 16245, + ts + 16252, + ts + 8869, ts + 16260, - ts + 15457, - ts + 16265, - ts + 16278, - ts + 16287, + ts + 5053, + ts + 16266, + ts + 16077, + ts + 16119, + ts + 16271, + ts + 16276, + ts + 15473, + ts + 16281, ts + 16294, - ts + 16305, + ts + 16303, + ts + 16310, + ts + 16321, } // Definitions of all built-in pragmas @@ -80238,238 +80806,238 @@ type PragmaName1 = struct { type PragmaName = PragmaName1 var aPragmaName = [66]PragmaName{ - {FzName: ts + 16313, + {FzName: ts + 16329, FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16328, + {FzName: ts + 16344, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_APPLICATION_ID)}, - {FzName: ts + 16343, + {FzName: ts + 16359, FePragTyp: U8(PragTyp_AUTO_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16355, + {FzName: ts + 16371, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_AutoIndex)}, - {FzName: ts + 16371, + {FzName: ts + 16387, FePragTyp: U8(PragTyp_BUSY_TIMEOUT), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(56), FnPragCName: U8(1)}, - {FzName: ts + 16294, + {FzName: ts + 16310, FePragTyp: U8(PragTyp_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16384, + {FzName: ts + 16400, FePragTyp: U8(PragTyp_CACHE_SPILL), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16396, + {FzName: ts + 16412, FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 16416, + {FzName: ts + 16432, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CellSizeCk)}, - {FzName: ts + 16432, + {FzName: ts + 16448, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_CkptFullFSync)}, - {FzName: ts + 16453, + {FzName: ts + 16469, FePragTyp: U8(PragTyp_COLLATION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(38), FnPragCName: U8(2)}, - {FzName: ts + 16468, + {FzName: ts + 16484, FePragTyp: U8(PragTyp_COMPILE_OPTIONS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16484, + {FzName: ts + 16500, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(0x00001) << 32}, - {FzName: ts + 16498, + {FzName: ts + 16514, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), FiArg: uint64(BTREE_DATA_VERSION)}, - {FzName: ts + 16511, + {FzName: ts + 16527, FePragTyp: U8(PragTyp_DATABASE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(47), FnPragCName: U8(3)}, - {FzName: ts + 16525, + {FzName: ts + 16541, FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), FiPragCName: U8(55), FnPragCName: U8(1)}, - {FzName: ts + 16544, + {FzName: ts + 16560, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_DeferFKs)}, - {FzName: ts + 16563, + {FzName: ts + 16579, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_NullCallback)}, - {FzName: ts + 16586, + {FzName: ts + 16602, FePragTyp: U8(PragTyp_ENCODING), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 16595, + {FzName: ts + 16611, FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(43), FnPragCName: U8(4)}, - {FzName: ts + 16613, + {FzName: ts + 16629, FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - {FzName: ts + 16630, + {FzName: ts + 16646, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ForeignKeys)}, - {FzName: ts + 16643, + {FzName: ts + 16659, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - {FzName: ts + 16658, + {FzName: ts + 16674, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullColNames)}, - {FzName: ts + 16676, + {FzName: ts + 16692, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_FullFSync)}, - {FzName: ts + 16686, + {FzName: ts + 16702, FePragTyp: U8(PragTyp_FUNCTION_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(27), FnPragCName: U8(6)}, - {FzName: ts + 16700, + {FzName: ts + 16716, FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 16716, + {FzName: ts + 16732, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_IgnoreChecks)}, - {FzName: ts + 16741, + {FzName: ts + 16757, FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - {FzName: ts + 16760, + {FzName: ts + 16776, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(3)}, - {FzName: ts + 16771, + {FzName: ts + 16787, FePragTyp: U8(PragTyp_INDEX_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(38), FnPragCName: U8(5)}, - {FzName: ts + 16782, + {FzName: ts + 16798, FePragTyp: U8(PragTyp_INDEX_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(21), FnPragCName: U8(6), FiArg: uint64(1)}, - {FzName: ts + 16794, + {FzName: ts + 16810, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16810, + {FzName: ts + 16826, FePragTyp: U8(PragTyp_JOURNAL_MODE), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16823, + {FzName: ts + 16839, FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16842, + {FzName: ts + 16858, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_LegacyAlter)}, - {FzName: ts + 16861, + {FzName: ts + 16877, FePragTyp: U8(PragTyp_LOCKING_MODE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16874, + {FzName: ts + 16890, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16889, + {FzName: ts + 16905, FePragTyp: U8(PragTyp_MMAP_SIZE)}, - {FzName: ts + 16899, + {FzName: ts + 16915, FePragTyp: U8(PragTyp_MODULE_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16911, + {FzName: ts + 16927, FePragTyp: U8(PragTyp_OPTIMIZE), FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - {FzName: ts + 16920, + {FzName: ts + 16936, FePragTyp: U8(PragTyp_PAGE_COUNT), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - {FzName: ts + 16931, + {FzName: ts + 16947, FePragTyp: U8(PragTyp_PAGE_SIZE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 16941, + {FzName: ts + 16957, FePragTyp: U8(PragTyp_PRAGMA_LIST), FmPragFlg: U8(PragFlg_Result0), FiPragCName: U8(9), FnPragCName: U8(1)}, - {FzName: ts + 16953, + {FzName: ts + 16969, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_QueryOnly)}, - {FzName: ts + 16964, + {FzName: ts + 16980, FePragTyp: U8(PragTyp_INTEGRITY_CHECK), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - {FzName: ts + 16976, + {FzName: ts + 16992, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReadUncommit)}, - {FzName: ts + 16993, + {FzName: ts + 17009, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_RecTriggers)}, - {FzName: ts + 17012, + {FzName: ts + 17028, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ReverseOrder)}, - {FzName: ts + 17038, + {FzName: ts + 17054, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_SCHEMA_VERSION)}, - {FzName: ts + 17053, + {FzName: ts + 17069, FePragTyp: U8(PragTyp_SECURE_DELETE), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17067, + {FzName: ts + 17083, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_ShortColNames)}, - {FzName: ts + 17086, + {FzName: ts + 17102, FePragTyp: U8(PragTyp_SHRINK_MEMORY), FmPragFlg: U8(PragFlg_NoColumns)}, - {FzName: ts + 17100, + {FzName: ts + 17116, FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17116, + {FzName: ts + 17132, FePragTyp: U8(PragTyp_SYNCHRONOUS), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - {FzName: ts + 17128, + {FzName: ts + 17144, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(6)}, - {FzName: ts + 17139, + {FzName: ts + 17155, FePragTyp: U8(PragTyp_TABLE_LIST), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), FiPragCName: U8(15), FnPragCName: U8(6)}, - {FzName: ts + 17150, + {FzName: ts + 17166, FePragTyp: U8(PragTyp_TABLE_INFO), FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FiPragCName: U8(8), FnPragCName: U8(7), FiArg: uint64(1)}, - {FzName: ts + 17162, + {FzName: ts + 17178, FePragTyp: U8(PragTyp_TEMP_STORE), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - {FzName: ts + 17173, + {FzName: ts + 17189, FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: U8(PragFlg_NoColumns1)}, - {FzName: ts + 17194, + {FzName: ts + 17210, FePragTyp: U8(PragTyp_THREADS), FmPragFlg: U8(PragFlg_Result0)}, - {FzName: ts + 17202, + {FzName: ts + 17218, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_TrustedSchema)}, - {FzName: ts + 17217, + {FzName: ts + 17233, FePragTyp: U8(PragTyp_HEADER_VALUE), FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), FiArg: uint64(BTREE_USER_VERSION)}, - {FzName: ts + 17230, + {FzName: ts + 17246, FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - {FzName: ts + 17249, + {FzName: ts + 17265, FePragTyp: U8(PragTyp_WAL_CHECKPOINT), FmPragFlg: U8(PragFlg_NeedSchema), FiPragCName: U8(50), FnPragCName: U8(3)}, - {FzName: ts + 17264, + {FzName: ts + 17280, FePragTyp: U8(PragTyp_FLAG), FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, @@ -80491,7 +81059,7 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { return dflt } -var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17280)) +var zText = *(*[25]uint8)(unsafe.Pointer(ts + 17296)) 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)} @@ -80503,10 +81071,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+17305) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17321) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17315) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17331) { return PAGER_LOCKINGMODE_NORMAL } } @@ -80515,13 +81083,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+7951) { + if 0 == Xsqlite3StrICmp(tls, z, ts+8019) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17322) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17338) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17327) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17343) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -80536,9 +81104,9 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { func getTempStore(tls *libc.TLS, z uintptr) int32 { if int32(*(*uint8)(unsafe.Pointer(z))) >= '0' && int32(*(*uint8)(unsafe.Pointer(z))) <= '2' { return int32(*(*uint8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+16255) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16271) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17339) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17355) == 0 { return 2 } else { return 0 @@ -80552,7 +81120,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17346, 0) + ts+17362, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -80643,19 +81211,19 @@ func actionName(tls *libc.TLS, action U8) uintptr { var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17408 + zName = ts + 17424 break case OE_SetDflt: - zName = ts + 17417 + zName = ts + 17433 break case OE_Cascade: - zName = ts + 17429 + zName = ts + 17445 break case OE_Restrict: - zName = ts + 17437 + zName = ts + 17453 break default: - zName = ts + 17446 + zName = ts + 17462 break } return zName @@ -80672,7 +81240,7 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { } var azModeName = [6]uintptr{ - ts + 17456, ts + 17463, ts + 17471, ts + 17475, ts + 17339, ts + 17484, + ts + 17472, ts + 17479, ts + 17487, ts + 17491, ts + 17355, ts + 17500, } func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { @@ -80719,13 +81287,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17488 + zType = ts + 17504 } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17490 + zType = ts + 17506 } else { - zType = ts + 7461 + zType = ts + 7521 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17492, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17508, 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), @@ -80733,7 +81301,7 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var azEnc = [4]uintptr{uintptr(0), ts + 17499, ts + 17504, ts + 17512} +var azEnc = [4]uintptr{uintptr(0), ts + 17515, ts + 17520, ts + 17528} func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { var addr int32 @@ -80884,14 +81452,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 @@ -80978,7 +81548,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17520, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17536, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -81239,7 +81809,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17524) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17540) == 0) { goto __64 } b = 2 @@ -81311,7 +81881,7 @@ __71: goto __15 __20: - zRet = ts + 17315 + zRet = ts + 17331 eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -81349,7 +81919,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17305 + zRet = ts + 17321 __83: ; returnSingleText(tls, v, zRet) @@ -81636,7 +82206,7 @@ __123: if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 536)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17529, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17545, 0) Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)) goto pragma_out __126: @@ -81677,7 +82247,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17554, 0) + ts+17570, 0) goto __133 __132: if !(iDb != 1) { @@ -81731,7 +82301,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17607) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17623) == 0) { goto __142 } @@ -81828,9 +82398,9 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17613 + return ts + 17629 } - return ts + 17621 + return ts + 17637 }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, @@ -81899,7 +82469,7 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17628, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17644, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } @@ -81945,29 +82515,29 @@ __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __178 } - zType = ts + 10422 + zType = ts + 10484 goto __179 __178: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __180 } - zType = ts + 12704 + zType = ts + 12714 goto __181 __180: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __182 } - zType = ts + 17644 + zType = ts + 17660 goto __183 __182: - zType = ts + 8807 + zType = ts + 8869 __183: ; __181: ; __179: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17651, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17667, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -82033,7 +82603,7 @@ __190: goto __192 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17658, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17674, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -82043,7 +82613,7 @@ __190: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __193 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17663, + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17679, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -82080,8 +82650,8 @@ __196: if !(pIdx1 != 0) { goto __198 } - *(*[3]uintptr)(unsafe.Pointer(bp + 544)) = [3]uintptr{ts + 17668, ts + 17670, ts + 16132} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17672, + *(*[3]uintptr)(unsafe.Pointer(bp + 544)) = [3]uintptr{ts + 17684, ts + 17686, ts + 16148} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17688, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), @@ -82114,7 +82684,7 @@ __199: goto __200 __202: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17678, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17694, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FpBt))) @@ -82136,7 +82706,7 @@ __203: goto __205 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17682, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17698, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __204 __204: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -82200,7 +82770,7 @@ __215: goto __217 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7521, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __216 __216: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -82216,7 +82786,7 @@ __218: if !(i6 < int32(uint32(unsafe.Sizeof(aPragmaName))/uint32(unsafe.Sizeof(PragmaName{})))) { goto __220 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7461, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7521, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __219 __219: i6++ @@ -82251,7 +82821,7 @@ __226: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __228 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17685, + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17701, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -82259,7 +82829,7 @@ __226: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17694)) + ts+17710)) goto __227 __227: j2++ @@ -82448,7 +83018,7 @@ __256: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __257: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17699, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17715, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560))) @@ -82665,7 +83235,7 @@ __284: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17703, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17719, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -6) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -82726,262 +83296,284 @@ __299: Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 568)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) - mxCol = int32((*Table)(unsafe.Pointer(pTab9)).FnCol) - 1 -__300: - if !(mxCol >= 0 && - (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(mxCol)*16)).FcolFlags)&COLFLAG_VIRTUAL != 0 || - int32((*Table)(unsafe.Pointer(pTab9)).FiPKey) == mxCol)) { - goto __301 + if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { + goto __300 + } + mxCol = -1 + j4 = 0 +__302: + if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { + goto __304 + } + if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { + goto __305 + } + mxCol++ +__305: + ; + goto __303 +__303: + j4++ + goto __302 + goto __304 +__304: + ; + if !(mxCol == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { + goto __306 } mxCol-- - goto __300 +__306: + ; + goto __301 +__300: + mxCol = int32((*Index)(unsafe.Pointer(Xsqlite3PrimaryKeyIndex(tls, pTab9))).FnColumn) - 1 __301: ; if !(mxCol >= 0) { - goto __302 + goto __307 } - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), mxCol, 3) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 568)), mxCol, 3) Xsqlite3VdbeTypeofColumn(tls, v, 3) -__302: +__307: ; if !!(isQuick != 0) { - goto __303 + goto __308 } if !(pPk1 != 0) { - goto __304 + goto __309 } a1 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 568)), 0, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, r2) zErr = Xsqlite3MPrintf(tls, db, - ts+17727, + ts+17743, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -6) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, a1) Xsqlite3VdbeJumpHere(tls, v, a1+1) j4 = 0 -__305: +__310: if !(j4 < int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) { - goto __307 + goto __312 } Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pPk1, *(*int32)(unsafe.Pointer(bp + 568)), j4, r2+j4) - goto __306 -__306: + goto __311 +__311: j4++ - goto __305 - goto __307 -__307: + goto __310 + goto __312 +__312: ; -__304: +__309: ; -__303: +__308: ; bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 -__308: +__313: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { - goto __310 + goto __315 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*16 if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { - goto __311 + goto __316 } - goto __309 -__311: + goto __314 +__316: ; if !(bStrict != 0) { - goto __312 + goto __317 } doTypeCheck = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) > COLTYPE_ANY) - goto __313 -__312: + goto __318 +__317: doTypeCheck = libc.Bool32(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) > SQLITE_AFF_BLOB) -__313: +__318: ; if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0) == 0 && !(doTypeCheck != 0)) { - goto __314 + goto __319 } - goto __309 -__314: + goto __314 +__319: ; p4 = SQLITE_NULL if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_VIRTUAL != 0) { - goto __315 + goto __320 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), j4, 3) p11 = -1 p3 = 3 - goto __316 -__315: + goto __321 +__320: if !((*Column)(unsafe.Pointer(pCol1)).FiDflt != 0) { - goto __317 + goto __322 } *(*uintptr)(unsafe.Pointer(bp + 576)) = uintptr(0) Xsqlite3ValueFromExpr(tls, db, Xsqlite3ColumnExpr(tls, pTab9, pCol1), (*Sqlite3)(unsafe.Pointer(db)).Fenc, (*Column)(unsafe.Pointer(pCol1)).Faffinity, bp+576) if !(*(*uintptr)(unsafe.Pointer(bp + 576)) != 0) { - goto __318 + goto __323 } p4 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 576))) Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 576))) -__318: +__323: ; -__317: +__322: ; p11 = *(*int32)(unsafe.Pointer(bp + 568)) if !!((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - goto __319 + goto __324 } p3 = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab9), int16(j4))) - goto __320 -__319: + goto __325 +__324: p3 = int32(Xsqlite3TableColumnToStorage(tls, pTab9, int16(j4))) -__320: +__325: ; -__316: +__321: ; labelError = Xsqlite3VdbeMakeLabel(tls, pParse) labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf>>0)) != 0) { - goto __321 + goto __326 } jmp2 = Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x0f)) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17763, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17779, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) if !(doTypeCheck != 0) { - goto __322 + goto __327 } Xsqlite3VdbeGoto(tls, v, labelError) Xsqlite3VdbeJumpHere(tls, v, jmp2) - goto __323 -__322: + goto __328 +__327: ; -__323: +__328: ; -__321: +__326: ; if !(bStrict != 0 && doTypeCheck != 0) { - goto __324 + goto __329 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(aStdTypeMask[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17783, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17799, libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) - goto __325 -__324: + goto __330 +__329: if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_TEXT) { - goto __326 + goto __331 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17805, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17821, libc.VaList(bp+416, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) - goto __327 -__326: + goto __332 +__331: if !(!(bStrict != 0) && int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) >= SQLITE_AFF_NUMERIC) { - goto __328 + goto __333 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, p11, labelOk, p3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x1b)) if !(p11 >= 0) { - goto __329 + goto __334 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 568)), j4, 3) -__329: +__334: ; - Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17828, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, 3, 1, 0, ts+17844, -1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IsType, -1, labelOk, 3, p4) Xsqlite3VdbeChangeP5(tls, v, uint16(0x1c)) - zErr1 = Xsqlite3MPrintf(tls, db, ts+17830, + zErr1 = Xsqlite3MPrintf(tls, db, ts+17846, libc.VaList(bp+432, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -6) -__328: +__333: ; -__327: +__332: ; -__325: +__330: ; Xsqlite3VdbeResolveLabel(tls, v, labelError) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, labelOk) - goto __309 -__309: + goto __314 +__314: j4++ - goto __308 - goto __310 -__310: + goto __313 + goto __315 +__315: ; if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { - goto __330 + goto __335 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { - goto __331 + goto __336 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 568)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 -__332: +__337: if !(k3 > 0) { - goto __334 + goto __339 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*20)).FpExpr, addrCkFault, 0) - goto __333 -__333: + goto __338 +__338: k3-- - goto __332 - goto __334 -__334: + goto __337 + goto __339 +__339: ; 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+17850, + zErr2 = Xsqlite3MPrintf(tls, db, ts+17866, 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) -__331: +__336: ; Xsqlite3ExprListDelete(tls, db, pCheck) -__330: +__335: ; if !!(isQuick != 0) { - goto __335 + goto __340 } j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__336: +__341: if !(pIdx5 != 0) { - goto __338 + goto __343 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { - goto __339 + goto __344 } - goto __337 -__339: + goto __342 +__344: ; r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 568)), 0, 0, bp+580, pPrior, r1) @@ -82990,80 +83582,119 @@ __339: jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 572))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17880) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17896) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17885) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17901) 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 +__345: + if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { + goto __347 + } + if !(*(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FazColl + uintptr(kk)*4)) == uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))) { + goto __348 + } + goto __346 +__348: + ; + if !(label6 == 0) { + goto __349 + } + label6 = Xsqlite3VdbeMakeLabel(tls, pParse) +__349: + ; + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 572))+j4, kk, 3) + Xsqlite3VdbeAddOp3(tls, v, OP_Ne, 3, label6, r1+kk) + goto __346 +__346: + kk++ + goto __345 + goto __347 +__347: + ; + if !(label6 != 0) { + goto __350 + } + jmp6 = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + Xsqlite3VdbeResolveLabel(tls, v, label6) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17896) + Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17922) + Xsqlite3VdbeGoto(tls, v, jmp5-1) + Xsqlite3VdbeJumpHere(tls, v, jmp6) +__350: + ; if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { - goto __340 + goto __351 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 -__341: +__352: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { - goto __343 + goto __354 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FaiColumn + uintptr(kk)*2))) if !(iCol1 >= 0 && uint32(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(iCol1)*16 + 4))&0xf>>0)) != 0) { - goto __344 + goto __355 } - goto __342 -__344: + goto __353 +__355: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) - goto __342 -__342: + goto __353 +__353: kk++ - goto __341 - goto __343 -__343: + goto __352 + goto __354 +__354: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572))+j4) + jmp61 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 572))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) - Xsqlite3VdbeJumpHere(tls, v, jmp6) + Xsqlite3VdbeJumpHere(tls, v, jmp61) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 572))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17906) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17949) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) -__340: +__351: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 580))) - goto __337 -__337: + goto __342 +__342: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __336 - goto __338 -__338: + goto __341 + goto __343 +__343: ; -__335: +__340: ; Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 568)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { - goto __345 + goto __356 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17933) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17976) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex -__346: +__357: if !(pIdx5 != 0) { - goto __348 + goto __359 } if !(pPk1 == pIdx5) { - goto __349 + goto __360 } - goto __347 -__349: + goto __358 +__360: ; Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 572))+j4, 3) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, 8+j4, 0, 3) @@ -83072,21 +83703,21 @@ __349: Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 2, 3) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, addr1) - goto __347 -__347: + goto __358 +__358: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ - goto __346 - goto __348 -__348: + goto __357 + goto __359 +__359: ; if !(pPk1 != 0) { - goto __350 + goto __361 } Xsqlite3ReleaseTempRange(tls, pParse, r2, int32((*Index)(unsafe.Pointer(pPk1)).FnKeyCol)) -__350: +__361: ; -__345: +__356: ; goto __291 __291: @@ -83104,14 +83735,14 @@ __266: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(endCode))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { - goto __351 + goto __362 } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 564)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17962 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 18005 (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) -__351: +__362: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) @@ -83119,27 +83750,27 @@ __351: __45: if !!(zRight != 0) { - goto __352 + goto __363 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { - goto __354 + goto __365 } goto pragma_out -__354: +__365: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) - goto __353 -__352: + goto __364 +__363: if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { - goto __355 + goto __366 } pEnc = uintptr(unsafe.Pointer(&encnames1)) -__356: +__367: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { - goto __358 + goto __369 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { - goto __359 + goto __370 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc @@ -83148,25 +83779,25 @@ __356: } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) - goto __358 -__359: + goto __369 +__370: ; - goto __357 -__357: + goto __368 +__368: pEnc += 8 - goto __356 - goto __358 -__358: + goto __367 + goto __369 +__369: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { - goto __360 + goto __371 } - Xsqlite3ErrorMsg(tls, pParse, ts+17965, libc.VaList(bp+456, zRight)) -__360: + Xsqlite3ErrorMsg(tls, pParse, ts+18008, libc.VaList(bp+456, zRight)) +__371: ; -__355: +__366: ; -__353: +__364: ; goto __15 @@ -83174,15 +83805,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 __361 + goto __372 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(setCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { - goto __363 + goto __374 } goto __15 -__363: +__374: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp1 = iDb @@ -83190,41 +83821,41 @@ __363: (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fp5 = U16(1) if !(iCookie == BTREE_SCHEMA_VERSION && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { - goto __364 + goto __375 } (*VdbeOp)(unsafe.Pointer(aOp3 + 1*20)).Fopcode = U8(OP_Noop) -__364: +__375: ; - goto __362 -__361: + goto __373 +__372: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint32(unsafe.Sizeof(readCookie))/uint32(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { - goto __365 + goto __376 } goto __15 -__365: +__376: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*20)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) -__362: +__373: ; goto __15 __47: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 -__366: +__377: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { - goto __367 + goto __378 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) - goto __366 -__367: + goto __377 +__378: ; Xsqlite3VdbeReusable(tls, v) @@ -83239,31 +83870,31 @@ __48: }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { - goto __368 + goto __379 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17322) == 0) { - goto __369 + if !(Xsqlite3StrICmp(tls, zRight, ts+17338) == 0) { + goto __380 } eMode2 = SQLITE_CHECKPOINT_FULL - goto __370 -__369: - if !(Xsqlite3StrICmp(tls, zRight, ts+17990) == 0) { - goto __371 + goto __381 +__380: + if !(Xsqlite3StrICmp(tls, zRight, ts+18033) == 0) { + goto __382 } eMode2 = SQLITE_CHECKPOINT_RESTART - goto __372 -__371: - if !(Xsqlite3StrICmp(tls, zRight, ts+17475) == 0) { - goto __373 + goto __383 +__382: + if !(Xsqlite3StrICmp(tls, zRight, ts+17491) == 0) { + goto __384 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE -__373: +__384: ; -__372: +__383: ; -__370: +__381: ; -__368: +__379: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) @@ -83273,10 +83904,10 @@ __368: __49: if !(zRight != 0) { - goto __374 + goto __385 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) -__374: +__385: ; returnSingleInt(tls, v, func() int64 { @@ -83296,19 +83927,19 @@ __50: __51: if !(zRight != 0) { - goto __375 + goto __386 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { - goto __377 + goto __388 } goto __15 -__377: +__388: ; - goto __376 -__375: + goto __387 +__386: opMask = U32(0xfffe) -__376: +__387: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { @@ -83317,86 +83948,86 @@ __376: } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() -__378: +__389: if !(iDb <= iDbLast) { - goto __380 + goto __391 } if !(iDb == 1) { - goto __381 + goto __392 } - goto __379 -__381: + goto __390 +__392: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst -__382: +__393: if !(k4 != 0) { - goto __384 + goto __395 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { - goto __385 + goto __396 } - goto __383 -__385: + goto __394 +__396: ; szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex -__386: +__397: if !(pIdx6 != 0) { - goto __388 + goto __399 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 56))&0x80>>7) != 0) { - goto __389 + goto __400 } szThreshold = int16(0) - goto __388 -__389: + goto __399 +__400: ; - goto __387 -__387: + goto __398 +__398: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext - goto __386 - goto __388 -__388: + goto __397 + goto __399 +__399: ; if !(szThreshold != 0) { - goto __390 + goto __401 } 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)) -__390: +__401: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17998, + zSubSql = Xsqlite3MPrintf(tls, db, ts+18041, libc.VaList(bp+464, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { - goto __391 + goto __402 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -6) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) - goto __392 -__391: + goto __403 +__402: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -6) -__392: +__403: ; - goto __383 -__383: + goto __394 +__394: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext - goto __382 - goto __384 -__384: + goto __393 + goto __395 +__395: ; - goto __379 -__379: + goto __390 +__390: iDb++ - goto __378 - goto __380 -__380: + goto __389 + goto __391 +__391: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 @@ -83404,36 +84035,36 @@ __380: __52: ; if !(zRight != 0) { - goto __393 + goto __404 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) -__393: +__404: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 __53: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+584) == SQLITE_OK) { - goto __394 + goto __405 } Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584))) -__394: +__405: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 __54: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { - goto __395 + goto __406 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 592)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 592)))) { - goto __396 + goto __407 } Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592))) -__396: +__407: ; -__395: +__406: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 @@ -83442,10 +84073,10 @@ __55: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK && *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) >= int64(0)) { - goto __397 + goto __408 } Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600))&int64(0x7fffffff))) -__397: +__408: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 @@ -83454,10 +84085,10 @@ __56: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { - goto __398 + goto __409 } (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) & int64(0x7fffffff)) -__398: +__409: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) goto __15 @@ -83465,10 +84096,10 @@ __398: __15: ; if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { - goto __399 + goto __410 } -__399: +__410: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) @@ -83520,14 +84151,14 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Goto), Fp2: int8(3)}, } var encnames1 = [9]EncName{ - {FzName: ts + 18016, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18021, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 18027, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18036, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18045, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 18053, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 18061}, - {FzName: ts + 18068}, + {FzName: ts + 18059, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18064, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 18070, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18079, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18088, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 18096, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 18104}, + {FzName: ts + 18111}, {}, } var setCookie = [2]VdbeOpList{ @@ -83579,7 +84210,7 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+56, int32(unsafe.Sizeof([200]uint8{})), 0) - Xsqlite3_str_appendall(tls, bp+32, ts+18074) + Xsqlite3_str_appendall(tls, bp+32, ts+18117) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -83587,7 +84218,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32, ts+18089, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+18132, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = uint8(',') } @@ -83600,16 +84231,16 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18096, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+18139, 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+18102) + Xsqlite3_str_appendall(tls, bp+32, ts+18145) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32, ts+18114) + Xsqlite3_str_appendall(tls, bp+32, ts+18157) j++ } Xsqlite3_str_append(tls, bp+32, ts+4950, 1) @@ -83792,13 +84423,13 @@ __2: __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 120 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32, ts+18129) + Xsqlite3_str_appendall(tls, bp+32, ts+18172) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18137, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18180, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 16)) != 0 { - Xsqlite3_str_appendf(tls, bp+32, ts+18141, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+18184, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { @@ -83875,12 +84506,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+18145, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+18188, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 136321) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 137196) } else { var z uintptr var zObj uintptr @@ -83889,19 +84520,19 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 5001 } - z = Xsqlite3MPrintf(tls, db, ts+18173, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+18216, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*uint8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+18204, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18247, 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 + 18212, - ts + 18219, - ts + 18231, + ts + 18255, + ts + 18262, + ts + 18274, } // Check to see if any sibling index (another index on the same table) @@ -83961,7 +84592,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), db+172) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14123) + corruptSchema(tls, pData, argv, ts+14133) } } libc.SetBitFieldPtr8Uint32(db+172+8, uint32(0), 0, 0x1) @@ -83993,13 +84624,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+18242) + corruptSchema(tls, pData, argv, ts+18285) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), pIndex+44) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14123) + corruptSchema(tls, pData, argv, ts+14133) } } } @@ -84032,16 +84663,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 + 8807 + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8869 *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) - *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7871 - *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18255 + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7931 + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18298 *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40)).FiDb = iDb @@ -84119,17 +84750,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 + 68 + 4*4))&3 != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { - goto __13 + goto __15 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11706) + ts+11768) rc = SQLITE_ERROR goto initone_error_out -__13: +__15: ; __11: ; @@ -84138,44 +84778,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 + 68 + 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 + 68 + 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+18327) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18370) rc = SQLITE_ERROR goto initone_error_out -__17: +__19: ; if !(iDb == 0 && *(*int32)(unsafe.Pointer(bp + 68 + 1*4)) >= 4) { - goto __18 + goto __20 } *(*U64)(unsafe.Pointer(db + 32)) &= libc.CplUint64(uint64(SQLITE_LegacyFileFmt)) -__18: +__20: ; (*InitData)(unsafe.Pointer(bp + 40)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+18351, + ts+18394, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -84186,57 +84826,57 @@ __18: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc == SQLITE_OK) { - goto __19 + goto __21 } rc = (*InitData)(unsafe.Pointer(bp + 40)).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)*16 - 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)*16)).FpSchema + 78)) |= 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 @@ -84325,8 +84965,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)*16)).FpSchema)).Fschema_cookie { + if int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).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 { @@ -84439,8 +85081,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(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+160)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+204)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+204)) (*Parse)(unsafe.Pointer(pParse)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse @@ -84451,8 +85093,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(292) - defer tls.Free(292) + bp := tls.Alloc(296) + defer tls.Free(296) var rc int32 var i int32 @@ -84464,8 +85106,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF var pT uintptr rc = SQLITE_OK - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+156)-uint32(uintptr(0)+4)) - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+200)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+200)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+4)), 0, uint32(uintptr(0)+160)-uint32(uintptr(0)+4)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+204)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+204)) (*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 @@ -84505,7 +85147,7 @@ __4: goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18385, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18428, libc.VaList(bp, zDb)) goto end_prepare __8: @@ -84535,7 +85177,7 @@ __9: if !(nBytes > mxLen) { goto __12 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18415, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18458, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __12: @@ -84631,7 +85273,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) @@ -84730,7 +85372,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 @@ -85048,8 +85690,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 + 10851 - var zSp2 uintptr = ts + 10851 + var zSp1 uintptr = ts + 10913 + var zSp2 uintptr = ts + 10913 if pB == uintptr(0) { zSp1++ } @@ -85057,13 +85699,13 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC zSp2++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18434, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) + ts+18477, libc.VaList(bp, pA, zSp1, pB, zSp2, pC)) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18464)) +var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 18507)) var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -85238,7 +85880,7 @@ __1: var pUsing uintptr = uintptr(0) if uint32(int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x400>>10)) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 48)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18498, libc.VaList(bp, 0)) + ts+18541, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -85283,7 +85925,7 @@ __1: tableAndColumnIndex(tls, pSrc, 0, i, zName, bp+24, bp+28, int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18548, libc.VaList(bp+8, zName)) + ts+18591, libc.VaList(bp+8, zName)) return 1 } pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 28))) @@ -85294,7 +85936,7 @@ __1: int32(*(*uint16)(unsafe.Pointer(pRight + 36 + 4))&0x1000>>12)) != 0 { if int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*72 + 36 + 4))&0x400>>10) == 0 || Xsqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*72 + 48)), zName) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18612, + Xsqlite3ErrorMsg(tls, pParse, ts+18655, libc.VaList(bp+16, zName)) break } @@ -85338,7 +85980,7 @@ __3: return 0 } -var tkCoalesce = Token{Fz: ts + 6519, Fn: uint32(8)} +var tkCoalesce = Token{Fz: ts + 6579, 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. @@ -85685,9 +86327,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) @@ -85925,16 +86564,16 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { var z uintptr switch id { case TK_ALL: - z = ts + 18649 + z = ts + 18692 break case TK_INTERSECT: - z = ts + 18659 + z = ts + 18702 break case TK_EXCEPT: - z = ts + 18669 + z = ts + 18712 break default: - z = ts + 18676 + z = ts + 18719 break } return z @@ -85944,10 +86583,13 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18682, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18725, 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) @@ -85967,6 +86609,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+18748, libc.VaList(bp, func() uintptr { + if (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat > 0 { + return ts + 18779 + } + return ts + 1547 + }())) + 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) @@ -86033,6 +86682,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n } } + switch eDest { case SRT_Table: fallthrough @@ -86097,6 +86747,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) } @@ -86151,7 +86802,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, if iCol < 0 { zType = ts + 1112 - *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16244 + *(*uintptr)(unsafe.Pointer(bp + 40)) = ts + 16260 } else { *(*uintptr)(unsafe.Pointer(bp + 40)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, uintptr(0)) @@ -86290,13 +86941,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 16244 + zCol = ts + 16260 } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+12054, 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)) @@ -86304,7 +86955,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*20)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18794, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -86369,7 +87020,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 } { @@ -86394,7 +87045,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 16244 + zName = ts + 16260 } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) @@ -86404,7 +87055,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18705, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18794, libc.VaList(bp, i+1)) } *(*U32)(unsafe.Pointer(bp + 48)) = U32(0) @@ -86420,7 +87071,8 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18714, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18803, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48)), 1))) + Xsqlite3ProgressCheck(tls, pParse) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } @@ -86445,45 +87097,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)*16)).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 uint8) { +// - 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 uint8) { bp := tls.Alloc(32) defer tls.Free(32) 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, uint32(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: @@ -86493,14 +87148,46 @@ __1: { var zType uintptr var n I64 - var m I64 *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_NOINSERT) p = (*ExprList_item)(unsafe.Pointer(a + uintptr(i)*20)).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 = uint8(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)*20)).FpExpr) + } + if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) == SQLITE_AFF_TEXT && m&0x01 != 0 { + (*Column)(unsafe.Pointer(pCol)).Faffinity = uint8(SQLITE_AFF_BLOB) + } else if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) >= SQLITE_AFF_NUMERIC && m&0x02 != 0 { + (*Column)(unsafe.Pointer(pCol)).Faffinity = uint8(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 + 18811 + } 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 { @@ -86510,9 +87197,6 @@ __1: *(*U16)(unsafe.Pointer(pCol + 12)) &= 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) @@ -86556,7 +87240,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+34, pTab+4) - 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) @@ -86707,7 +87391,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18722, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18815, 0) return __1: ; @@ -86798,7 +87482,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18771, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18864, 0) goto end_of_recursive_query __15: ; @@ -86818,7 +87502,7 @@ __14: ; pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18813, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18906, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { @@ -86855,7 +87539,7 @@ __20: Xsqlite3VdbeResolveLabel(tls, v, addrCont) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18819, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18912, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -86889,11 +87573,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+18834, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18927, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1547 } - return ts + 18857 + return ts + 18950 }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -86994,8 +87678,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18859, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18874, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18952, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18967, 0) __8: ; switch int32((*Select)(unsafe.Pointer(p)).Fop) { @@ -87042,7 +87726,7 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18649, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18692, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) @@ -87109,7 +87793,7 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+48) @@ -87171,7 +87855,7 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18893, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18986, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+76) @@ -87324,10 +88008,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+18914, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19007, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18960, + ts+19053, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -87581,8 +88265,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+7167) - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7167) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7227) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7227) computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { @@ -87609,13 +88293,13 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+36, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19042, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19135, 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+19053, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19146, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -87627,7 +88311,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+19058, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19151, 0) Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -88041,6 +88725,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 uint8 + var pSub1 uintptr + + aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*20)).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)*20)).FpExpr)) != int32(aff) { + return 1 + } + } + } + return 0 +} + func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { bp := tls.Alloc(52) defer tls.Free(52) @@ -88160,15 +88863,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 uint8 - - aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(ii)*20)).FpExpr) - for pSub1 = (*Select)(unsafe.Pointer(pSub)).FpPrior; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { - if int32(Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpEList+8+uintptr(ii)*20)).FpExpr)) != int32(aff) { - return 0 - } - } + if compoundHasDifferentAffinities(tls, pSub) != 0 { + return 0 } if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 { @@ -88544,16 +89240,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)*20)).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 @@ -88613,12 +89326,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15147) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15157) == 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+15151) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15161) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -88684,7 +89397,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+19064, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+19157, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -88767,7 +89480,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19082, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19175, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -88896,15 +89609,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 + 36 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19105, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19198, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 8, 0x100) *(*uintptr)(unsafe.Pointer(pFrom + 68)) = 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) @@ -88922,7 +89632,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 6, 0x40) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+19125, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19218, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -88938,7 +89648,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19168 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19261 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 { @@ -88964,7 +89674,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+19191, + Xsqlite3ErrorMsg(tls, pParse, ts+19284, 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 @@ -88975,9 +89685,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+34, pTab+4) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19229 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19322 } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19263 + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19356 } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -89024,7 +89734,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+19301, libc.VaList(bp, pFrom)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19394, libc.VaList(bp, pFrom)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -89136,7 +89846,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19305, + Xsqlite3ErrorMsg(tls, pParse, ts+19398, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -89155,7 +89865,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19344, + Xsqlite3ErrorMsg(tls, pParse, ts+19437, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -89163,7 +89873,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x80>>7)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+14716, + Xsqlite3ErrorMsg(tls, pParse, ts+14726, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -89264,7 +89974,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName } else { - zSchemaName = ts + 6379 + zSchemaName = ts + 6439 } } if i+1 < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && @@ -89279,7 +89989,7 @@ __3: if pNew != 0 { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*20 - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19375, libc.VaList(bp+24, zUName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19468, libc.VaList(bp+24, zUName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 7, 0x80) } @@ -89344,7 +90054,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pNestedFrom+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19380, + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19473, libc.VaList(bp+32, zSchemaName, zTabName, zName)) } @@ -89356,7 +90066,7 @@ __3: libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(1), 8, 0x100) } } else if longNames != 0 { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+11992, libc.VaList(bp+56, zTabName, zName)) + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+12054, libc.VaList(bp+56, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX+8+4, uint32(ENAME_NAME), 0, 0x3) } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, zName) @@ -89375,9 +90085,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19389, libc.VaList(bp+72, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19482, libc.VaList(bp+72, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19407, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19500, 0) } } } @@ -89387,7 +90097,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19427, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19520, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -89446,11 +90156,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, - uint8(SQLITE_AFF_NONE)) + Xsqlite3SubqueryColumnTypes(tls, pParse, pTab, pSel, uint8(SQLITE_AFF_NONE)) } } @@ -89509,6 +90215,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 + 24)) |= 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)*16)).FpFExpr + + Xsqlite3ExprAnalyzeAggList(tls, pNC, *(*uintptr)(unsafe.Pointer(pExpr + 20))) + + if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { + Xsqlite3ExprAnalyzeAggregates(tls, pNC, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) + } + } + *(*int32)(unsafe.Pointer(pNC + 24)) &= 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)*16)).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)*16 + (*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(28) + defer tls.Free(28) + + var i int32 + + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + f func(*libc.TLS, uintptr, uintptr) int32 + }{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)*16)).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 + 44)) += (*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) @@ -89524,7 +90305,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: @@ -89537,13 +90319,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19458, 0) + ts+19551, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 20)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19509, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19602, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -89551,7 +90333,7 @@ __1: goto __2 __2: i++ - pFunc += 20 + pFunc += 16 goto __1 goto __3 __3: @@ -89571,19 +90353,22 @@ __1: var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFExpr + 20)) - 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 += 20 + pF += 16 goto __1 goto __3 __3: @@ -89597,6 +90382,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 @@ -89671,7 +90459,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) @@ -89683,7 +90473,7 @@ __1: goto __2 __2: i++ - pF += 20 + pF += 16 goto __1 goto __3 __3: @@ -89701,13 +90491,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 += 20 + pC += 16 goto __7 goto __9 __9: @@ -89724,11 +90514,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 + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19542, + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19635, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19554 + return ts + 19647 } return ts + 1547 }(), @@ -89749,7 +90539,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+7871) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7931) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -89781,14 +90571,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 += 72 { + for iFirst < iEnd { var pS1 uintptr + pItem = pTabList + 8 + uintptr(libc.PostIncInt32(&iFirst, 1))*72 if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect == uintptr(0) { continue } @@ -89842,6 +90633,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)*72 + if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 36 + 4))&0x100>>8)) != 0 { + var pCteUse uintptr = *(*uintptr)(unsafe.Pointer(pItem + 68)) + 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*72)).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 -= 72 + 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. @@ -89906,7 +90748,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 @@ -90005,7 +90846,7 @@ __5: goto __7 } Xsqlite3ErrorMsg(tls, pParse, - ts+19577, + ts+19670, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -90066,7 +90907,7 @@ __14: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+19631, + Xsqlite3ErrorMsg(tls, pParse, ts+19724, 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: @@ -90180,7 +91021,7 @@ __30: goto __28 __31: ; - *(*int32)(unsafe.Pointer(pParse + 220)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 224)) += Xsqlite3SelectExprHeight(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_PushDown) == U32(0) && (int32(*(*uint16)(unsafe.Pointer(pItem1 + 36 + 4))&0x100>>8) == 0 || @@ -90197,11 +91038,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*72)).Ffg.Fjointype)&(JT_OUTER|JT_CROSS) != 0) && - (int32(*(*uint16)(unsafe.Pointer(pItem1 + 36 + 4))&0x100>>8) == 0 || int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 68)))).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 } @@ -90212,7 +91049,7 @@ __33: (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19671, libc.VaList(bp+32, pItem1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19764, libc.VaList(bp+32, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+36+4, uint32(1), 5, 0x20) @@ -90238,7 +91075,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 } @@ -90270,11 +91107,9 @@ __42: __43: ; Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19686, libc.VaList(bp+40, pItem1)) - (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = Xsqlite3TableAffinityStr(tls, db, (*SrcItem)(unsafe.Pointer(pItem1)).FpTab) + + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19779, libc.VaList(bp+40, pItem1)) Xsqlite3Select(tls, pParse, pSub1, bp+88) - Xsqlite3DbFree(tls, db, (*SelectDest)(unsafe.Pointer(bp+88)).FzAffSdst) - (*SelectDest)(unsafe.Pointer(bp + 88)).FzAffSdst = uintptr(0) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __44 @@ -90308,7 +91143,7 @@ __35: goto select_end __46: ; - *(*int32)(unsafe.Pointer(pParse + 220)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 224)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __28 __28: @@ -90617,12 +91452,11 @@ __90: (*NameContext)(unsafe.Pointer(bp + 128)).FpSrcList = pTabList *(*uintptr)(unsafe.Pointer(bp + 128 + 8)) = 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+128, pEList) @@ -90651,39 +91485,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)*20)).FpFExpr - - *(*int32)(unsafe.Pointer(bp + 128 + 24)) |= NC_InAggFunc - Xsqlite3ExprAnalyzeAggList(tls, bp+128, *(*uintptr)(unsafe.Pointer(pExpr + 20))) - - if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __98 - } - Xsqlite3ExprAnalyzeAggregates(tls, bp+128, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) -__98: - ; - *(*int32)(unsafe.Pointer(bp + 128 + 24)) &= 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+128) 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) @@ -90694,24 +91504,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 + 20)) != uintptr(0)) { - goto __102 + goto __98 } - pExpr1 = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) + 8)).FpExpr - pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0) + pExpr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 20)) + 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) @@ -90744,27 +91554,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+128) +__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+116)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19702 + return ts + 19795 } - return ts + 19711 + return ts + 19804 }()) groupBySort = 1 @@ -90772,47 +91589,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)*20)).FiSorterColumn) >= j) { - goto __109 + if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*16)).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)*20 + pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*16 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) @@ -90828,45 +91645,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)*20)).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) @@ -90885,16 +91708,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) @@ -90925,16 +91748,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) @@ -90947,98 +91770,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 + 36 + 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 + 56))&0x4>>2) == 0 && int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab1)).FszTabRow) && (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) && (!(pBest != 0) || int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Index)(unsafe.Pointer(pBest)).FszIdxRow))) { - goto __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)*20)).FpFExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { - goto __139 + if !((*Expr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*16)).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)*20)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { - goto __140 + if !((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*16)).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 + 20)) @@ -91047,79 +91873,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 + 160)), 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+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { - goto __148 + goto __146 } - explainTempTable(tls, pParse, ts+19702) -__148: + explainTempTable(tls, pParse, ts+19795) +__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 + 19720 - } - return ts + 19743 - }()) generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) -__149: +__147: ; Xsqlite3VdbeResolveLabel(tls, v, iEnd) @@ -91215,7 +92036,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19752, 0) + ts+19813, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -91448,7 +92269,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+19817, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19878, 0) goto trigger_cleanup __3: ; @@ -91492,7 +92313,7 @@ __7: goto trigger_cleanup __8: ; - Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19863, *(*uintptr)(unsafe.Pointer(bp + 32))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19924, *(*uintptr)(unsafe.Pointer(bp + 32))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -91510,7 +92331,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19871, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19932, 0) goto trigger_orphan_error __11: ; @@ -91522,7 +92343,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19863, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19924, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -91537,7 +92358,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19973, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32)))) goto __17 __16: ; @@ -91549,22 +92370,22 @@ __15: ; __14: ; - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8065, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6374, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19938, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19999, 0) goto trigger_cleanup __18: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19976, + Xsqlite3ErrorMsg(tls, pParse, ts+20037, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 20013 + return ts + 20074 } - return ts + 20020 + return ts + 20081 }(), pTableName+8)) goto trigger_orphan_error __19: @@ -91573,7 +92394,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+20026, libc.VaList(bp+24, pTableName+8)) + ts+20087, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -91602,9 +92423,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -91722,7 +92543,7 @@ __2: __3: ; Xsqlite3TokenInit(tls, bp+56, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19863, bp+56) + Xsqlite3FixInit(tls, bp+64, pParse, iDb, ts+19924, bp+56) if !(Xsqlite3FixTriggerStep(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+64, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -91755,7 +92576,7 @@ __9: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+20072, + ts+20133, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrig)).FzName, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup __12: @@ -91780,13 +92601,13 @@ __13: z = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pAll)).Fz, uint64((*Token)(unsafe.Pointer(pAll)).Fn)) Xsqlite3NestedParse(tls, pParse, - ts+20120, + ts+20181, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+20195, libc.VaList(bp+48, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20256, libc.VaList(bp+48, zName)), uint16(0)) __7: ; __6: @@ -92042,7 +92863,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+20224, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20285, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -92081,9 +92902,9 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 12079 + return ts + 6382 } - return ts + 5886 + return ts + 5876 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -92095,7 +92916,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+20244, + ts+20305, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -92209,12 +93030,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20306, + ts+20367, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20354 + return ts + 20415 } - return ts + 20361 + return ts + 20422 }())) __15: ; @@ -92328,7 +93149,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+20368, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20429, 0) return 1 } @@ -92511,8 +93332,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(316) - defer tls.Free(316) + bp := tls.Alloc(320) + defer tls.Free(320) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -92545,8 +93366,8 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt *(*U32)(unsafe.Pointer(pPrg + 16 + 1*4)) = 0xffffffff Xsqlite3ParseObjectInit(tls, bp+8, db) - libc.Xmemset(tls, bp+284, 0, uint32(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 284)).FpParse = bp + 8 + libc.Xmemset(tls, bp+288, 0, uint32(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 288)).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 @@ -92558,13 +93379,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+20410, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -6) + Xsqlite3MPrintf(tls, db, ts+20471, 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+284, pWhen) { + SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+288, pWhen) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, bp+8) Xsqlite3ExprIfFalse(tls, bp+8, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -92880,7 +93701,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) } @@ -93150,7 +93972,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20424, + ts+20485, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -93182,7 +94004,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20460, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20521, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -93192,7 +94014,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7646 + return ts + 7706 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16)).FzCnName }(), @@ -94062,7 +94884,7 @@ __168: if !(regRowCount != 0) { goto __169 } - Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20479) + Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+20540) __169: ; update_cleanup: @@ -94368,10 +95190,10 @@ __1: if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { *(*uint8)(unsafe.Pointer(bp + 152)) = uint8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+152, ts+20492, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+152, ts+20553, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20496, libc.VaList(bp+8, bp+152)) + ts+20557, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -94462,7 +95284,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+12133, -1) + ts+12143, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -94494,7 +95316,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+20569, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20573, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20630, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20634, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -94642,14 +95464,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+20577) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20638) return SQLITE_ERROR __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20617) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20678) return SQLITE_ERROR __2: ; @@ -94660,7 +95482,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20660) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20721) return SQLITE_ERROR __5: ; @@ -94688,7 +95510,7 @@ __4: isMemDb = Xsqlite3PagerIsMemdb(tls, Xsqlite3BtreePager(tls, pMain)) nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20678, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20739, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -94708,7 +95530,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20701) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20762) goto end_of_vacuum __8: ; @@ -94723,7 +95545,7 @@ __7: Xsqlite3BtreeSetSpillSize(tls, pTemp, Xsqlite3BtreeSetSpillSize(tls, pMain, 0)) Xsqlite3BtreeSetPagerFlags(tls, pTemp, pgflags|U32(PAGER_CACHESPILL)) - rc = execSql(tls, db, pzErrMsg, ts+14486) + rc = execSql(tls, db, pzErrMsg, ts+14496) if !(rc != SQLITE_OK) { goto __9 } @@ -94768,7 +95590,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) rc = execSqlF(tls, db, pzErrMsg, - ts+20728, + ts+20789, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -94777,7 +95599,7 @@ __12: __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20836, + ts+20897, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -94788,7 +95610,7 @@ __14: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) rc = execSqlF(tls, db, pzErrMsg, - ts+20890, + ts+20951, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -94799,7 +95621,7 @@ __14: __15: ; rc = execSqlF(tls, db, pzErrMsg, - ts+21041, + ts+21102, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -95021,12 +95843,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) } } @@ -95144,7 +95966,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32(2+*(*int32)(unsafe.Pointer(pTable + 44)))) if *(*int32)(unsafe.Pointer(pTable + 44))+3 >= *(*int32)(unsafe.Pointer(db + 120 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12360, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12370, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -95228,11 +96050,11 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32((int32((*Token)(unsafe.Pointer(pEnd)).Fz)-int32((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+21171, libc.VaList(bp, pParse+192)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21232, libc.VaList(bp, pParse+196)) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+21195, + ts+21256, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -95242,7 +96064,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21294, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -95276,7 +96098,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 + 256 + var pArg uintptr = pParse + 260 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 @@ -95303,7 +96125,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+21313, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21374, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -95341,7 +96163,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21355, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21416, libc.VaList(bp+8, zModuleName)) } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3656, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) @@ -95353,7 +96175,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 + 21385 + var zFormat uintptr = ts + 21446 *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -95370,7 +96192,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+16135, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16151, zType+uintptr(i), 6) && (i == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -95427,7 +96249,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21431, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21492, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = uintptr(0) @@ -95485,7 +96307,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pMod = Xsqlite3HashFind(tls, db+404, zMod) if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21431, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21492, 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) @@ -95505,8 +96327,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(284) - defer tls.Free(284) + bp := tls.Alloc(288) + defer tls.Free(288) var pCtx uintptr var rc int32 = SQLITE_OK @@ -95519,7 +96341,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 @@ -95972,7 +96794,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 { @@ -95999,7 +96821,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 } @@ -96231,10 +97053,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 + 21450 + return ts + 21511 } if i == -1 { - return ts + 16244 + return ts + 16260 } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -96243,15 +97065,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+21457, 5) + Xsqlite3_str_append(tls, pStr, ts+21518, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21463, 1) + Xsqlite3_str_append(tls, pStr, ts+21524, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12750, 1) + Xsqlite3_str_append(tls, pStr, ts+12760, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } @@ -96262,11 +97084,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+21463, 1) + Xsqlite3_str_append(tls, pStr, ts+21524, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12750, 1) + Xsqlite3_str_append(tls, pStr, ts+12760, 1) } Xsqlite3_str_append(tls, pStr, ts+5001, 1) } @@ -96288,27 +97110,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+21465, 2) + Xsqlite3_str_append(tls, pStr, ts+21526, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21457, 5) + Xsqlite3_str_append(tls, pStr, ts+21518, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21468 + return ts + 21529 } - return ts + 21473 + return ts + 21534 }(), 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+21481) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2))), j, i, ts+21542) 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+21483) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4))), j, i, ts+21544) } Xsqlite3_str_append(tls, pStr, ts+4950, 1) } @@ -96351,11 +97173,11 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr Xsqlite3StrAccumInit(tls, bp+64, db, bp+88, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 64)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+64, ts+21485, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+64, ts+21546, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21491 + return ts + 21552 } - return ts + 21498 + return ts + 21559 }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -96365,43 +97187,43 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10907 + zFmt = ts + 10969 } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21503 + zFmt = ts + 21564 } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21536 + zFmt = ts + 21597 } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21561 + zFmt = ts + 21622 } else { - zFmt = ts + 21579 + zFmt = ts + 21640 } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+64, ts+21588, 7) + Xsqlite3_str_append(tls, bp+64, ts+21649, 7) Xsqlite3_str_appendf(tls, bp+64, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) explainIndexRange(tls, bp+64, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var cRangeOp uint8 - var zRowid uintptr = ts + 16244 - Xsqlite3_str_appendf(tls, bp+64, ts+21596, libc.VaList(bp+24, zRowid)) + var zRowid uintptr = ts + 16260 + Xsqlite3_str_appendf(tls, bp+64, ts+21657, libc.VaList(bp+24, zRowid)) if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { cRangeOp = uint8('=') } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp+64, ts+21627, libc.VaList(bp+32, zRowid)) + Xsqlite3_str_appendf(tls, bp+64, ts+21688, libc.VaList(bp+32, zRowid)) cRangeOp = uint8('<') } else if flags&U32(WHERE_BTM_LIMIT) != 0 { cRangeOp = uint8('>') } else { cRangeOp = uint8('<') } - Xsqlite3_str_appendf(tls, bp+64, ts+21637, libc.VaList(bp+40, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp+64, ts+21698, libc.VaList(bp+40, int32(cRangeOp))) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+64, ts+21642, + Xsqlite3_str_appendf(tls, bp+64, ts+21703, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 12)))) } if int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_LEFT != 0 { - Xsqlite3_str_appendf(tls, bp+64, ts+21669, 0) + Xsqlite3_str_appendf(tls, bp+64, ts+21730, 0) } zMsg = Xsqlite3StrAccumFinish(tls, bp+64) @@ -96433,28 +97255,29 @@ func Xsqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp Xsqlite3StrAccumInit(tls, bp+24, db, bp+48, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 24)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+24, ts+21680, libc.VaList(bp, pItem)) + Xsqlite3_str_appendf(tls, bp+24, ts+21741, 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+21468, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) + Xsqlite3_str_appendf(tls, bp+24, ts+21529, libc.VaList(bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp+24, ts+21701, 0) + Xsqlite3_str_appendf(tls, bp+24, ts+21762, 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+21457, 5) + Xsqlite3_str_append(tls, bp+24, ts+21518, 5) } - Xsqlite3_str_appendf(tls, bp+24, ts+21468, libc.VaList(bp+16, z)) + Xsqlite3_str_appendf(tls, bp+24, ts+21529, libc.VaList(bp+16, z)) } } Xsqlite3_str_append(tls, bp+24, ts+4950, 1) zMsg = Xsqlite3StrAccumFinish(tls, bp+24) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -6) + return ret } @@ -96515,52 +97338,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 + 20)); 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 + 20)))).FpEList + pOrigRhs = (*Select)(unsafe.Pointer(pSelect)).FpEList - pOrigLhs = *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 20)) - 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)*4)))).FpExpr == pX { - var iField int32 + if pSelect == *(*uintptr)(unsafe.Pointer(pNew + 20)) { + pOrigLhs = *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 20)) + } + 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)*4)))).FpExpr == pX { + var iField int32 - iField = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*4)) + 24 + 4)) - 1 - if (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*20)).FpExpr == uintptr(0) { - continue + iField = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pLoop)).FaLTerm + uintptr(i)*4)) + 24 + 4)) - 1 + if (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*20)).FpExpr == uintptr(0) { + continue + } + pRhs = Xsqlite3ExprListAppend(tls, pParse, pRhs, (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*20)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pOrigRhs + 8 + uintptr(iField)*20)).FpExpr = uintptr(0) + if pOrigLhs != 0 { + pLhs = Xsqlite3ExprListAppend(tls, pParse, pLhs, (*ExprList_item)(unsafe.Pointer(pOrigLhs+8+uintptr(iField)*20)).FpExpr) + (*ExprList_item)(unsafe.Pointer(pOrigLhs + 8 + uintptr(iField)*20)).FpExpr = uintptr(0) + } } - pRhs = Xsqlite3ExprListAppend(tls, pParse, pRhs, (*ExprList_item)(unsafe.Pointer(pOrigRhs+8+uintptr(iField)*20)).FpExpr) - (*ExprList_item)(unsafe.Pointer(pOrigRhs + 8 + uintptr(iField)*20)).FpExpr = uintptr(0) - - pLhs = Xsqlite3ExprListAppend(tls, pParse, pLhs, (*ExprList_item)(unsafe.Pointer(pOrigLhs+8+uintptr(iField)*20)).FpExpr) - (*ExprList_item)(unsafe.Pointer(pOrigLhs + 8 + uintptr(iField)*20)).FpExpr = uintptr(0) } - } - Xsqlite3ExprListDelete(tls, db, pOrigRhs) - Xsqlite3ExprListDelete(tls, db, pOrigLhs) - *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 20)) = pLhs - (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 20)))).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 + 20)) - 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)*20 + 16)) = U16(0) + Xsqlite3ExprListDelete(tls, db, pOrigRhs) + if pOrigLhs != 0 { + Xsqlite3ExprListDelete(tls, db, pOrigLhs) + *(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pNew)).FpLeft + 20)) = 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)*20 + 16)) = U16(0) + } } - } + } } return pNew } @@ -98038,7 +98867,7 @@ __134: ; __126: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21709, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21770, 0) ii = 0 __135: if !(ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { @@ -98066,7 +98895,7 @@ __139: pOrExpr = pAndExpr __140: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21724, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21785, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -98584,7 +99413,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+21733, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21794, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pTabItem)).FpTab)).FzName)) for k = 0; k < iLevel; k++ { var iIdxCur int32 @@ -98942,10 +99771,10 @@ type Op2 = struct { } var aOp = [4]Op2{ - {FzOp: ts + 16093, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15424, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14950, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21747, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, + {FzOp: ts + 16109, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15440, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14960, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21808, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, } func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { @@ -99322,49 +100151,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)*72)).FiCursor - for pIdx = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(i)*72)).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)*72)).FiCursor + for pIdx = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom + 8 + uintptr(j)*72)).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)*20)).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)*20)).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 + 20)) + 8)).FpExpr - } if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { @@ -99372,13 +100190,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)*72)).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) { @@ -99443,12 +100264,12 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21754, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21815, 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+21754, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21815, 0) return } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_InnerON)) @@ -99472,7 +100293,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { pLeft = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 20)) + 8 + uintptr(*(*int32)(unsafe.Pointer(pTerm + 24 + 4))-1)*20)).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 + 24)) = *(*int32)(unsafe.Pointer(bp + 1*4)) @@ -99482,7 +100303,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { *(*U16)(unsafe.Pointer(pTerm + 10)) |= 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 @@ -99527,7 +100348,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 + 6702 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6762 *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -99621,7 +100442,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21795 + return ts + 21856 } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -99632,7 +100453,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), @@ -99640,6 +100460,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)*48 if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { @@ -99673,7 +100494,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { *(*int32)(unsafe.Pointer(pTerm + 24 + 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 + 20)))).FpPrior == uintptr(0) && + ((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpPrior == uintptr(0) || (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselFlags&U32(SF_Values) != 0) && (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpWin == uintptr(0) && int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { var i int32 @@ -99826,6 +100647,9 @@ func Xsqlite3WhereAddLimit(tls *libc.TLS, pWC uintptr, p uintptr) { if int32((*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*48)).FwtFlags)&TERM_CODED != 0 { continue } + if (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*48)).FnChild != 0 { + continue + } if (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(ii)*48)).FleftCursor != iCsr { return } @@ -99994,7 +100818,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21802, + Xsqlite3ErrorMsg(tls, pParse, ts+21863, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -100727,7 +101551,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21838, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21899, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -100798,7 +101622,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21864 + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21925 (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -101305,7 +102129,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 @@ -101325,7 +102149,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)*20)).FanLt + uintptr(n-1)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanLt + uintptr(n-1)*4)) { + if *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp-1)*20)).FanLt + uintptr(n-1)*8)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanLt + uintptr(n-1)*8)) { break } } @@ -101336,10 +102160,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)*20)).Fn, (*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).Fp, pRec) if res < 0 { - iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanLt + uintptr(n-1)*4)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanEq + uintptr(n-1)*4)) + iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanLt + uintptr(n-1)*8)) + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanEq + uintptr(n-1)*8)) iMin = iTest + 1 } else if res == 0 && n < nField { - iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanLt + uintptr(n-1)*4)) + iLower = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(iSamp)*20)).FanLt + uintptr(n-1)*8)) iMin = iTest + 1 res = -1 } else { @@ -101350,29 +102174,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)*20)).FanLt + uintptr(iCol)*4)) - *(*TRowcnt)(unsafe.Pointer(aStat + 1*4)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanEq + uintptr(iCol)*4)) + *(*TRowcnt)(unsafe.Pointer(aStat)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).FanLt + uintptr(iCol)*8)) + *(*TRowcnt)(unsafe.Pointer(aStat + 1*8)) = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).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)*20)).FanLt + uintptr(iCol)*4)) + iUpper = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*20)).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) @@ -101474,8 +102298,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(24) - defer tls.Free(24) + bp := tls.Alloc(32) + defer tls.Free(32) var rc int32 = SQLITE_OK var nOut int32 = int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnOut) @@ -101487,7 +102311,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))) @@ -101497,17 +102321,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 { @@ -101527,19 +102351,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+12) - if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 12)) != 0 { + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+16, pExpr, nBtm, nEq, bp+20) + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 20)) != 0 { var iNew TRowcnt var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) - if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 12)) { + if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 20)) { mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) } - 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 @@ -101551,19 +102375,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+16) - if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 16)) != 0 { + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+16, pExpr, nTop, 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)) } - 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 @@ -101573,10 +102397,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) @@ -101590,9 +102414,9 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u } } else { - *(*int32)(unsafe.Pointer(bp + 20)) = 0 - rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+20) - if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { + *(*int32)(unsafe.Pointer(bp + 28)) = 0 + rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+28) + if *(*int32)(unsafe.Pointer(bp + 28)) != 0 { return rc } } @@ -101617,8 +102441,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(16) - defer tls.Free(16) + bp := tls.Alloc(24) + defer tls.Free(24) 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))) @@ -101630,7 +102454,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 } @@ -101646,21 +102470,21 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp)), 0, bp+8) - *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 8 + 1*4)) + *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 8 + 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++ { @@ -101671,7 +102495,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 @@ -101993,6 +102817,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)*72)).Ffg.Fjointype)& @@ -102086,8 +102911,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(100) - defer tls.Free(100) + bp := tls.Alloc(104) + defer tls.Free(104) var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse @@ -102111,8 +102936,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 { @@ -102264,7 +103090,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 + 96)) = TRowcnt(0) + *(*TRowcnt)(unsafe.Pointer(bp + 96)) = uint64(0) if int32(nInMul) == 0 && (*Index)(unsafe.Pointer(pProbe)).FnSample != 0 && int32(*(*U16)(unsafe.Pointer(pNew + 24))) <= (*Index)(unsafe.Pointer(pProbe)).FnSampleCol && @@ -102283,7 +103109,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb break } if *(*TRowcnt)(unsafe.Pointer(bp + 96)) != 0 { - (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = Xsqlite3LogEst(tls, uint64(*(*TRowcnt)(unsafe.Pointer(bp + 96)))) + (*WhereLoop)(unsafe.Pointer(pNew)).FnOut = Xsqlite3LogEst(tls, *(*TRowcnt)(unsafe.Pointer(bp + 96))) if nEq == 1 && int32((*WhereLoop)(unsafe.Pointer(pNew)).FnOut)+10 > int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst))) { *(*U16)(unsafe.Pointer(pTerm + 10)) |= U16(TERM_HIGHTRUTH) @@ -102297,7 +103123,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb *(*LogEst)(unsafe.Pointer(pNew + 22)) -= LogEst(nIn) } } - if *(*TRowcnt)(unsafe.Pointer(bp + 96)) == TRowcnt(0) { + if *(*TRowcnt)(unsafe.Pointer(bp + 96)) == 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) @@ -102306,9 +103132,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 + 56))&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)) } @@ -102327,6 +103157,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 + 56))&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 @@ -102454,51 +103287,75 @@ __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)*20)).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(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { - return WRC_Continue - } - if (*Expr)(unsafe.Pointer(pExpr)).FiTable != (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur { - return WRC_Continue - } - pIdx = (*CoveringIndexCheck)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FpIdx - aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn - nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn - for i = 0; i < int32(nColumn); i++ { - if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + var pCk uintptr + + pCk = *(*uintptr)(unsafe.Pointer(pWalk + 24)) + 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 + 24)))).FpIdx + aiColumn = (*Index)(unsafe.Pointer(pIdx)).FaiColumn + nColumn = (*Index)(unsafe.Pointer(pIdx)).FnColumn + for i = 0; i < int32(nColumn); i++ { + if int32(*(*I16)(unsafe.Pointer(aiColumn + uintptr(i)*2))) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { + return WRC_Continue + } + } + (*CoveringIndexCheck)(unsafe.Pointer(pCk)).FbUnidx = U8(1) + return WRC_Abort + } else if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x800>>11)) != 0 && + exprIsCoveredByIndex(tls, pExpr, pIdx, (*CoveringIndexCheck1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).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 { - bp := tls.Alloc(36) - defer tls.Free(36) + bp := tls.Alloc(40) + defer tls.Free(40) 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(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1 { - break + if int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&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(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(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 + 28)).FpIdx = pIdx - (*CoveringIndexCheck)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 28)).FpIdx = pIdx + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 28)).FiTabCur = iTabCur + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 28)).FbExpr = U8(0) + (*CoveringIndexCheck1)(unsafe.Pointer(bp + 28)).FbUnidx = U8(0) libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -102507,9 +103364,15 @@ func whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur i f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkNoop})) *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 - (*Walker)(unsafe.Pointer(bp)).FeCode = U16(0) Xsqlite3WalkSelect(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpSelect) - return U32((*Walker)(unsafe.Pointer(bp)).FeCode) + if (*CoveringIndexCheck1)(unsafe.Pointer(bp+28)).FbUnidx != 0 { + rc = 0 + } else if (*CoveringIndexCheck1)(unsafe.Pointer(bp+28)).FbExpr != 0 { + rc = WHERE_EXPRIDX + } else { + rc = WHERE_IDX_ONLY + } + return U32(rc) } func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { @@ -102550,7 +103413,7 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { (*Index)(unsafe.Pointer(bp)).FaiRowLogEst = bp + 98 (*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+56, uint32(SQLITE_IDXTYPE_IPK), 0, 0x3) *(*LogEst)(unsafe.Pointer(bp + 98)) = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst *(*LogEst)(unsafe.Pointer(bp + 98 + 1*2)) = int16(0) @@ -102590,7 +103453,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 { @@ -102656,19 +103520,24 @@ __1: } else { var m Bitmask if uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 56))&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(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1) { - m = Bitmask(whereIsCoveringIndex(tls, pWInfo, pProbe, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor)) - } - (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = func() uint32 { - if m == uint64(0) { - return uint32(WHERE_IDX_ONLY | WHERE_INDEXED) + (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_INDEXED) + if m == uint64(1)<<(int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))-1) || uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x800>>11)) != 0 && !(int32(*(*uint16)(unsafe.Pointer(pProbe + 56))&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 + 44)) |= 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 || @@ -102848,7 +103717,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*4)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21936, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -102906,7 +103775,7 @@ __6: (*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm = U16(mxTerm + 1) for i = 0; i <= mxTerm; i++ { if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21875, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21936, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -103304,7 +104173,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+21901, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21962, 0) rc = SQLITE_OK } else { goto __3 @@ -103515,8 +104384,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)*20)).FpExpr - if Xsqlite3ExprCompareSkip(tls, pOBExpr, pIdxExpr, iCur) != 0 { + var pIxExpr uintptr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaColExpr + 8 + uintptr(j)*20)).FpExpr + if Xsqlite3ExprCompareSkip(tls, pOBExpr, pIxExpr, iCur) != 0 { continue } } @@ -103635,14 +104504,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) @@ -103794,7 +104672,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 @@ -103902,7 +104780,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21936, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21997, 0) Xsqlite3DbFreeNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSpace) return SQLITE_ERROR } @@ -104164,19 +105042,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 + 760)).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 + 760 + uintptr(i)*88)).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)*72 + var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab + if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStat1) == U32(0) { + break + } + *(*U32)(unsafe.Pointer(pTab + 28)) |= 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)*72 - var pTab uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FpTab - *(*U32)(unsafe.Pointer(pTab + 28)) |= 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 + 44)) |= U32(WHERE_BLOOMFILTER) *(*U32)(unsafe.Pointer(pLoop + 44)) &= libc.Uint32FromInt32(libc.CplInt32(WHERE_IDX_ONLY)) @@ -104188,9 +105068,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) } @@ -104223,13 +105103,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) @@ -104381,7 +105261,7 @@ __1: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+21954, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+22015, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __2: ; @@ -104445,7 +105325,7 @@ __6: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __7: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21982, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+22043, 0) goto __5 __4: ii = 0 @@ -105146,7 +106026,7 @@ __4: last = (*WhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x800>>11)) != 0 { - var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FpIdxExpr + 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 @@ -105328,7 +106208,7 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+22000, -1) + pCtx, ts+22061, -1) } func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -105461,7 +106341,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+22056, -1) + pCtx, ts+22117, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -105550,17 +106430,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { } } -var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22101)) -var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22112)) -var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22123)) -var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22128)) -var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22141)) -var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22151)) -var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22157)) -var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22168)) -var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22178)) -var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22190)) -var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22195)) +var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 22162)) +var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 22173)) +var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 22184)) +var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 22189)) +var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 22202)) +var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 22212)) +var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 22218)) +var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 22229)) +var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 22239)) +var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 22251)) +var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 22256)) func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { _ = p @@ -105606,7 +106486,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+22199, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22260, libc.VaList(bp, zName)) } return p } @@ -105650,12 +106530,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+22218, 0) + ts+22279, 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+22289, 0) + ts+22350, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -105678,7 +106558,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).FeEnd) (*Window)(unsafe.Pointer(pWin)).FeExclude = U8(0) if int32((*Window)(unsafe.Pointer(pWin)).FeStart) == TK_FOLLOWING { - (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7871) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7931) } break } @@ -105881,7 +106761,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+22352, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+22413, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -105997,7 +106877,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 28)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7463)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7523)) } pSub = Xsqlite3SelectNew(tls, @@ -106008,6 +106888,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+36+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, uint8(SQLITE_AFF_NONE)) @@ -106111,7 +106992,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22378, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22439, 0) goto windowAllocErr __2: ; @@ -106176,15 +107057,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 + 22410 + zErr = ts + 22471 } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22427 + zErr = ts + 22488 } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22443 + zErr = ts + 22504 } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22463, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22524, 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 { @@ -106205,7 +107086,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+22496, 0) + ts+22557, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -106361,11 +107242,11 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var azErr = [5]uintptr{ - ts + 22543, - ts + 22596, - ts + 22000, - ts + 22647, - ts + 22699, + ts + 22604, + ts + 22657, + ts + 22061, + ts + 22708, + ts + 22760, } var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} @@ -107561,8 +108442,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) @@ -107573,13 +108453,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) @@ -107761,19 +108638,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+22749, + Xsqlite3ErrorMsg(tls, pParse, ts+22810, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19743 + return ts + 22852 } - return ts + 22791 + return ts + 22861 }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 120 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22797, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22867, 0) } } @@ -107844,7 +108721,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+22831, + Xsqlite3ErrorMsg(tls, pParse, ts+22901, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -108939,7 +109816,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { yy_pop_parser_stack(tls, yypParser) } - Xsqlite3ErrorMsg(tls, pParse, ts+22869, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22939, 0) (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse } @@ -109914,21 +110791,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(23): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16244, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16260, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22891, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22961, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16157, 6) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16173, 6) == 0 { *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22891, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22961, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } *(*U32)(unsafe.Pointer(yymsp + 4)) = *(*U32)(unsafe.Pointer(bp + 40)) @@ -110671,7 +111548,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22918) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22988) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) != 0 { var pFromClause uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) if (*SrcList)(unsafe.Pointer(pFromClause)).FnSrc > 1 { @@ -110835,7 +111712,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 92)) = *(*Token)(unsafe.Pointer(yymsp + 4)) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp+32, bp+92)) + Xsqlite3ErrorMsg(tls, pParse, ts+22997, libc.VaList(bp+32, bp+92)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -111052,9 +111929,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_STRING, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) != 0 { - return ts + 6697 + return ts + 6757 } - return ts + 6702 + return ts + 6762 }()) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) != 0 { Xsqlite3ExprIdToTrueFalse(tls, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) @@ -111066,6 +111943,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)*12 + 4))) pRHS = Xsqlite3PExpr(tls, pParse, TK_UPLUS, pRHS, uintptr(0)) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3PExpr(tls, pParse, TK_EQ, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)), pRHS) + } else if (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)))).FnExpr == 1 && int32((*Expr)(unsafe.Pointer(pRHS)).Fop) == TK_SELECT { + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)), uintptr(0)) + Xsqlite3PExprAddSelect(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)), *(*uintptr)(unsafe.Pointer(pRHS + 20))) + *(*uintptr)(unsafe.Pointer(pRHS + 20)) = uintptr(0) + Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4))) } else { *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3PExpr(tls, pParse, TK_IN, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)), uintptr(0)) if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) == uintptr(0) { @@ -111333,19 +112215,19 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in { *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*Token)(unsafe.Pointer(yymsp + 4)) Xsqlite3ErrorMsg(tls, pParse, - ts+22951, 0) + ts+23021, 0) } break case uint32(271): { Xsqlite3ErrorMsg(tls, pParse, - ts+23046, 0) + ts+23116, 0) } break case uint32(272): { Xsqlite3ErrorMsg(tls, pParse, - ts+23130, 0) + ts+23200, 0) } break case uint32(273): @@ -111724,9 +112606,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22927, libc.VaList(bp, bp+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+22997, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+23215, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23285, 0) } (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -112494,7 +113376,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) int32 { } else { (*Token)(unsafe.Pointer(bp + 1248)).Fz = zSql (*Token)(unsafe.Pointer(bp + 1248)).Fn = uint32(n) - Xsqlite3ErrorMsg(tls, pParse, ts+23232, libc.VaList(bp, bp+1248)) + Xsqlite3ErrorMsg(tls, pParse, ts+23302, libc.VaList(bp, bp+1248)) break } } @@ -112517,7 +113399,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+3656, libc.VaList(bp+8, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23257, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23327, libc.VaList(bp+16, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg, (*Parse)(unsafe.Pointer(pParse)).FzTail)) nErr++ } (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql @@ -112690,7 +113572,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23268, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23338, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -112703,11 +113585,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19863, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19924, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23275, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23345, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23280, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23350, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -112720,9 +113602,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23290, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23360, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23294, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23364, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -112956,7 +113838,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 @@ -113531,7 +114413,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 { @@ -113546,7 +114428,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23302, 0) + ts+23372, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -113737,23 +114619,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 + 23370 + var zErr uintptr = ts + 23440 switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23384 + zErr = ts + 23454 break } case SQLITE_ROW: { - zErr = ts + 23406 + zErr = ts + 23476 break } case SQLITE_DONE: { - zErr = ts + 23428 + zErr = ts + 23498 break } @@ -113771,35 +114653,35 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { } var aMsg = [29]uintptr{ - ts + 23451, - ts + 23464, + ts + 23521, + ts + 23534, uintptr(0), - ts + 23480, - ts + 23505, - ts + 23519, - ts + 23538, + ts + 23550, + ts + 23575, + ts + 23589, + ts + 23608, ts + 1483, - ts + 23563, - ts + 23600, - ts + 23612, - ts + 23627, - ts + 23660, - ts + 23678, - ts + 23703, - ts + 23732, + ts + 23633, + ts + 23670, + ts + 23682, + ts + 23697, + ts + 23730, + ts + 23748, + ts + 23773, + ts + 23802, uintptr(0), - ts + 5841, + ts + 5831, ts + 5327, - ts + 23749, - ts + 23767, - ts + 23785, - uintptr(0), ts + 23819, + ts + 23837, + ts + 23855, uintptr(0), - ts + 23840, - ts + 23866, ts + 23889, + uintptr(0), ts + 23910, + ts + 23936, + ts + 23959, + ts + 23980, } func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { @@ -113900,6 +114782,12 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { *(*int32)(unsafe.Pointer(db + 312)) = 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 + 312)) != 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 @@ -113914,7 +114802,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) @@ -113959,7 +114847,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+23926, 0) + ts+23996, 0) return SQLITE_BUSY } else { @@ -114076,7 +114964,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23989, libc.VaList(bp, zName)) + ts+24059, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -114312,7 +115200,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+24040, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+24110, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -114405,7 +115293,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 { @@ -114475,7 +115363,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 @@ -114485,7 +115373,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 @@ -114517,14 +115405,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+24061, 0) + ts+24131, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -114654,7 +115542,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+24129, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+24199, uint32(5)) == 0) { goto __1 } iOut = 0 @@ -114699,10 +115587,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24135, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+24205, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24145, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24215, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -114807,7 +115695,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24173, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+24243, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -114818,17 +115706,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24177, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+24247, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 24177 + zModeType = ts + 24247 __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24183, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+24253, zOpt, uint32(4)) == 0) { goto __32 } @@ -114866,7 +115754,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24188, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24258, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -114874,7 +115762,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24208, + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24278, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -114914,7 +115802,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24232, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24302, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -114937,15 +115825,15 @@ type OpenMode = struct { } var aCacheMode = [3]OpenMode{ - {Fz: ts + 24248, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 24255, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24318, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24325, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, } var aOpenMode = [5]OpenMode{ - {Fz: ts + 24263, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 24266, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 24269, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17339, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24333, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24336, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24339, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17355, Fmode: SQLITE_OPEN_MEMORY}, {}, } @@ -115091,10 +115979,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+21795, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21856, 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+24273, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24343, 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) { @@ -115108,7 +115996,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+12, bp+16) @@ -115159,9 +116047,9 @@ __22: Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FpSchema = Xsqlite3SchemaGet(tls, db, uintptr(0)) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6374 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6434 (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23275 + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23345 (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -115266,7 +116154,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { return rc } if zFilename == uintptr(0) { - zFilename = ts + 24279 + zFilename = ts + 24349 } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -115369,21 +116257,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+24282, + Xsqlite3_log(tls, iErr, ts+24352, 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+24307) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24377) } func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24327) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24397) } func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24334) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24404) } // This is a convenience routine that makes sure that all thread-specific @@ -115541,7 +116429,7 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24))) - *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24351, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24)) = Xsqlite3MPrintf(tls, db, ts+24421, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: @@ -116197,7 +117085,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24379, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24449, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -116315,7 +117203,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 + 24387 + return ts + 24457 } return uintptr(0) }(), 0) @@ -116492,7 +117380,7 @@ type JsonParse1 = struct { type JsonParse = JsonParse1 var jsonType = [8]uintptr{ - ts + 6174, ts + 6697, ts + 6702, ts + 6184, ts + 6179, ts + 7938, ts + 24410, ts + 24416, + ts + 6174, ts + 6757, ts + 6762, ts + 6184, ts + 6179, ts + 7998, ts + 24480, ts + 24486, } func jsonZero(tls *libc.TLS, p uintptr) { @@ -116645,7 +117533,7 @@ __10: *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0') *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0' + int32(c)>>4) - c = *(*uint8)(unsafe.Pointer(ts + 24423 + uintptr(int32(c)&0xf))) + c = *(*uint8)(unsafe.Pointer(ts + 24493 + uintptr(int32(c)&0xf))) __8: ; __6: @@ -116700,7 +117588,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+24440, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24510, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -116764,13 +117652,13 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6697, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6757, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6702, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6762, uint32(5)) break } @@ -117320,12 +118208,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+6697, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6757, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i+U32(4))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_TRUE), uint32(0), uintptr(0)) return int32(i + U32(4)) } else if int32(c) == 'f' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6702, uint32(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6762, uint32(5)) == 0 && !(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(z + uintptr(i+U32(5))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -117426,7 +118314,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+24469, -1) + Xsqlite3_result_error(tls, pCtx, ts+24539, -1) } } jsonParseReset(tls, pParse) @@ -117732,7 +118620,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24484, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24554, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -117747,7 +118635,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24488, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24558, libc.VaList(bp, zErr)) } func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { @@ -117801,7 +118689,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+24514, + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24584, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -117906,11 +118794,11 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if int32(*(*uint8)(unsafe.Pointer(zPath))) != '$' { jsonInit(tls, bp, ctx) if int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zPath))])&0x04 != 0 { - jsonAppendRaw(tls, bp, ts+24557, uint32(2)) + jsonAppendRaw(tls, bp, ts+24627, uint32(2)) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendRaw(tls, bp, ts+4991, uint32(2)) } else { - jsonAppendRaw(tls, bp, ts+24560, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) + jsonAppendRaw(tls, bp, ts+24630, uint32(1+libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zPath))) != '['))) jsonAppendRaw(tls, bp, zPath, uint32(int32(libc.Xstrlen(tls, zPath)))) jsonAppendChar(tls, bp, uint8(0)) } @@ -118067,14 +118955,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24563, -1) + ts+24633, -1) return } jsonInit(tls, bp, ctx) jsonAppendChar(tls, bp, uint8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24614, -1) + Xsqlite3_result_error(tls, ctx, ts+24684, -1) jsonReset(tls, bp) return } @@ -118169,7 +119057,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15357) + jsonWrongNumArgs(tls, ctx, ts+15373) return __2: ; @@ -118244,9 +119132,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24648 + return ts + 24718 } - return ts + 24652 + return ts + 24722 }()) return __2: @@ -118379,7 +119267,7 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24659, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24729, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118476,7 +119364,7 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24662, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24732, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -118520,7 +119408,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = argc _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24665) + ts+24735) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -118651,7 +119539,7 @@ func jsonAppendObjectPathElement(tls *libc.TLS, pStr uintptr, pNode uintptr) { nn = nn - 2 } } - jsonPrintf(tls, nn+2, pStr, ts+24748, libc.VaList(bp, nn, z)) + jsonPrintf(tls, nn+2, pStr, ts+24818, libc.VaList(bp, nn, z)) } func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { @@ -118670,7 +119558,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { pNode = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*12 pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24754, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24824, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 @@ -118766,7 +119654,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { jsonAppendChar(tls, bp+8, uint8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+8, ts+24754, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+8, ts+24824, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { jsonAppendObjectPathElement(tls, bp+8, pThis) } @@ -118790,7 +119678,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 + 24759 + zRoot = ts + 24829 } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -118855,6 +119743,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 } @@ -118906,7 +119800,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+24469, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24539, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -119001,25 +119895,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 + 24761}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24766}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24777}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24795}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24808}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24811}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24815}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24827}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24839}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24850}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24861}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24873}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24886}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24895}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24905}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24916}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_SUBTYPE | SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 24933}} + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24831}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24836}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24847}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24847}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24865}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_JSON), FxSFunc: 0, FzName: ts + 24878}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_SQL), FxSFunc: 0, FzName: ts + 24881}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24885}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24897}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24909}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24920}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24931}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24943}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: uintptr(JSON_ISSET), FxSFunc: 0, FzName: ts + 24956}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24965}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24965}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_DETERMINISTIC | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 24975}, + {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 + 24986}, + {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 + 25003}} // Register the JSON table-valued functions func Xsqlite3JsonTableFunctions(tls *libc.TLS, db uintptr) int32 { @@ -119038,8 +119932,8 @@ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24951, FpModule: 0}, - {FzName: ts + 24961, FpModule: 0}, + {FzName: ts + 25021, FpModule: 0}, + {FzName: ts + 25031, FpModule: 0}, } type Rtree1 = struct { @@ -119296,11 +120190,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+24971, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+25041, 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+24979, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+25049, iNode, 0, pRtree+76) Xsqlite3_free(tls, zTab) } @@ -119511,7 +120405,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { var pRtree uintptr = pVtab var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24984, + ts+25054, 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)) @@ -120214,7 +121108,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { var pSrc uintptr var pInfo uintptr - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25066) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+25136) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -121555,7 +122449,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+25080, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+25150, 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 { @@ -121567,12 +122461,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+25100, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+25170, 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+25132, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+25202, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -121798,7 +122692,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+25169, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+25239, 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)) @@ -121821,14 +122715,14 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 25314 + var zFmt uintptr = ts + 25384 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+11279, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11341, 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 { @@ -121869,7 +122763,7 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName1 = [3]uintptr{ - ts + 25370, ts + 5053, ts + 16244, + ts + 25440, ts + 5053, ts + 16260, } var rtreeModule = Sqlite3_module{ @@ -121912,19 +122806,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25375, + ts+25445, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25437, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25507, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25442, + ts+25512, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25506, + ts+25576, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25576, + ts+25646, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -121953,7 +122847,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if i != 3 || int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) == 0 { zFormat = azSql[i] } else { - zFormat = ts + 25625 + zFormat = ts + 25695 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { @@ -121965,7 +122859,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25733, + ts+25803, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121973,18 +122867,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25778, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25848, 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+12750, 1) + Xsqlite3_str_append(tls, p, ts+12760, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25805, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25875, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25827, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25897, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25835, 0) + Xsqlite3_str_appendf(tls, p, ts+25905, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -121999,14 +122893,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - ts + 25851, - ts + 25904, - ts + 25949, - ts + 26001, - ts + 26055, - ts + 26100, - ts + 26158, - ts + 26213, + ts + 25921, + ts + 25974, + ts + 26019, + ts + 26071, + ts + 26125, + ts + 26170, + ts + 26228, + ts + 26283, } func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { @@ -122035,7 +122929,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+26260, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, ts+26330, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 @@ -122047,7 +122941,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } } else { zSql = Xsqlite3_mprintf(tls, - ts+26280, + ts+26350, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+16) if rc != SQLITE_OK { @@ -122055,7 +122949,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+26337, + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26407, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -122097,10 +122991,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 + 26372, - ts + 26415, - ts + 26450, - ts + 26486, + ts + 26442, + ts + 26485, + ts + 26520, + ts + 26556, } if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { @@ -122131,7 +123025,7 @@ __2: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26523, + Xsqlite3_str_appendf(tls, pSql, ts+26593, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -122143,7 +123037,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26547, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26617, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -122166,7 +123060,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26623, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -122262,7 +123156,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26556, ts + 26567} +var azFormat = [2]uintptr{ts + 26626, ts + 26637} func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { bp := tls.Alloc(600) @@ -122300,13 +123194,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { nodeGetCell(tls, bp+48, bp+16, ii, bp+552) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10851, 1) + Xsqlite3_str_append(tls, pOut, ts+10913, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26577, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26647, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+552)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+48)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26583, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26653, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 552 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26587, 1) + Xsqlite3_str_append(tls, pOut, ts+26657, 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}))) @@ -122317,7 +123211,7 @@ func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26589, -1) + Xsqlite3_result_error(tls, ctx, ts+26659, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -122393,7 +123287,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+26622, + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26692, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { return ts + 4055 @@ -122417,7 +123311,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+26629, + ts+26699, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -122436,7 +123330,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+26674, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26744, libc.VaList(bp+16, iNode)) } } @@ -122450,8 +123344,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 + 26706, - ts + 26760, + ts + 26776, + ts + 26830, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { @@ -122466,23 +123360,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+26808, + rtreeCheckAppendMsg(tls, pCheck, ts+26878, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26853 + return ts + 26923 } - return ts + 26861 + return ts + 26931 }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26870, + ts+26940, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26853 + return ts + 26923 } - return ts + 26861 + return ts + 26931 }(), iKey, iVal)) } } @@ -122506,7 +123400,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+26928, libc.VaList(bp, i, iCell, iNode)) + ts+26998, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { @@ -122526,7 +123420,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+26976, libc.VaList(bp+24, i, iCell, iNode)) + ts+27046, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -122543,14 +123437,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+27043, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48)))) + ts+27113, 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+27077, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+27147, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -122558,7 +123452,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+27107, + ts+27177, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48)))) } else { for i = 0; i < nCell; i++ { @@ -122587,14 +123481,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+27162, + pCount = rtreeCheckPrepare(tls, pCheck, ts+27232, 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+27193, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+27263, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -122616,12 +123510,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+14486, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = Xsqlite3_exec(tls, db, ts+14496, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32, ts+27260, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27330, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -122630,12 +123524,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } } - pStmt = rtreeCheckPrepare(tls, bp+32, ts+25080, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+25150, 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+27288, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27358, 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) } @@ -122649,8 +123543,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+27319, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) - rtreeCheckCount(tls, bp+32, ts+27326, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27389, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27396, int64((*RtreeCheck)(unsafe.Pointer(bp+32)).FnNonLeaf)) } Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32)).FpGetNode) @@ -122658,7 +123552,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 24 + 1*4))) if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+27334, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27404, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32)).Frc = rc } @@ -122673,7 +123567,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+27338, -1) + ts+27408, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -122681,7 +123575,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6374 + zDb = ts + 6434 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4))) } @@ -122691,7 +123585,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 + 17962 + return ts + 18005 }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -122985,7 +123879,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui var nByte int32 if Xsqlite3_value_type(tls, pVal) == SQLITE_BLOB && - uint32(libc.AssignInt32(&nByte, Xsqlite3_value_bytes(tls, pVal))) >= uint32(4)+uint32(6)*uint32(unsafe.Sizeof(GeoCoord(0))) { + libc.AssignInt32(&nByte, Xsqlite3_value_bytes(tls, pVal)) >= int32(uint32(4)+uint32(6)*uint32(unsafe.Sizeof(GeoCoord(0)))) { var a uintptr = Xsqlite3_value_blob(tls, pVal) var nVertex int32 if a == uintptr(0) { @@ -123043,6 +123937,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)) @@ -123055,15 +123950,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+27389, 1) + Xsqlite3_str_append(tls, x, ts+27459, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27391, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27461, 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+27402, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27472, 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) } @@ -123083,19 +123979,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep uint8 = uint8('\'') - Xsqlite3_str_appendf(tls, x, ts+27413, 0) + Xsqlite3_str_appendf(tls, x, ts+27483, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27431, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27501, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = uint8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27439, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27509, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if z != 0 && *(*uint8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27447, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27517, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27451, 0) + Xsqlite3_str_appendf(tls, x, ts+27521, 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) } @@ -123114,6 +124010,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)) @@ -123145,6 +124042,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) @@ -123153,6 +124051,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 @@ -123211,6 +124110,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr var n int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))) var p uintptr + _ = argc if n < 3 || r <= 0.0 { return @@ -123379,6 +124279,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)) @@ -123400,6 +124301,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 @@ -123484,6 +124386,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 } @@ -123512,6 +124416,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*4)), uintptr(0)) + _ = argc if p1 != 0 && p2 != 0 { var x int32 = geopolyOverlap(tls, p1, p2) if x < 0 { @@ -123949,6 +124854,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*4)), uintptr(0)) + _ = argc if p1 != 0 && p2 != 0 { var x int32 = geopolyOverlap(tls, p1, p2) if x < 0 { @@ -123962,6 +124868,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 { @@ -123976,6 +124885,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)) @@ -124000,7 +124910,7 @@ __1: libc.Xmemcpy(tls, (*Rtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), uint32(nName)) pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27464, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27534, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) ii = 3 @@ -124009,7 +124919,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27486, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27556, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -124017,7 +124927,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26553, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26623, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -124096,6 +125006,7 @@ func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uint *(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 16)) = 0 + _ = idxStr rtreeReference(tls, pRtree) @@ -124224,6 +125135,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 @@ -124242,7 +125154,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 + 16244 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16260 (*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 @@ -124252,7 +125164,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 + 27490 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27560 (*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 @@ -124260,7 +125172,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 + 27496 + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27566 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -124372,7 +125284,7 @@ __1: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27505, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27575, 0) __4: ; goto geopoly_update_end @@ -124502,14 +125414,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+27545) == 0 { + _ = pVtab + _ = nArg + if Xsqlite3_stricmp(tls, zName, ts+27615) == 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+27561) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27631) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -124546,8 +125460,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; uint32(i) < uint32(unsafe.Sizeof(aFunc))/uint32(unsafe.Sizeof(struct { + var i uint32 + for i = uint32(0); i < uint32(unsafe.Sizeof(aFunc))/uint32(unsafe.Sizeof(struct { FxFunc uintptr FnArg int8 FbPure uint8 @@ -124564,7 +125478,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { enc, uintptr(0), aFunc[i].FxFunc, uintptr(0), uintptr(0)) } - for i = 0; uint32(i) < uint32(unsafe.Sizeof(aAgg))/uint32(unsafe.Sizeof(struct { + for i = uint32(0); i < uint32(unsafe.Sizeof(aAgg))/uint32(unsafe.Sizeof(struct { FxStep uintptr FxFinal uintptr FzName uintptr @@ -124574,7 +125488,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+27576, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27646, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -124586,25 +125500,25 @@ var aFunc = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27584}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27597}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27610}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27623}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27561}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27635}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27545}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27658}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27672}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27685}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27699}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27715}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27654}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27667}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27680}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27693}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27631}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27705}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27615}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27728}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27742}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27755}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27769}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27785}, } var aAgg = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27727}, + {FxStep: 0, FxFinal: 0, FzName: ts + 27797}, } // Register the r-tree module with database handle db. This creates the @@ -124614,26 +125528,26 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27746, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27816, 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+27756, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27826, 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+27767, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27837, -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+27490, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27560, 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+27778, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27848, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -124687,7 +125601,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+25066, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+25136, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } @@ -125005,7 +125919,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+27788, -1) + Xsqlite3_result_error(tls, context, ts+27858, -1) return } @@ -125016,7 +125930,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+27788, -1) + Xsqlite3_result_error(tls, context, ts+27858, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -125117,7 +126031,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+27809, uintptr(0), uintptr(0), p+36) + ts+27879, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -125181,7 +126095,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24979, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+25049, zIn, uint32(4)) == 0 { var i int32 for i = 4; int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -125202,16 +126116,16 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27980, libc.VaList(bp, func() uintptr { + ts+28050, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 28130 + return ts + 28200 } return ts + 1547 }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+28171) + ts+28241) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -125327,7 +126241,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+36, Xsqlite3_mprintf(tls, - ts+28296, libc.VaList(bp, zTab))) + ts+28366, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -125345,7 +126259,7 @@ __2: *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*4, p+36, - Xsqlite3_mprintf(tls, ts+28415, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28485, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -125363,7 +126277,7 @@ __4: } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28436, libc.VaList(bp+16, zIdx))) + ts+28506, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } @@ -125386,7 +126300,7 @@ __6: __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28487, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28557, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -125432,7 +126346,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+36, - Xsqlite3_mprintf(tls, ts+28508, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28578, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -125447,7 +126361,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+20, p+36, - Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28606, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 20)), 1) if iCid >= 0 { @@ -125487,7 +126401,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+56, pIter+60) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19389, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19482, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -125497,18 +126411,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28565, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + Xsqlite3_mprintf(tls, ts+28635, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 60))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), i) - if Xsqlite3_strnicmp(tls, ts+28584, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28654, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+32) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*4)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28589, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28659, zName) { bRbuRowid = 1 } } @@ -125520,18 +126434,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+28599, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28669, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28628 + return ts + 28698 } - return ts + 28641 + return ts + 28711 }())) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28650, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28720, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 60))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 1) @@ -125545,7 +126459,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+28672, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28742, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 5) @@ -125592,8 +126506,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+28699, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14597 + zList = rbuMPrintf(tls, p, ts+28769, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14607 } return zList } @@ -125610,7 +126524,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zRet = rbuMPrintf(tls, p, ts+28708, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28778, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -125632,25 +126546,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, if bRowid != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28721, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28791, 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+28753, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28823, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+28776) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28782, ts+28789, ts+4950) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14607, ts+28846) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28852, ts+28859, ts+4950) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14607, ts+1547) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28797, + ts+28867, 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+28839, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28909, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72))) } @@ -125692,7 +126606,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+36, - Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28606, 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 @@ -125727,7 +126641,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28859 + zCol = ts + 28929 __7: ; goto __5 @@ -125735,13 +126649,13 @@ __4: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) __5: ; - zLhs = rbuMPrintf(tls, p, ts+28867, + zLhs = rbuMPrintf(tls, p, ts+28937, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28888, + zOrder = rbuMPrintf(tls, p, ts+28958, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28924, + zSelect = rbuMPrintf(tls, p, ts+28994, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14597 + zSep = ts + 14607 iCol++ goto __1 __2: @@ -125759,7 +126673,7 @@ __11: *(*uintptr)(unsafe.Pointer(bp + 180)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, - Xsqlite3_mprintf(tls, ts+28951, + Xsqlite3_mprintf(tls, ts+29021, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 180)))) { goto __13 @@ -125786,8 +126700,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28999, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14597 + zVector = rbuMPrintf(tls, p, ts+29069, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14607 goto __15 __15: iCol++ @@ -125798,7 +126712,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+29006, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+29076, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -125831,7 +126745,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if rc == SQLITE_OK { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, - Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + Xsqlite3_mprintf(tls, ts+28606, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -125843,7 +126757,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+29018, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+29088, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FzSpan, zCollate)) zType = ts + 1547 } else { @@ -125855,37 +126769,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28859 + zCol = ts + 28929 } else { - zCol = ts + 28589 + zCol = ts + 28659 } zType = ts + 1112 } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)) } - zRet = Xsqlite3_mprintf(tls, ts+29040, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+29110, 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 + 28776 + return ts + 28846 } return ts + 1547 }() - zImpPK = Xsqlite3_mprintf(tls, ts+29060, + zImpPK = Xsqlite3_mprintf(tls, ts+29130, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+29081, + zImpCols = Xsqlite3_mprintf(tls, ts+29151, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+29114, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+29184, 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 + 14597 - zAnd = ts + 21457 + zCom = ts + 14607 + zAnd = ts + 21518 nBind++ } @@ -125924,11 +126838,11 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = Xsqlite3_mprintf(tls, ts+29138, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+29208, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+29150, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+29220, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14597 + zS = ts + 14607 if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -125936,7 +126850,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+29159, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+29229, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -125948,18 +126862,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+29174, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+29244, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { var zSep uintptr = ts + 1547 var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+29188, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21457 + zList = rbuMPrintf(tls, p, ts+29258, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21518 } } zList = rbuMPrintf(tls, p, - ts+29200, libc.VaList(bp+40, zList)) + ts+29270, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 1547 @@ -125967,8 +126881,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)*4)) - zList = rbuMPrintf(tls, p, ts+29250, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21457 + zList = rbuMPrintf(tls, p, ts+29320, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21518 } } } @@ -125977,7 +126891,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+29263, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29333, 0) } func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { @@ -125995,17 +126909,17 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c uint8 = *(*uint8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+29250, + zList = rbuMPrintf(tls, p, ts+29320, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14597 + zSep = ts + 14607 } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+29289, + zList = rbuMPrintf(tls, p, ts+29359, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14597 + zSep = ts + 14607 } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+29319, + zList = rbuMPrintf(tls, p, ts+29389, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14597 + zSep = ts + 14607 } } } @@ -126040,19 +126954,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 + 29356 + var zSep uintptr = ts + 29426 *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, - Xsqlite3_mprintf(tls, ts+28508, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + Xsqlite3_mprintf(tls, ts+28578, 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+16132) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16148) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56)), 1) if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, - Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp+8, zIdx))) + Xsqlite3_mprintf(tls, ts+28606, libc.VaList(bp+8, zIdx))) } break } @@ -126064,15 +126978,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28776 + zDesc = ts + 28846 } else { zDesc = ts + 1547 } - z = rbuMPrintf(tls, p, ts+29369, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14597 + z = rbuMPrintf(tls, p, ts+29439, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14607 } } - z = rbuMPrintf(tls, p, ts+29380, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29450, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60))) } return z @@ -126092,7 +127006,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+36, - ts+29384) + ts+29454) 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))) { @@ -126101,7 +127015,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } if zIdx != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, - Xsqlite3_mprintf(tls, ts+28536, libc.VaList(bp, zIdx))) + Xsqlite3_mprintf(tls, ts+28606, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168))) @@ -126111,25 +127025,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172)), 4) - zCols = rbuMPrintf(tls, p, ts+29434, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29504, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29456, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29526, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28776 + return ts + 28846 } return ts + 1547 }())) - zComma = ts + 14597 + zComma = ts + 14607 } } - zCols = rbuMPrintf(tls, p, ts+29466, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29536, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29481, + ts+29551, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 0, 0)) } } @@ -126142,7 +127056,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { var zComma uintptr = ts + 1547 var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { var zPk uintptr = ts + 1547 @@ -126150,39 +127064,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+6374, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, (*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 + 29543 + zPk = ts + 29613 } - zSql = rbuMPrintf(tls, p, ts+29556, + zSql = rbuMPrintf(tls, p, ts+29626, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29583 + return ts + 29653 } return ts + 1547 }())) - zComma = ts + 14597 + zComma = ts + 14607 } 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+29593, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29663, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29600, + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29670, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29632 + return ts + 29702 } return ts + 1547 }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 0, 0)) } } @@ -126195,7 +127109,7 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis if zBind != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29647, + ts+29717, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -126232,7 +127146,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 4)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, - ts+29704) + ts+29774) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -126337,7 +127251,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+29770, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29840, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -126357,24 +127271,24 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 p, pIter, bp+600, bp+604, bp+608, bp+612) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 612))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29790, + ts+29860, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600)), *(*uintptr)(unsafe.Pointer(bp + 604)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 0, 0)) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 612)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, - Xsqlite3_mprintf(tls, ts+29855, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29925, libc.VaList(bp+128, zTbl, zBind))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, - Xsqlite3_mprintf(tls, ts+29891, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) + Xsqlite3_mprintf(tls, ts+29961, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608))))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -126390,7 +127304,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29925, + ts+29995, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -126398,9 +127312,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29986 + return ts + 30056 } - return ts + 29990 + return ts + 30060 }() } return ts + 1547 @@ -126409,20 +127323,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+29996, + ts+30066, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+30057, + ts+30127, libc.VaList(bp+264, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29986 + return ts + 30056 } - return ts + 29990 + return ts + 30060 }(), zCollist, zLimit)) } @@ -126447,8 +127361,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+6385) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6381) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6445) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6441) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -126459,16 +127373,16 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { return ts + 1547 } - return ts + 30216 + return ts + 30286 }() if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, - ts+30225, + ts+30295, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 30261 + return ts + 30331 } return ts + 1547 }(), zBindings))) @@ -126477,32 +127391,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+84, pz, Xsqlite3_mprintf(tls, - ts+30271, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30341, 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 + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 30299 + zRbuRowid = ts + 30369 } rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30311, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30381, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30387 + return ts + 30457 } return ts + 1547 }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30404, + ts+30474, 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+30703, + ts+30773, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -126515,9 +127429,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 + 30802 + zRbuRowid = ts + 30872 } else { - zRbuRowid = ts + 30812 + zRbuRowid = ts + 30882 } } @@ -126530,20 +127444,20 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28859, 0) + zOrder = rbuMPrintf(tls, p, ts+28929, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14597, ts+1547) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1547, ts+14607, ts+1547) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, - ts+30823, + ts+30893, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30871 + return ts + 30941 } return ts + 1547 }(), @@ -126556,7 +127470,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 }(), func() uintptr { if zOrder != 0 { - return ts + 19743 + return ts + 22852 } return ts + 1547 }(), zOrder, @@ -126624,9 +127538,9 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp var zPrefix uintptr = ts + 1547 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 30216 + zPrefix = ts + 30286 } - zUpdate = Xsqlite3_mprintf(tls, ts+30877, + zUpdate = Xsqlite3_mprintf(tls, ts+30947, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+4, p+36, zUpdate) @@ -126685,7 +127599,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { } *(*int32)(unsafe.Pointer(bp + 12)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, - Xsqlite3_mprintf(tls, ts+30907, libc.VaList(bp, p+24))) + Xsqlite3_mprintf(tls, ts+30977, libc.VaList(bp, p+24))) for *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) { case RBU_STATE_STAGE: @@ -126755,28 +127669,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+6374, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6434, 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+6374) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30937, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6434) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+31007, libc.VaList(bp, zFile, zFile)) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30965, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31035, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+24, ts+3279, uint32(4)) } else { - libc.Xmemcpy(tls, p+24, ts+6374, uint32(4)) + libc.Xmemcpy(tls, p+24, ts+6434, uint32(4)) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30983, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31053, libc.VaList(bp+24, p+24)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 var rc int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FnRbu = 0 (*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd = uintptr(0) - rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6434, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -126809,11 +127723,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+31049, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31119, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24129, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+24199, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*uint8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -126825,13 +127739,13 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+31081, - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6374), + zTarget = Xsqlite3_mprintf(tls, ts+31151, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6434), func() uintptr { if zExtra == uintptr(0) { return ts + 1547 } - return ts + 31113 + return ts + 31183 }(), func() uintptr { if zExtra == uintptr(0) { return ts + 1547 @@ -126850,37 +127764,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+31115, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31185, -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+31130, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+31200, 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+31147, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31217, -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+6374, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31163, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31233, 0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6374, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434, 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+31191, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31261, 0) } } @@ -126909,15 +127823,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+31163, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31233, 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+31209, uintptr(0), uintptr(0), uintptr(0)) - if rc2 != SQLITE_INTERNAL { + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31279, uintptr(0), uintptr(0), uintptr(0)) + if rc2 != SQLITE_NOTICE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } } @@ -126965,7 +127879,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 @@ -127025,7 +127939,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+6374, SQLITE_FCNTL_FILE_POINTER, bp) + Xsqlite3_file_control(tls, db, ts+6434, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -127042,23 +127956,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+31244, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31314, 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+6374) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6434) 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+6374) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6434) } - zOal = Xsqlite3_mprintf(tls, ts+31269, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+31276, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31339, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31346, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -127175,7 +128089,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+23767, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23837, 0) return } @@ -127268,7 +128182,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { var iCookie int32 = 1000000 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, - ts+31283) + ts+31353) 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) @@ -127276,7 +128190,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+31305, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31375, libc.VaList(bp, iCookie+1)) } } } @@ -127297,7 +128211,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+31332, + ts+31402, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -127327,9 +128241,9 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, - Xsqlite3_mprintf(tls, ts+31490, libc.VaList(bp, zPragma))) + Xsqlite3_mprintf(tls, ts+31560, 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+31505, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31575, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24))) @@ -127343,10 +128257,10 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31525, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31595, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31550) + ts+31620) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127360,12 +128274,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31658) + ts+31728) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, - ts+31723) + ts+31793) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -127377,7 +128291,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31767, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31837, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -127397,15 +128311,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+17217) - rbuCopyPragma(tls, p, ts+16328) + rbuCopyPragma(tls, p, ts+17233) + rbuCopyPragma(tls, p, ts+16344) } 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+31792, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31862, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -127429,10 +128343,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+14501, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14511, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14501, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14511, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -127527,7 +128441,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+31820, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31890, 0) } if rc == SQLITE_OK { @@ -127540,16 +128454,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(12) + defer tls.Free(12) - var zOal uintptr = rbuMPrintf(tls, p, ts+31269, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31339, 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+6434, 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) } } @@ -127559,7 +128474,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { defer tls.Free(76) Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31845, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8)))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12, ts+31915, 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) @@ -127593,7 +128508,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31856, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31926, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 12)), -1) } else { @@ -127623,13 +128538,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+31928, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31998, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31942) + ts+32012) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -127640,7 +128555,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31999) + ts+32069) 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) @@ -127714,7 +128629,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+32073, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32143, 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 @@ -127732,12 +128647,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+32105, + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32175, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 32137 + return ts + 32207 } - return ts + 32144 + return ts + 32214 }())) } } @@ -127745,7 +128660,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+14486, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14496, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, p+48) @@ -127756,19 +128671,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+16931) - rbuCopyPragma(tls, p, ts+16343) + rbuCopyPragma(tls, p, ts+16947) + rbuCopyPragma(tls, p, ts+16359) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32151, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+32221, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6374, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6434, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+32167, uintptr(0), uintptr(0), p+36) + db, ts+32237, uintptr(0), uintptr(0), p+36) } } @@ -127822,7 +128737,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+32191, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+32261, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -127849,7 +128764,7 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); i < nErrmsg-Size_t(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30216, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30286, uint32(8)) == 0 { var nDel int32 = 8 for int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -127866,7 +128781,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+14501, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14511, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT { @@ -127879,13 +128794,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+14501, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14511, uintptr(0), uintptr(0), p+36) } rbuObjIterFinalize(tls, p+48) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32199, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32269, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -127980,7 +128895,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+14501, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14511, uintptr(0), uintptr(0), uintptr(0)) } } @@ -127997,19 +128912,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+14501, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14511, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14486 + zBegin = ts + 14496 } else { - zBegin = ts + 32151 + zBegin = ts + 32221 } 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+32151, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+32221, uintptr(0), uintptr(0), uintptr(0)) } } @@ -128132,11 +129047,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)) } @@ -128275,7 +129193,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 } @@ -128352,7 +129270,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+32226, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32296, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -128377,7 +129295,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+32249, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32319, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -128522,7 +129440,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+6374) + zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6434) zOpen = Xsqlite3_filename_wal(tls, zOpen) } nOpen = libc.Xstrlen(tls, zOpen) @@ -128537,7 +129455,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+32260, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32330, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) } @@ -128548,7 +129466,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) } @@ -128578,6 +129502,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 @@ -129337,11 +130276,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+11279, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11341, 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+32271, 0) + ts+32341, 0) } else if rc == SQLITE_ERROR { zPragma = Xsqlite3_mprintf(tls, ts+1547, 0) } else { @@ -129354,7 +130293,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32392, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32462, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -129452,7 +130391,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { break } } - if 0 == Xsqlite3_stricmp(tls, ts+11279, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11341, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -129919,6 +130858,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 @@ -130000,6 +130942,7 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { } func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { + _ = pCtx return 0 } @@ -130029,9 +130972,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+32421, + zRet = Xsqlite3_mprintf(tls, ts+32491, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 21457 + zSep = ts + 21518 if zRet == uintptr(0) { break } @@ -130054,9 +130997,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+32455, + ts+32525, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 32496 + zSep = ts + 32566 if zRet == uintptr(0) { break } @@ -130064,18 +131007,18 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp } if bHave == 0 { - zRet = Xsqlite3_mprintf(tls, ts+7463, 0) + zRet = Xsqlite3_mprintf(tls, ts+7523, 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+32501, + ts+32571, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } @@ -130085,7 +131028,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, defer tls.Free(4) 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 @@ -130118,7 +131061,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32579, + ts+32649, 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 @@ -130245,7 +131188,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32632, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32702, 0) __16: ; rc = SQLITE_SCHEMA @@ -130719,9 +131662,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+11279, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11341, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32659, libc.VaList(bp, zDb)) + ts+32729, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 20)) = SQLITE_NOMEM } @@ -130730,18 +131673,18 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSep uintptr = ts + 1547 *(*SessionBuffer)(unsafe.Pointer(bp + 8)) = SessionBuffer{} - sessionAppendStr(tls, bp+8, ts+32769, bp+20) + sessionAppendStr(tls, bp+8, ts+32839, bp+20) sessionAppendIdent(tls, bp+8, zDb, bp+20) sessionAppendStr(tls, bp+8, ts+1560, bp+20) sessionAppendIdent(tls, bp+8, zTab, bp+20) - sessionAppendStr(tls, bp+8, ts+32784, bp+20) + sessionAppendStr(tls, bp+8, ts+32854, bp+20) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { sessionAppendStr(tls, bp+8, zSep, bp+20) sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp+20) - sessionAppendStr(tls, bp+8, ts+32792, bp+20) + sessionAppendStr(tls, bp+8, ts+32862, bp+20) sessionAppendInteger(tls, bp+8, i+1, bp+20) - zSep = ts + 21457 + zSep = ts + 21518 } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8)).FaBuf @@ -130850,7 +131793,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32798, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 24)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32868, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24)) } @@ -130942,7 +131885,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+12)).FaBuf) - Xsqlite3_exec(tls, db, ts+32818, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32888, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 24)) } @@ -131205,7 +132148,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))))) @@ -131228,7 +132171,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 { @@ -131270,7 +132213,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)) @@ -131331,7 +132274,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 217717) + *(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3CorruptError(tls, 219240) } } @@ -131405,13 +132348,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint } if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab == uintptr(0) || (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217803)) + return libc.AssignPtrInt32(p+68, 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+68, Xsqlite3CorruptError(tls, 217809)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 219332)) } if paRec != 0 { @@ -131473,7 +132416,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) == uintptr(0) { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 217853)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 219376)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -131846,7 +132789,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 218218) + *(*int32)(unsafe.Pointer(bp + 32)) = Xsqlite3CorruptError(tls, 219741) goto finished_invert __6: ; @@ -132012,7 +132955,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint32(unsafe.Sizeof(SessionUpdate{})) * uint32(nU32) * uint32(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11279) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11341) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_NOMEM @@ -132023,34 +132966,34 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*12 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint32(nU32)*uint32(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp, ts+32836, bp+12) + sessionAppendStr(tls, bp, ts+32906, bp+12) sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) - sessionAppendStr(tls, bp, ts+32849, bp+12) + sessionAppendStr(tls, bp, ts+32919, bp+12) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32855, bp+12) + sessionAppendStr(tls, bp, ts+32925, bp+12) sessionAppendInteger(tls, bp, ii*2+1, bp+12) - zSep = ts + 14597 + zSep = ts + 14607 } } zSep = ts + 1547 - sessionAppendStr(tls, bp, ts+32784, bp+12) + sessionAppendStr(tls, bp, ts+32854, bp+12) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*4)) != 0 { sessionAppendStr(tls, bp, zSep, bp+12) if bStat1 != 0 && ii == 1 { sessionAppendStr(tls, bp, - ts+32860, bp+12) + ts+32930, bp+12) } else { sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32792, bp+12) + sessionAppendStr(tls, bp, ts+32862, bp+12) sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21457 + zSep = ts + 21518 } } @@ -132102,34 +133045,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+32935, bp+12) + sessionAppendStr(tls, bp, ts+33005, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+32784, bp+12) + sessionAppendStr(tls, bp, ts+32854, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32855, bp+12) + sessionAppendStr(tls, bp, ts+32925, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 21457 + zSep = ts + 21518 } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp, ts+32953, bp+12) + sessionAppendStr(tls, bp, ts+33023, bp+12) sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) - sessionAppendStr(tls, bp, ts+32496, bp+12) + sessionAppendStr(tls, bp, ts+32566, bp+12) zSep = ts + 1547 for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { sessionAppendStr(tls, bp, zSep, bp+12) sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) - sessionAppendStr(tls, bp, ts+32792, bp+12) + sessionAppendStr(tls, bp, ts+32862, bp+12) sessionAppendInteger(tls, bp, i+1, bp+12) - zSep = ts + 32961 + zSep = ts + 33031 } } sessionAppendStr(tls, bp, ts+4950, bp+12) @@ -132145,7 +133088,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+6374, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) + db, ts+6434, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { @@ -132156,19 +133099,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+32966, bp+12) + sessionAppendStr(tls, bp, ts+33036, bp+12) sessionAppendIdent(tls, bp, zTab, bp+12) - sessionAppendStr(tls, bp, ts+21463, bp+12) + sessionAppendStr(tls, bp, ts+21524, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp, ts+14597, bp+12) + sessionAppendStr(tls, bp, ts+14607, bp+12) } sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp, ts+32984, bp+12) + sessionAppendStr(tls, bp, ts+33054, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp, ts+32995, bp+12) + sessionAppendStr(tls, bp, ts+33065, bp+12) } sessionAppendStr(tls, bp, ts+4950, bp+12) @@ -132184,14 +133127,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+11279, p) + var rc int32 = sessionSelectRow(tls, db, ts+11341, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32999) + ts+33069) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+33112) + ts+33182) } return rc } @@ -132219,7 +133162,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))) } @@ -132228,7 +133171,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(12) defer tls.Free(12) @@ -132305,7 +133248,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr Xsqlite3changeset_op(tls, pIter, bp, bp+4, bp+8, uintptr(0)) if pbReplace != 0 { - *(*int32)(unsafe.Pointer(bp + 12)) = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) + *(*int32)(unsafe.Pointer(bp + 12)) = sessionSeekToRow(tls, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect) } else { *(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK } @@ -132431,7 +133374,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) @@ -132472,7 +133415,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+33256, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33326, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -132488,7 +133431,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+33277, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33347, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -132561,10 +133504,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+33296, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33366, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33322, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33392, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+124, bp+128, bp+132, uintptr(0)) @@ -132610,7 +133553,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin Xsqlite3changeset_pk(tls, pIter, bp+136, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6374, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) + db, ts+6434, *(*uintptr)(unsafe.Pointer(bp + 124)), bp+48+16, bp+140, bp+48+20, bp+48+24) if rc != SQLITE_OK { break } @@ -132623,19 +133566,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+33352, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33422, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33396, + ts+33466, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140)), (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol, *(*int32)(unsafe.Pointer(bp + 128)))) } else if *(*int32)(unsafe.Pointer(bp + 128)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 136)), uint32(*(*int32)(unsafe.Pointer(bp + 128)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33467, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) + ts+33537, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48)).FnCol = *(*int32)(unsafe.Pointer(bp + 128)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11279) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11341) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -132686,14 +133629,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33527, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33597, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33627, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33581, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33557, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33651, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33627, uintptr(0), uintptr(0), uintptr(0)) } } @@ -133930,7 +134873,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { fts5yy_pop_parser_stack(tls, fts5yypParser) } - sqlite3Fts5ParseError(tls, pParse, ts+33609, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33679, 0) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134218,7 +135161,7 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor sqlite3Fts5ParseError(tls, - pParse, ts+33637, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33707, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse @@ -134403,7 +135346,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+33668, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33738, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -134471,7 +135414,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33675 + var zErr uintptr = ts + 33745 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134652,7 +135595,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33725 + var zErr uintptr = ts + 33795 Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -134976,13 +135919,13 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp)) = [3]Builtin{ - {FzFunc: ts + 33773, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33843, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33781, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33851, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33791, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33861, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -135532,7 +136475,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+33796, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33866, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 @@ -135559,14 +136502,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*uint8)(unsafe.Pointer(p))) < '0' || int32(*(*uint8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33803, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33873, 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+33834, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33904, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135577,7 +136520,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33867, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33937, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR break } @@ -135590,7 +136533,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33904, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33974, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + Size_t(1)) var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, Sqlite3_int64(unsafe.Sizeof(uintptr(0)))*nArg) @@ -135599,7 +136542,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+33913, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33983, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*uint8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -135618,7 +136561,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33946, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34016, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -135633,14 +136576,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+33980, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34050, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33988, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34058, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if *(*uint8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34020, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+34090, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -135648,9 +136591,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34026, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34096, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34040, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34110, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) @@ -135658,9 +136601,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40)) } - if Xsqlite3_strnicmp(tls, ts+34078, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+34148, zCmd, nCmd) == 0 { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || int32(*(*uint8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34089, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34159, 0) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1') @@ -135670,19 +136613,19 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if Xsqlite3_strnicmp(tls, ts+5068, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44)) = [4]Fts5Enum{ - {FzName: ts + 7951, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17322}, - {FzName: ts + 34124, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 8019, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17338}, + {FzName: ts + 34194, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+44, zArg, pConfig+48)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34132, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34202, 0) } return *(*int32)(unsafe.Pointer(bp + 40)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34163, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34233, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -135729,15 +136672,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+22123) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+16244) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34191, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+22184) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16260) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34261, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+34221) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34291) { *(*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+34231, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34301, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -135754,13 +136697,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { *(*int32)(unsafe.Pointer(bp + 24)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34262, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34332, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34267, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34337, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34274, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34344, libc.VaList(bp+16, i)) } } } @@ -135798,8 +136741,8 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+22123) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34282, 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+22184) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34352, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } @@ -135831,7 +136774,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+34311, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34381, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40)) = SQLITE_ERROR } else { if bOption != 0 { @@ -135868,19 +136811,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 + 33980 + zTail = ts + 34050 } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 34331 + zTail = ts + 34401 } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40, ts+34339, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34409, 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+16244, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16260, -1) } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { @@ -135924,18 +136867,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+34350, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34420, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { return ts + 1547 } - return ts + 14597 + return ts + 14607 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34366, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34436, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34373, - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22123)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34443, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+22184)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -136045,7 +136988,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34399) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34469) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -136055,7 +136998,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+34404) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34474) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -136065,7 +137008,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+34413) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34483) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -136078,7 +137021,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+34423) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34493) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -136088,7 +137031,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+34433) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34503) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -136104,7 +137047,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+22123) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+22184) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4) @@ -136127,7 +137070,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34445 + var zSelect uintptr = ts + 34515 var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = SQLITE_OK @@ -136149,7 +137092,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 36)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34477) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34547) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40)) = 0 @@ -136163,7 +137106,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+34485, + ts+34555, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -136261,7 +137204,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34550, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34620, 0) return FTS5_EOF } } @@ -136274,20 +137217,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34570, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34640, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = (int32(z2) - int32(z)) / 1 - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34601, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34671, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34604, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34674, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29986, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+30056, uint32(3)) == 0 { tok = FTS5_AND } break @@ -136373,6 +137316,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(*(*uint8)(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) @@ -136401,7 +137355,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in for I64(i) <= nText { if I64(i) == nText || int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp))) || int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp + 1))) || int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp + 2))) { - if i-iFirst >= 3 { + if fts5ExprCountChar(tls, zText+uintptr(iFirst), i-iFirst) >= 3 { var jj int32 *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"') for jj = iFirst; jj < i; jj++ { @@ -138055,9 +139009,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+34608, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34678, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33637, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33707, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -138073,7 +139027,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c uint8 = *(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34613, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34683, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -138160,7 +139114,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20460, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20521, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -138241,7 +139195,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+34642, 0) + ts+34712, 0) } else { fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -138411,12 +139365,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34695, + ts+34765, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34745 + return ts + 34815 } - return ts + 34608 + return ts + 34678 }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -139365,7 +140319,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+34752, iRowid, 0, p+40) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34822, iRowid, 0, p+40) } if rc == SQLITE_ERROR { @@ -139444,7 +140398,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+44, Xsqlite3_mprintf(tls, - ts+34758, + ts+34828, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -139469,7 +140423,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+34809, + ts+34879, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+48, zSql) != 0 { return @@ -139492,7 +140446,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34858, + ts+34928, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -139731,7 +140685,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+68, - Xsqlite3_mprintf(tls, ts+34898, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34968, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -140930,7 +141884,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+60, Xsqlite3_mprintf(tls, - ts+34921, + ts+34991, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -142395,7 +143349,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, - ts+35005, + ts+35075, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -142887,10 +143841,15 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr if pNew != 0 { var pLvl uintptr nByte = Sqlite3_int64(uint32(nSeg) * uint32(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)*12 + pLvl = pNew + 24 + uintptr((*Fts5Structure)(unsafe.Pointer(pNew)).FnLevel-1)*12 (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, p+36, nByte) if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg != 0 { var iLvl int32 @@ -143473,13 +144432,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+35062, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+35132, 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+24979, ts+35070, 0, pzErr) + pConfig, ts+25049, ts+35140, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11419, - ts+35105, + *(*int32)(unsafe.Pointer(bp + 8)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11481, + ts+35175, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -143732,7 +144691,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+34752, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) + ts+34822, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) @@ -143846,7 +144805,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+35149, + ts+35219, 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))) { @@ -144016,7 +144975,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8)).Fn = 0 fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+80+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*96, uintptr(0), bp+8) - sqlite3Fts5BufferAppendBlob(tls, p+36, bp+8, uint32(4), ts+35235) + sqlite3Fts5BufferAppendBlob(tls, p+36, bp+8, uint32(4), ts+35305) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fn, bp+20, bp+24) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) & int64(0x7FFFFFFF)) @@ -144287,7 +145246,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+35240, 0) + ts+35310, 0) return SQLITE_ERROR } @@ -144711,11 +145670,11 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx = nPhrase rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+35279, + ts+35349, 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 + 14597 + return ts + 14607 } return ts + 1547 }(), @@ -144727,9 +145686,9 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 }(), func() uintptr { if bDesc != 0 { - return ts + 35334 + return ts + 35404 } - return ts + 35339 + return ts + 35409 }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -144775,12 +145734,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+35343, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35413, 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+5050, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35349, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35419, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -144811,7 +145770,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+35377, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35447, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, @@ -144842,7 +145801,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+35387, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35457, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } } @@ -144874,14 +145833,14 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 60)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35408, libc.VaList(bp, z)) + ts+35478, 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 + 33791 + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33861 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -144937,7 +145896,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+35240, 0) + ts+35310, 0) return SQLITE_ERROR __1: ; @@ -145154,7 +146113,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35441, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35511, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -145299,28 +146258,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+35477, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35547, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35488, 0) + ts+35558, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35568, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35638, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35576, 0) + ts+35646, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16911, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16927, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35632, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35702, 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+35638, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35708, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { @@ -145378,7 +146337,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) != SQLITE_NULL { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17456, z) { + 0 == Xsqlite3_stricmp(tls, ts+17472, z) { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -145391,12 +146350,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+35654, + ts+35724, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20361 + return ts + 20422 } - return ts + 35691 + return ts + 35761 }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else if nArg == 1 { @@ -146026,7 +146985,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+35703, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35773, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -146270,7 +147229,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+35724, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35794, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -146289,7 +147248,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 8 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35746, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35816, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -146336,7 +147295,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+35777) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35847) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -146345,7 +147304,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+35790, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35860, -1, libc.UintptrFromInt32(-1)) } func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { @@ -146359,7 +147318,7 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { } var azName2 = [5]uintptr{ - ts + 35881, ts + 33980, ts + 24979, ts + 34331, ts + 11419, + ts + 35951, ts + 34050, ts + 25049, ts + 34401, ts + 11481, } func fts5Init(tls *libc.TLS, db uintptr) int32 { @@ -146383,7 +147342,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+35888, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35958, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -146401,13 +147360,15 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35888, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35958, 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+35893, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35963, 0, + SQLITE_UTF8|SQLITE_DETERMINISTIC|SQLITE_INNOCUOUS, + p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -146462,17 +147423,17 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 28 + uintptr(eStmt)*4)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128)) = [11]uintptr{ - ts + 35908, - ts + 35976, - ts + 36045, - ts + 36078, - ts + 36117, - ts + 36157, - ts + 36196, - ts + 36237, - ts + 36276, - ts + 36318, - ts + 36358, + ts + 35978, + ts + 36046, + ts + 36115, + ts + 36148, + ts + 36187, + ts + 36227, + ts + 36266, + ts + 36307, + ts + 36346, + ts + 36388, + ts + 36428, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) @@ -146574,18 +147535,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+36381, + ts+36451, 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+36485, + ts+36555, 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+36523, + ts+36593, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc @@ -146597,7 +147558,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+36561, + ts+36631, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -146609,14 +147570,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+24979, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+11419, zName) - fts5StorageRenameOne(tls, pConfig, bp, ts+35881, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+25049, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11481, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35951, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp, ts+34331, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34401, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp, ts+33980, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34050, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -146628,17 +147589,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+36603, + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36673, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29632 + return ts + 29702 } return ts + 1547 }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36633, + ts+36703, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64))) } @@ -146675,27 +147636,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36677, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36747, 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+36700, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36770, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33980, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+34050, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+34331, ts+36706, 0, pzErr) + pConfig, ts+34401, ts+36776, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35881, ts+36738, 1, pzErr) + pConfig, ts+35951, ts+36808, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34477, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34547, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -146901,12 +147862,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+36755, + ts+36825, 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+36805, + ts+36875, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -146914,7 +147875,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+34477, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34547, uintptr(0), FTS5_CURRENT_VERSION) } return rc } @@ -147090,7 +148051,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36834, + zSql = Xsqlite3_mprintf(tls, ts+36904, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -147272,14 +148233,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 40)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33980, bp+40) + rc = fts5StorageCount(tls, p, ts+34050, bp+40) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 40)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 48)) = int64(0) - rc = fts5StorageCount(tls, p, ts+34331, bp+48) + rc = fts5StorageCount(tls, p, ts+34401, bp+48) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 48)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -147474,9 +148435,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint32(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36866) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36936) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36877) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36947) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -147690,7 +148651,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 + 36888 + var zCat uintptr = ts + 36958 var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -147702,7 +148663,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36897) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36967) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -147713,18 +148674,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36908) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36978) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '2' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*uint8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36866) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36936) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36877) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36947) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36897) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36967) { } else { rc = SQLITE_ERROR } @@ -148000,7 +148961,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 + 36926 + var zBase uintptr = ts + 36996 if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -148140,7 +149101,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36936, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37006, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148148,11 +149109,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36939, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37009, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36944, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37014, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148160,7 +149121,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36949, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37019, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148168,7 +149129,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36952, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37022, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148176,11 +149137,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36955, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36960, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37030, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148188,19 +149149,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36965, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37035, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36969, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37039, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36975, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37045, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36980, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37050, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148208,11 +149169,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36984, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37054, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36988, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -148220,7 +149181,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37061, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148228,11 +149189,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36995, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37065, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36999, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37069, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148240,7 +149201,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37073, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148248,7 +149209,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37007, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37077, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148256,7 +149217,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37011, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37081, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148272,24 +149233,24 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37015, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36995, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37085, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37065, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37018, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37021, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37088, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37091, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37025, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37011, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37095, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+37081, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -148304,137 +149265,137 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37028, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37098, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36995, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37065, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37036, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37106, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37043, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37113, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37048, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37118, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36944, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37014, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37053, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37123, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36939, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37009, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37058, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37011, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37081, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37063, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37133, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15457, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15473, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37068, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37138, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37021, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37091, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37072, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37142, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36936, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37006, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37077, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37147, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36980, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37050, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37083, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37153, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37087, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37157, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37089, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37159, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37003, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37073, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37095, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37165, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37011, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37081, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37103, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37173, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36995, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37065, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37109, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37179, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36995, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37065, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37114, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37184, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37006, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37120, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37190, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37007, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37077, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37128, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37198, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37136, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37206, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37140, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+37210, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37003, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+37073, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37148, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37218, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37006, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37154, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37224, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37007, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37077, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37160, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+37230, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37021, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+37091, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -148449,16 +149410,16 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37167, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37237, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36952, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+37022, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37172, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+37242, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -148466,21 +149427,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37177, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37247, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37022, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37183, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37253, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36952, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37022, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37136, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37206, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -148488,7 +149449,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37189, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37259, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -148496,9 +149457,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37195, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+37265, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36936, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+37006, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -148513,12 +149474,12 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37201, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37271, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37205, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37275, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37208, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37278, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -148527,7 +149488,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37211, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37281, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -148683,7 +149644,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37215) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37285) { if int32(*(*uint8)(unsafe.Pointer(zArg))) != '0' && int32(*(*uint8)(unsafe.Pointer(zArg))) != '1' || *(*uint8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -148863,22 +149824,22 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp)) = [4]BuiltinTokenizer{ - {FzName: ts + 36926, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36996, 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 + 37230, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37300, 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 + 37236, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37306, 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 + 37243, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37313, 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 @@ -150020,14 +150981,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+37251) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37321) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+37255) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37325) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+37259) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37329) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37268, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37338, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -150053,19 +151014,19 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4)) = [3]uintptr{ - ts + 37302, - ts + 37342, - ts + 37377, + ts + 37372, + ts + 37412, + ts + 37447, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23275, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23345, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37420, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37490, 0) *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_ERROR } else { var nByte int32 @@ -150198,11 +151159,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+37453, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37523, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } zSql = sqlite3Fts5Mprintf(tls, bp+64, - ts+37484, + ts+37554, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 64)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) @@ -150226,7 +151187,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 68)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37535, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37605, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64)) = SQLITE_ERROR } } else { @@ -150621,7 +151582,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+37561, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37631, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -150643,7 +151604,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 + 37571 + return ts + 37641 } func init() { @@ -150698,114 +151659,116 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = upperFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = lowerFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = hexFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = versionFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = randomFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = randomBlob - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = nullifFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = versionFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = sourceidFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = errlogFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = quoteFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = last_insert_rowid - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = changes - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = total_changes - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = replaceFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = zeroblobFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = unhexFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = unhexFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = versionFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = randomFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = randomBlob + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = nullifFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = versionFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = sourceidFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = errlogFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = quoteFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = last_insert_rowid + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = changes + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = total_changes + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = replaceFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = zeroblobFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = substrFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = substrFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = sumFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = sumFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = sumStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = totalFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = totalFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = sumInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = substrFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = substrFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = sumStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = avgFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = avgFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = sumFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = sumFinalize *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = sumInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = countStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = countFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = countFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = countInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = countStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = countFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = countFinalize - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = countInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = groupConcatStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = groupConcatFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = groupConcatValue - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = groupConcatInverse - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = groupConcatStep - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = groupConcatFinalize - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = groupConcatValue - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = groupConcatInverse - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528)) = uintptr(unsafe.Pointer(&globInfo)) - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2568)) = uintptr(unsafe.Pointer(&likeInfoNorm)) - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = likeFunc - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608)) = uintptr(unsafe.Pointer(&likeInfoNorm)) + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = sumStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = totalFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = totalFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = sumInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = sumStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = avgFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = avgFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = sumInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = countStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2460)) = countFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2464)) = countFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2468)) = countInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = countStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2500)) = countFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2504)) = countFinalize + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2508)) = countInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = groupConcatStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2540)) = groupConcatFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544)) = groupConcatValue + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2548)) = groupConcatInverse + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2576)) = groupConcatStep + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2580)) = groupConcatFinalize + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2584)) = groupConcatValue + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2588)) = groupConcatInverse + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2608)) = uintptr(unsafe.Pointer(&globInfo)) *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616)) = likeFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xCeil - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = xCeil - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xFloor + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2648)) = uintptr(unsafe.Pointer(&likeInfoNorm)) + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2656)) = likeFunc + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = uintptr(unsafe.Pointer(&likeInfoNorm)) + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2696)) = likeFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2808)) = xCeil *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = ceilingFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = libc.Xtrunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2848)) = xCeil *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = ceilingFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2888)) = xFloor + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = ceilingFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2928)) = libc.Xtrunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = ceilingFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = logFunc *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = logFunc - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xexp - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math1Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xpow - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xpow - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math2Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xfmod + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = logFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = logFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xexp + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math1Func + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xpow *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math2Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xacos - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xasin - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xatan + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xpow + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math2Func + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xfmod + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math2Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xacos *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func - *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xatan2 - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math2Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xcos + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xasin + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math1Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xatan *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xsin - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xtan + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xatan2 + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math2Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xcos *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xcosh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xsin *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xsinh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xtan *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xtanh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xcosh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xacosh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xsinh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xasinh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xtanh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xatanh + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = libc.Xacosh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xsqrt + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = libc.Xasinh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = degToRad + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3808)) = libc.Xatanh *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = math1Func - *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = radToDeg + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848)) = libc.Xsqrt *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = math1Func - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = piFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = signFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = versionFunc - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = versionFunc + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3888)) = degToRad + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = math1Func + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3928)) = radToDeg + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = math1Func + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3976)) = piFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4016)) = signFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056)) = versionFunc + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4096)) = 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)) + 16)) = juliandayFunc *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) @@ -151263,6 +152226,18 @@ func init() { *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 4)) = rbuVfsClose + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 8)) = rbuVfsRead + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 12)) = rbuVfsWrite + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 16)) = rbuVfsTruncate + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 20)) = rbuVfsSync + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 24)) = rbuVfsFileSize + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 28)) = rbuVfsLock + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 32)) = rbuVfsUnlock + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 36)) = rbuVfsCheckReservedLock + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 40)) = rbuVfsFileControl + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 44)) = rbuVfsSectorSize + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods1)) + 48)) = rbuVfsDeviceCharacteristics *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex @@ -151581,6 +152556,7 @@ func init() { *(*func(*libc.TLS, uintptr, uintptr, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1052)) = Xsqlite3_serialize *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056)) = Xsqlite3_db_name *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1060)) = Xsqlite3_value_encoding + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064)) = 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)) + 4)) = Xsqlite3RtreeInit *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit @@ -151602,5 +152578,5 @@ func init() { *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = 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=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00ValueList\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00coalesce\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00HAVING clause on a non-aggregate query\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00unsafe use of virtual table \"%s\"\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown join type: %T%s%T%s%T\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%s\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00trigger \"%s\" may not write to shadow table \"%s\"\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX %d:%s\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00$[\x00$.\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00.%.*s\x00[%d]\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00->\x00->>\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file:///%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24\x00" +var 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=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00\x00\x00day\x00\x00\x00\x00month\x00\x00year\x00\x00\x00auto\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00(join-%u)\x00(subquery-%u)\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfPos\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenRead\x00OpenWrite\x00BitNot\x00OpenDup\x00OpenAutoindex\x00String8\x00OpenEphemeral\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00Real\x00DropTrigger\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\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 |